<div dir="ltr">Hello,<div><br></div><div>I've been experimenting with Kamailio with ws and sip clients and could need a hand in getting a call between those two to work. </div><div><br></div><div>I have Kamailio 4.1.2 (using rtpproxy-ng instead of rtpproxy) on a CentOS 6.5 and a mediaproxy-ng running. I have clients <a href="mailto:wsclient@testers.com">wsclient@testers.com</a> and <a href="mailto:gsclient@testers.com">gsclient@testers.com</a> and I try to make call from wsclient to gsclient. The wsclient is a jssip client running on chrome and gsclient is a grandstream desk phone. My config file is the default one enhanced by online examples.</div>
<div><br></div><div>I use a html5 <audio> element for the media streams, and configured my jssip phone to accept audio options like this:</div><div><div>var options = {</div><div><span class="" style="white-space:pre">        </span>'eventHandlers': eventHandlers,</div>
<div><span class="" style="white-space:pre">    </span>'mediaConstraints': {'audio': true, 'video': false }</div><div>};</div></div><div>sipUA.call(callto, options);<br></div><div><br></div><div>I used the instructions from here: <a href="http://www.slideshare.net/crocodilertc/webrtc-websockets">http://www.slideshare.net/crocodilertc/webrtc-websockets</a></div>
<div><br></div><div>What I get is gsclient ringing, and as I answer there is no audio and call hangs up in a few seconds. I guess this is a SDP problem, something between Kamailio and Mediaproxy-ng but SDP is not my strong point so I'd appreciate advice. </div>
<div><br></div><div>Question is where's my misconfiguration/problem? I would like to learn why this problem occurs and how to fix it rather than getting a solution right away, but please bear in mind I don't know much about SDP. </div>
<div><br></div><div><br></div><div><br></div><div>In Kamailio log I see:</div><div><div>kamailio[27059]: ERROR: rtpproxy-ng [rtpproxy.c:1346]: rtpp_function_call(): proxy replied with error: Error rewriting SDP</div><div>
kamailio[27058]: ERROR: rtpproxy-ng [rtpproxy.c:1346]: rtpp_function_call(): proxy replied with error: Unknown call-id</div><div>kamailio[27057]: ERROR: rtpproxy-ng [rtpproxy.c:1346]: rtpp_function_call(): proxy replied with error: Unknown call-id</div>
</div><div><br></div><div><br></div><div>Following are the INVITEs and 200 OKs from my SIP trace (1.1.1.1 is the ip of my Kamailio & mediaproxy-ng box and 2.2.2.2 is the public ip behind which both my clients are). The gsclient has port 5066.</div>
<div><br></div><div>******************************************************************************</div><div><br></div><div><div>U 2014/04/01 20:03:41.060009 <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> -> <a href="http://2.2.2.2:5066">2.2.2.2:5066</a></div>
<div>INVITE sip:gsclient@192.168.0.106:5066;transport=udp SIP/2.0.</div><div>Record-Route: <sip:1.1.1.1;r2=on;lr=on;nat=yes>.</div><div>Record-Route: <sip:1.1.1.1;transport=ws;r2=on;lr=on;nat=yes>.</div><div>Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKb703.fbb259c1d8c17e163876ec760e086145.0.</div>
<div>Via: SIP/2.0/WS kj59uak271em.invalid;rport=38986;received=2.2.2.2;branch=z9hG4bK9891267.</div><div>Max-Forwards: 16.</div><div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>.</div>
<div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div><div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 INVITE.</div><div>Contact: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>;gr=urn:uuid:f6014564-88cb-4f57-9ae5-3b4336ef9db8;ob;alias=2.2.2.2~38986~5;alias=2.2.2.2~38986~5>.</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: 2211.</div><div>.</div><div>v=0.</div>
<div>o=- 4897716268503406223 2 IN IP4 1.1.1.1.</div><div>s=-.</div><div>t=0 0.</div><div>a=group:BUNDLE audio.</div><div>a=msid-semantic: WMS vMh5vhUEQzvVKJYdqRkAuCcXVa2blgbEXARZ.</div><div>m=audio 30028 RTP/SAVPF 111 103 104 0 8 106 105 13 126.</div>
<div>c=IN IP4 1.1.1.1.</div><div>a=candidate:2999745851 1 udp 2113937151 192.168.56.1 63341 typ host generation 0.</div><div>a=candidate:2999745851 2 udp 2113937151 192.168.56.1 63341 typ host generation 0.</div><div>a=candidate:3350409123 1 udp 2113937151 192.168.0.101 63342 typ host generation 0.</div>
<div>a=candidate:3350409123 2 udp 2113937151 192.168.0.101 63342 typ host generation 0.</div><div>a=candidate:4233069003 1 tcp 1509957375 192.168.56.1 0 typ host generation 0.</div><div>a=candidate:4233069003 2 tcp 150995</div>
<div><br></div><div>T 2014/04/01 20:03:41.119806 <a href="http://2.2.2.2:38986">2.2.2.2:38986</a> -> <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> [A]</div><div>......</div><div><br></div><div>U 2014/04/01 20:03:41.159086 <a href="http://2.2.2.2:5066">2.2.2.2:5066</a> -> <a href="http://1.1.1.1:5060">1.1.1.1:5060</a></div>
<div>SIP/2.0 488 Not Acceptable Here.</div><div>Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKb703.fbb259c1d8c17e163876ec760e086145.0.</div><div>Via: SIP/2.0/WS kj59uak271em.invalid;rport=38986;received=2.2.2.2;branch=z9hG4bK9891267.</div>
<div>Record-Route: <sip:1.1.1.1;r2=on;lr=on;nat=yes>.</div><div>Record-Route: <sip:1.1.1.1;transport=ws;r2=on;lr=on;nat=yes>.</div><div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div>
<div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>;tag=7875f08763872c34.</div><div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 INVITE.</div><div>User-Agent: Grandstream GXP2000 1.2.2.26.</div>
<div>Warning: 304 GS "Media type not available".</div><div>Content-Length: 0.</div><div>.</div><div><br></div><div><br></div><div>U 2014/04/01 20:03:41.159392 <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> -> <a href="http://2.2.2.2:5066">2.2.2.2:5066</a></div>
<div>ACK sip:gsclient@192.168.0.106:5066;transport=udp SIP/2.0.</div><div>Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKb703.fbb259c1d8c17e163876ec760e086145.0.</div><div>Max-Forwards: 16.</div><div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>;tag=7875f08763872c34.</div>
<div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div><div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 ACK.</div><div>Content-Length: 0.</div><div>.</div>
<div><br></div><div><br></div><div>U 2014/04/01 20:03:41.161085 <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> -> <a href="http://2.2.2.2:5066">2.2.2.2:5066</a></div><div>INVITE sip:gsclient@192.168.0.106:5066;transport=udp SIP/2.0.</div>
<div>Record-Route: <sip:1.1.1.1;r2=on;lr=on;nat=yes>.</div><div>Record-Route: <sip:1.1.1.1;transport=ws;r2=on;lr=on;nat=yes>.</div><div>Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKb703.fbb259c1d8c17e163876ec760e086145.1.</div>
<div>Via: SIP/2.0/WS kj59uak271em.invalid;rport=38986;received=2.2.2.2;branch=z9hG4bK9891267.</div><div>Max-Forwards: 16.</div><div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>.</div>
<div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div><div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 INVITE.</div><div>Contact: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>;gr=urn:uuid:f6014564-88cb-4f57-9ae5-3b4336ef9db8;ob;alias=2.2.2.2~38986~5;alias=2.2.2.2~38986~5>.</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: 3136.</div><div>.</div><div>v=0.</div>
<div>o=- 4897716268503406223 2 IN IP4 1.1.1.1.</div><div>s=-.</div><div>t=0 0.</div><div>a=group:BUNDLE audio.</div><div>a=msid-semantic: WMS vMh5vhUEQzvVKJYdqRkAuCcXVa2blgbEXARZ.</div><div>m=audio 30028 RTP/AVP 111 103 104 0 8 106 105 13 126.</div>
<div>c=IN IP4 1.1.1.1.</div><div>a=fingerprint:sha-256 72:54:87:EC:D2:4C:D1:70:C2:FE:69:08:20:5C:92:1D:E0:EA:BD:45:09:E0:90:62:27:B6:34:60:54:E2:99:28.</div><div>a=setup:actpass.</div><div>a=mid:audio.</div><div>a=sendrecv.</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:104 ISAC/32000.</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:3298511848 cnam</div></div><div><br></div><div><br></div><div><br></div><div>
And here are the 200 OK messages when answering the call: </div><div><br></div><div><div><br></div><div>U 2014/04/01 20:03:46.049711 <a href="http://2.2.2.2:5066">2.2.2.2:5066</a> -> <a href="http://1.1.1.1:5060">1.1.1.1:5060</a></div>
<div>SIP/2.0 200 OK.</div><div>Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bKb703.fbb259c1d8c17e163876ec760e086145.1.</div><div>Via: SIP/2.0/WS kj59uak271em.invalid;rport=38986;received=2.2.2.2;branch=z9hG4bK9891267.</div><div>Record-Route: <sip:1.1.1.1;r2=on;lr=on;nat=yes>.</div>
<div>Record-Route: <sip:1.1.1.1;transport=ws;r2=on;lr=on;nat=yes>.</div><div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div><div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>;tag=fb215901a251c9a0.</div>
<div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 INVITE.</div><div>User-Agent: Grandstream GXP2000 1.2.2.26.</div><div>Contact: <sip:gsclient@192.168.0.106:5066;transport=udp>.</div><div>Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.</div>
<div>Content-Type: application/sdp.</div><div>Supported: replaces, timer.</div><div>Content-Length: 216.</div><div>.</div><div>v=0.</div><div>o=gsclient 8000 8000 IN IP4 192.168.0.106.</div><div>s=SIP Call.</div><div>c=IN IP4 192.168.0.106.</div>
<div>t=0 0.</div><div>m=audio 5026 RTP/AVP 0 13.</div><div>a=sendrecv.</div><div>a=rtpmap:0 PCMU/8000.</div><div>a=ptime:20.</div><div>m=audio 0 RTP/SAVPF 111 103 104 0 8 106 105 13 126.</div><div><br></div><div><br></div>
<div>T 2014/04/01 20:03:46.051127 <a href="http://1.1.1.1:5060">1.1.1.1:5060</a> -> <a href="http://2.2.2.2:38986">2.2.2.2:38986</a> [AP]</div><div>.~.dSIP/2.0 200 OK.</div><div>Via: SIP/2.0/WS kj59uak271em.invalid;rport=38986;received=2.2.2.2;branch=z9hG4bK9891267.</div>
<div>Record-Route: <sip:1.1.1.1;r2=on;lr=on;nat=yes>.</div><div>Record-Route: <sip:1.1.1.1;transport=ws;r2=on;lr=on;nat=yes>.</div><div>From: <<a href="mailto:sip%3Awsclient@testers.com">sip:wsclient@testers.com</a>>;tag=hhcd99tmvm.</div>
<div>To: <<a href="mailto:sip%3Agsclient@testers.com">sip:gsclient@testers.com</a>>;tag=fb215901a251c9a0.</div><div>Call-ID: 1dluvk38g1j22fn96t4b.</div><div>CSeq: 7237 INVITE.</div><div>User-Agent: Grandstream GXP2000 1.2.2.26.</div>
<div>Contact: <sip:gsclient@192.168.0.106:5066;transport=udp>.</div><div>Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE.</div><div>Content-Type: application/sdp.</div><div>Supported: replaces, timer.</div>
<div>Content-Length: 216.</div><div>.</div><div>v=0.</div><div>o=gsclient 8000 8000 IN IP4 192.168.0.106.</div><div>s=SIP Call.</div><div>c=IN IP4 192.168.0.106.</div><div>t=0 0.</div><div>m=audio 5026 RTP/AVP 0 13.</div>
<div>a=sendrecv.</div><div>a=rtpmap:0 PCMU/8000.</div><div>a=ptime:20.</div><div>m=audio 0 RTP/SAVPF 111 103 104 0 8 106 105 13 126.</div></div><div><br></div><div><br></div><div>******************************************************************************<br>
</div><div><br></div><div><br></div><div><br></div><div>cheers,</div><div>Olli</div><div><br></div><div><br></div></div>