<div dir="ltr">Hello,<div>Thank you for your detailed explication but I miss some information or I'm unable to understand it properly. What I'm trying to do is to use mediaproxy-ng as a turn server between 2 WebRTC endpoints (when at least one is behind restrictive firewall). Trying to replicate what you explained on my needs I tried:</div>
<div><div>$avp(rtpproxy_offer_flags) = "froc+SP";</div><div>$avp(rtpproxy_answer_flags) = "froc-SP";</div></div><div><br></div><div>But, unfortunately, I have the same error. Sorry if the solution is obvious but I can't find it.</div>
<div><br></div><div>Thank you.</div><div><br></div><div>Best regards,</div><div>Mihai M </div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 4, 2014 at 10:45 PM, Muhammad Shahzad <span dir="ltr"><<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>There are several problems that need to be addressed in your kamailio.cfg but let me try to focus only on mediaprxoy-ng related ones.<br>
<br></div>First instead of engaging mediaproxy in failure route, engage it main route or branch route. Why wait for failure when we know call will fail anyway if you try to call webrtc to sip or vice versa.<br>

<br></div>Secondly you need to keep track of connection type of both caller and callee and set appropriate mediaproxy-ng flags according to call direction, e.g. call from webrtc to sip, or sip to webrtc or webrtc to webrtc or sip to sip, each type of call needs different set of flags for both rtpproxy_offer and rtpproxy_answer.<br>


<br></div>How you do this, is pretty simple, to detect if caller is webrtc endpoint you can use,<div class="im"><br><br>if ($avp(mline) =~ "SAVPF") {<br></div></div># caller is a webrtc endpoint<br><div>};<br><br>
</div><div>To check if callee is a webrtc endpoint, you can use,<br>

<br>if ($(ru{uri.param,transport}) =~ "ws") {<br></div><div># callee is a webrtc endpoint<br></div><div>};<br><br></div><div>For testing purpose, i recommend you only use mediaproxy-ng for bridging webrtc to sip or vice versa calls, i.e. if both endpoints are using same transport (e.g. sip to sip or webrtc to webrtc calls) then don't use mediaproxy-ng at all and allow endpoints to establish media directly (that would work out the box at least for webrtc to webrtc calls).<br>


<br></div><div>Finally use correct flags for each type of call (i recommend doing it in branch route), for example,<br><br></div><div>For WebRTC to SIP call use flags (case-sensitive),<br><br>$avp(rtpproxy_offer_flags)  = "froc-sp";<br>


$avp(rtpproxy_answer_flags) = "froc+SP";<br>rtpproxy_offer($avp(rtpproxy_offer_flags));<br><br></div><div>For SIP to WebRTC call use flags (case-sensitive),<br></div><div><br>$avp(rtpproxy_offer_flags)  = "froc+SP";<br>


$avp(rtpproxy_answer_flags) = "froc-sp";<br>rtpproxy_offer($avp(rtpproxy_offer_flags));<br><br><br></div><div>Then in reply route,<br><br>rtpproxy_answer($avp(rtpproxy_answer_flags));<br></div><div><br><br></div>


<div>Remember, currently mediaproxy-ng does NOT support SRTP/DTLS, which is required by firefox, so as result your webrtc endpoint MUST be running on Chrome.<br><br></div><div>Hope this helps.<br><br></div><div>Thank you.<br>


<br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 4, 2014 at 3:28 PM, Mihai Marin <span dir="ltr"><<a href="mailto:marinmihai@gmail.com" target="_blank">marinmihai@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>Thank you for your support.</div><div><br></div><div>Yes, I have the same error without video enabled. I have attached the logs from jssip (with and without video support) and logs from kamailio when trying a call with video support enabled. The kamailio.cfg used is the same from my previous mail. </div>



<div><br></div><div>I also tried with sipml5 and I have the same behavior.</div><div><br></div><div>I'm stuck on this error and I think I'm looking in the wrong direction.</div><div><br></div><div>Thank you.</div>



<div><br></div><div>Best regards,</div><div>Mihai M</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 4, 2014 at 2:49 PM, Andrew Pogrebennyk <span dir="ltr"><<a href="mailto:apogrebennyk@sipwise.com" target="_blank">apogrebennyk@sipwise.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
could you please post also your Chrome js developer log?<br>
Does the problem exist if you start the jssip clients without video support?<br>
<span><font color="#888888"><br>
Andrew<br>
</font></span><div><br>
On 02/03/2014 12:00 PM, Mihai Marin wrote:<br>
> Hello,<br>
><br>
> Another weekend struggling to make a call from jssip to another jssip<br>
> behind firewall and I still receive 488 - Not Acceptable Here. I tried<br>
> all the ideas that I had/received without any success - including catch<br>
> 488 and re-invite.<br>
</div>> [...]<br>
<div>> What do I miss from my configuration?<br>
><br>
> Thank you.<br>
><br>
> Best regards,<br>
> Mihai M<br>
<br>
<br>
</div><div><div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div>