<div dir="ltr"><div>Hello,</div><div>I'm trying the simplest case first. I don't understand why you are saying that most of the people don't use mediaproxy-ng for WebRTC to WebRTC calls. If my firewall is a restrictive one I need to use turn server and mediaproxy-ng can do turn too? Probably I'm not seeing the big picture.</div>
<div><br></div><div>Regarding the problem with Incompatible SDP I have attached the SDP before mp-ng and after:</div><div><br></div><div>BEFORE mediaproxy-ng magic:</div><div>14(21473) DEBUG: websocket [ws_frame.c:650]: ws_frame_receive(): Rx SIP message:<br>
</div><div>INVITE <a href="mailto:sip%3Abob@93.187.138.214">sip:bob@93.187.138.214</a> SIP/2.0</div><div>Via: SIP/2.0/WS an6ikqlgivd7.invalid;branch=z9hG4bK5845620</div><div>Max-Forwards: 69</div><div>To: <<a href="mailto:sip%3Abob@93.187.138.214">sip:bob@93.187.138.214</a>></div>
<div>From: "Alice Test" <<a href="mailto:sip%3Aalice@93.187.138.214">sip:alice@93.187.138.214</a>>;tag=dt8iuu64l9</div><div>Call-ID: bmaapitncfv1jnijrbcf</div><div>CSeq: 7318 INVITE</div><div>Contact: <sip:sbt6u2o1@an6ikqlgivd7.invalid;transport=ws;ob></div>
<div>Allow: ACK,CANCEL,BYE,OPTIONS,INVITE</div><div>Content-Type: application/sdp</div><div>Supported: path, outbound, gruu</div><div>User-Agent: JsSIP 0.3.0</div><div>Content-Length: 2967</div><div><br></div><div>v=0</div>
<div>o=- 1167703101330838157 2 IN IP4 127.0.0.1</div><div>s=-</div><div>t=0 0</div><div>a=group:BUNDLE audio video</div><div>a=msid-semantic: WMS 3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div><div>m=audio 9496 RTP/SAVPF 111 103 0 8 106 105 13 126</div>
<div>c=IN IP4 213.233.85.51</div><div>a=rtcp:9496 IN IP4 213.233.85.51</div><div>a=candidate:3511930567 1 udp 2113937151 10.93.108.223 53310 typ host generation 0</div><div>a=candidate:3511930567 2 udp 2113937151 10.93.108.223 53310 typ host generation 0</div>
<div>a=candidate:2681221687 1 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:2681221687 2 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:1343998067 1 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div>
<div>a=candidate:1343998067 2 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div><div>a=ice-ufrag:gNml+vA5NqfaRg0w</div><div>a=ice-pwd:dQJW2XWJ+g6gTIujfT819g2d</div><div>a=ice-options:google-ice</div>
<div>a=mid:audio</div><div>a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level</div><div>a=sendrecv</div><div>a=rtcp-mux</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:uWFSQ5+41i2e12WFnGJKCfe+kuudHy0NurAaT8or</div>
<div>a=rtpmap:111 opus/48000/2</div><div>a=fmtp:111 minptime=10</div><div>a=rtpmap:103 ISAC/16000</div><div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:106 CN/32000</div><div>a=rtpmap:105 CN/16000</div>
<div>a=rtpmap:13 CN/8000</div><div>a=rtpmap:126 telephone-event/8000</div><div>a=maxptime:60</div><div>a=ssrc:231261060 cname:aZBL5jB9VQtchKUh</div><div>a=ssrc:231261060 msid:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv e8c9eb9c-916e-4c30-884f-fd602b2d8c90</div>
<div>a=ssrc:231261060 mslabel:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div><div>a=ssrc:231261060 label:e8c9eb9c-916e-4c30-884f-fd602b2d8c90</div><div>m=video 9496 RTP/SAVPF 100 116 117</div><div>c=IN IP4 213.233.85.51</div><div>
a=rtcp:9496 IN IP4 213.233.85.51</div><div>a=candidate:3511930567 1 udp 2113937151 10.93.108.223 53310 typ host generation 0</div><div>a=candidate:3511930567 2 udp 2113937151 10.93.108.223 53310 typ host generation 0</div>
<div>a=candidate:2681221687 1 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:2681221687 2 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:1343998067 1 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div>
<div>a=candidate:1343998067 2 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div><div>a=ice-ufrag:gNml+vA5NqfaRg0w</div><div>a=ice-pwd:dQJW2XWJ+g6gTIujfT819g2d</div><div>a=ice-options:google-ice</div>
<div>a=mid:video</div><div>a=extmap:2 urn:ietf:params:rtp-hdrext:toffset</div><div>a=extmap:3 <a href="http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time">http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time</a></div>
<div>a=sendrecv</div><div>a=rtcp-mux</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:uWFSQ5+41i2e12WFnGJKCfe+kuudHy0NurAaT8or</div><div>a=rtpmap:100 VP8/90000</div><div>a=rtcp-fb:100 ccm fir</div><div>a=rtcp-fb:100 nack</div>
<div>a=rtcp-fb:100 goog-remb</div><div>a=rtpmap:116 red/90000</div><div>a=rtpmap:117 ulpfec/90000</div><div>a=ssrc:3207772497 cname:aZBL5jB9VQtchKUh</div><div>a=ssrc:3207772497 msid:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv ec757148-040c-479f-adbe-f6bac271fbd6</div>
<div>a=ssrc:3207772497 mslabel:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div><div>a=ssrc:3207772497 label:ec757148-040c-479f-adbe-f6bac271fbd6</div><div><br></div><div><br></div><div>AFTER mediaproxy-ng magic:<br></div><div>14(21473) DEBUG: rtpproxy-ng [rtpproxy.c:1333]: rtpp_function_call(): proxy reply: d3:sdp3046:<br>
</div><div>v=0<br></div><div><div>o=- 1167703101330838157 2 IN IP4 93.187.138.214</div><div>s=-</div><div>t=0 0</div><div>a=group:BUNDLE audio video</div><div>a=msid-semantic: WMS 3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div>
<div>m=audio 30408 RTP/SAVPF 111 103 0 8 106 105 13 126</div><div>c=IN IP4 93.187.138.214</div><div>a=candidate:3511930567 1 udp 2113937151 10.93.108.223 53310 typ host generation 0</div><div>a=candidate:3511930567 2 udp 2113937151 10.93.108.223 53310 typ host generation 0</div>
<div>a=candidate:2681221687 1 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:2681221687 2 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:1343998067 1 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div>
<div>a=candidate:1343998067 2 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div><div>a=ice-ufrag:gNml+vA5NqfaRg0w</div><div>a=ice-pwd:dQJW2XWJ+g6gTIujfT819g2d</div><div>a=ice-options:google-ice</div>
<div>a=mid:audio</div><div>a=sendrecv</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:uWFSQ5+41i2e12WFnGJKCfe+kuudHy0NurAaT8or</div><div>a=rtpmap:111 opus/48000/2</div><div>a=fmtp:111 minptime=10</div><div>a=rtpmap:103 ISAC/16000</div>
<div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:106 CN/32000</div><div>a=rtpmap:105 CN/16000</div><div>a=rtpmap:13 CN/8000</div><div>a=rtpmap:126 telephone-event/8000</div><div>a=maxptime:60</div>
<div>a=ssrc:231261060 cname:aZBL5jB9VQtchKUh</div><div>a=ssrc:231261060 msid:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv e8c9eb9c-916e-4c30-884f-fd602b2d8c90</div><div>a=ssrc:231261060 mslabel:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div>
<div>a=ssrc:231261060 label:e8c9eb9c-916e-4c30-884f-fd602b2d8c90</div><div>a=rtcp:30409</div><div>a=candidate:8JGnwCAu0icAoJnr 1 UDP 2130706432 93.187.138.214 30408 typ host</div><div>a=candidate:8JGnwCAu0icAoJnr 2 UDP 2130706431 93.187.138.214 30409 typ host</div>
<div>m=video 30408 RTP/SAVPF 100 116 117</div><div>c=IN IP4 93.187.138.214</div><div>a=candidate:3511930567 1 udp 2113937151 10.93.108.223 53310 typ host generation 0</div><div>a=candidate:3511930567 2 udp 2113937151 10.93.108.223 53310 typ host generation 0</div>
<div>a=candidate:2681221687 1 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:2681221687 2 tcp 1509957375 10.93.108.223 0 typ host generation 0</div><div>a=candidate:1343998067 1 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div>
<div>a=candidate:1343998067 2 udp 1845501695 213.233.85.51 9496 typ srflx raddr 10.93.108.223 rport 53310 generation 0</div><div>a=ice-ufrag:gNml+vA5NqfaRg0w</div><div>a=ice-pwd:dQJW2XWJ+g6gTIujfT819g2d</div><div>a=ice-options:google-ice</div>
<div>a=mid:video</div><div>a=sendrecv</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:uWFSQ5+41i2e12WFnGJKCfe+kuudHy0NurAaT8or</div><div>a=rtpmap:100 VP8/90000</div><div>a=rtcp-fb:100 ccm fir</div><div>a=rtcp-fb:100 nack</div>
<div>a=rtcp-fb:100 goog-remb</div><div>a=rtpmap:116 red/90000</div><div>a=rtpmap:117 ulpfec/90000</div><div>a=ssrc:3207772497 cname:aZBL5jB9VQtchKUh</div><div>a=ssrc:3207772497 msid:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv ec757148-040c-479f-adbe-f6bac271fbd6</div>
<div>a=ssrc:3207772497 mslabel:3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div><div>a=ssrc:3207772497 label:ec757148-040c-479f-adbe-f6bac271fbd6</div><div>a=rtcp:30409</div><div>a=candidate:8JGnwCAu0icAoJnr 1 UDP 2130706432 93.187.138.214 30408 typ host</div>
<div>a=candidate:8JGnwCAu0icAoJnr 2 UDP 2130706431 93.187.138.214 30409 typ host</div></div><div><br></div><div><br></div><div><br></div><div>Between them, I have some strange logs in kamailio:</div><div> 14(21473) ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio-test-media.cfg] l=878 a=25 n=rtpproxy_manage</div>
<div>14(21473) DEBUG: <core> [parser/sdp/sdp_helpr_funcs.c:565]: extract_mediaip(): located IP address [127.0.0.1] in `o=' field</div><div>14(21473) DEBUG: <core> [parser/sdp/sdp_helpr_funcs.c:565]: extract_mediaip(): located IP address [213.233.85.51] in `c=' field</div>
<div>14(21473) DEBUG: <core> [parser/sdp/sdp.c:574]: parse_sdp_session(): ignoring unknown type in a= line: `a=ice-ufrag:gNml+vA5NqfaRg0w</div><div>a=ice-pwd:dQJW2XWJ+g6gTIujfT819g2d</div><div>a=ice-options:google-ice</div>
<div>a=mid:audio</div><div>...............................................................</div><div><div>14(21473) DEBUG: <core> [parser/sdp/sdp.c:574]: parse_sdp_session(): ignoring unknown type in a= line: `a=ssrc:3207772497 label:ec757148-040c-479f-adbe-f6bac271fbd6</div>
<div>'</div><div>14(21473) DEBUG: rtpproxy-ng [rtpproxy_funcs.c:148]: check_content_type(): type <application/sdp> found valid</div><div>14(21473) DEBUG: rtpproxy-ng [rtpproxy.c:1333]: rtpp_function_call(): proxy reply: d3:sdp3046:v=0</div>
</div><div><div>o=- 1167703101330838157 2 IN IP4 93.187.138.214</div><div>s=-</div><div>t=0 0</div><div>a=group:BUNDLE audio video</div><div>a=msid-semantic: WMS 3G8DreUBMks5DpcqNiiE5jXIC4GzIwfd7CUv</div></div><div><br></div>
<div><br></div><div>Thank you very much for your help and for spending time debugging this error.</div><div><br></div><div><br></div><div>Best regards,</div><div>Mihai M</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Feb 5, 2014 at 5:41 PM, Richard Fuchs <span dir="ltr"><<a href="mailto:rfuchs@sipwise.com" target="_blank">rfuchs@sipwise.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hey,<br>
<br>
If you're trying to connect two WebRTC endpoints with each, you don't<br>
need any of mediaproxy-ng's magic to get it working. All the previous<br>
replies were assuming that you were trying to connect a WebRTC endpoint<br>
with a non-WebRTC one, which is usually what people are trying to do.<br>
<br>
In your case, the flags "froc" in either direction should be sufficient<br>
to get the job done. If it still doesn't work, can you please post the<br>
rejected SDP body as it appears both on the sender's side and on the<br>
receiver's side (i.e. both before and after it went through MP-NG).<br>
<br>
cheers<br>
<div class="im"><br>
<br>
On 02/05/14 05:17, Mihai Marin wrote:<br>
> Hello,<br>
</div><div class="im">> Thank you for your detailed explication but I miss some information or<br>
> I'm unable to understand it properly. What I'm trying to do is to use<br>
> mediaproxy-ng as a turn server between 2 WebRTC endpoints (when at least<br>
> one is behind restrictive firewall). Trying to replicate what you<br>
> explained on my needs I tried:<br>
> $avp(rtpproxy_offer_flags) = "froc+SP";<br>
> $avp(rtpproxy_answer_flags) = "froc-SP";<br>
><br>
> But, unfortunately, I have the same error. Sorry if the solution is<br>
> obvious but I can't find it.<br>
><br>
> Thank you.<br>
><br>
> Best regards,<br>
> Mihai M<br>
><br>
><br>
> On Tue, Feb 4, 2014 at 10:45 PM, Muhammad Shahzad <<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:shaheryarkh@gmail.com">shaheryarkh@gmail.com</a>>> wrote:<br>
><br>
>     There are several problems that need to be addressed in your<br>
>     kamailio.cfg but let me try to focus only on mediaprxoy-ng related ones.<br>
><br>
>     First instead of engaging mediaproxy in failure route, engage it<br>
>     main route or branch route. Why wait for failure when we know call<br>
>     will fail anyway if you try to call webrtc to sip or vice versa.<br>
><br>
>     Secondly you need to keep track of connection type of both caller<br>
>     and callee and set appropriate mediaproxy-ng flags according to call<br>
>     direction, e.g. call from webrtc to sip, or sip to webrtc or webrtc<br>
>     to webrtc or sip to sip, each type of call needs different set of<br>
>     flags for both rtpproxy_offer and rtpproxy_answer.<br>
><br>
>     How you do this, is pretty simple, to detect if caller is webrtc<br>
>     endpoint you can use,<br>
><br>
><br>
>     if ($avp(mline) =~ "SAVPF") {<br>
>     # caller is a webrtc endpoint<br>
>     };<br>
><br>
>     To check if callee is a webrtc endpoint, you can use,<br>
><br>
>     if ($(ru{uri.param,transport}) =~ "ws") {<br>
>     # callee is a webrtc endpoint<br>
>     };<br>
><br>
>     For testing purpose, i recommend you only use mediaproxy-ng for<br>
>     bridging webrtc to sip or vice versa calls, i.e. if both endpoints<br>
>     are using same transport (e.g. sip to sip or webrtc to webrtc calls)<br>
>     then don't use mediaproxy-ng at all and allow endpoints to establish<br>
>     media directly (that would work out the box at least for webrtc to<br>
>     webrtc calls).<br>
><br>
>     Finally use correct flags for each type of call (i recommend doing<br>
>     it in branch route), for example,<br>
><br>
>     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>
>     For SIP to WebRTC 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>
><br>
>     Then in reply route,<br>
><br>
>     rtpproxy_answer($avp(rtpproxy_answer_flags));<br>
><br>
><br>
>     Remember, currently mediaproxy-ng does NOT support SRTP/DTLS, which<br>
>     is required by firefox, so as result your webrtc endpoint MUST be<br>
>     running on Chrome.<br>
><br>
>     Hope this helps.<br>
><br>
>     Thank you.<br>
><br>
><br>
><br>
><br>
>     On Tue, Feb 4, 2014 at 3:28 PM, Mihai Marin <<a href="mailto:marinmihai@gmail.com">marinmihai@gmail.com</a><br>
</div></div><div class="im">>     <mailto:<a href="mailto:marinmihai@gmail.com">marinmihai@gmail.com</a>>> wrote:<br>
><br>
>         Hello,<br>
>         Thank you for your support.<br>
><br>
>         Yes, I have the same error without video enabled. I have<br>
>         attached the logs from jssip (with and without video support)<br>
>         and logs from kamailio when trying a call with video support<br>
>         enabled. The kamailio.cfg used is the same from my previous mail.<br>
><br>
>         I also tried with sipml5 and I have the same behavior.<br>
><br>
>         I'm stuck on this error and I think I'm looking in the wrong<br>
>         direction.<br>
><br>
>         Thank you.<br>
><br>
>         Best regards,<br>
>         Mihai M<br>
><br>
><br>
>         On Tue, Feb 4, 2014 at 2:49 PM, Andrew Pogrebennyk<br>
</div><div><div class="h5">>         <<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.com</a> <mailto:<a href="mailto:apogrebennyk@sipwise.com">apogrebennyk@sipwise.com</a>>> wrote:<br>
><br>
>             Hi,<br>
>             could you please post also your Chrome js developer log?<br>
>             Does the problem exist if you start the jssip clients<br>
>             without video support?<br>
><br>
>             Andrew<br>
><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<br>
>             another jssip<br>
>             > behind firewall and I still receive 488 - Not Acceptable<br>
>             Here. I tried<br>
>             > all the ideas that I had/received without any success -<br>
>             including catch<br>
>             > 488 and re-invite.<br>
>             > [...]<br>
>             > What do I miss from my configuration?<br>
>             ><br>
>             > Thank you.<br>
>             ><br>
>             > Best regards,<br>
>             > Mihai M<br>
><br>
><br>
>             _______________________________________________<br>
>             SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
>             mailing list<br>
>             <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
</div></div>>             <mailto:<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
<div class="im">>             <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>
><br>
><br>
>         _______________________________________________<br>
>         SIP Express Router (SER) and Kamailio (OpenSER) - sr-users<br>
>         mailing list<br>
</div>>         <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a> <mailto:<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
<div class="im">>         <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>
><br>
><br>
>     _______________________________________________<br>
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
</div>>     <a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a> <mailto:<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>><br>
<div class=""><div class="h5">>     <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>
><br>
><br>
><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>
<br>
</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>