WebRTC (jsSIP) + Kamailio + Sofia -
Hi, For some time I'm struggling with missing audio between jsSIP ( https://tryit.jssip.net/ ) and FreeSwitch (Sofia). On Kamailio side I'm doing WSS <-> SIP/udp gateway and works like a charm together with RTPEngine. I've deciced to remove RTPEngine from setup and leave only kamailio in front of FreeSwitch as WSS-SIP gateway. I'm working on latest master (8df9ac43) Sofia profile settings: <param name="stun-enabled" value="true"/> <param name="apply-candidate-acl" value="localnet.auto"/> <param name="ext-rtp-ip" value="54.154.222.32"/> <param name="rtp-ip" value="$${local_ip_v4}"/> I originate call from Freeswitch to Kamailio with media_webrtc=true,rtcp_mux=1 On browser side I can see following Invite INVITE sip:fc6inuoq@p1ir3vbttphp.invalid;transport=ws SIP/2.0 Via: SIP/2.0/WS qa1-rtc.example.com:443 ;branch=z9hG4bKd523.0e53395c81c97731505d9a419e74277f.0 Max-Forwards: 69 From: <sip:9005551212@rd9liaa7lu.example.com>;tag=DrZQygUQ7tg3S To: <sip:calling-1@rd9liaa7lu.example.com> Call-ID: 6c33377c-6142-11e9-9a3a-b966c9f42136 CSeq: 3209884 INVITE Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY Supported: path, replaces Allow-Events: talk, hold, conference, refer Content-Type: application/sdp Content-Disposition: session Content-Length: 969 Remote-Party-ID: <sip:9005551212@10.23.253.61
;party=calling;screen=yes;privacy=off P-FS-IP: 10.23.253.61:3010 P-Asserted-Identity: <sip:9005551212@rd9liaa7lu.example.com> Contact: <sip:btpsh-5cb74b85-302b-e@qa1-rtc.example.com:443;transport=ws>
v=0 o=FreeSWITCH 1555495382 1555495383 IN IP4 54.154.222.32 s=FreeSWITCH c=IN IP4 54.154.222.32 t=0 0 a=msid-semantic: WMS x4bcMHQEW0SfVL62y1GNNQP1dDUnlcJI m=audio 31970 RTP/SAVPF 102 a=rtpmap:102 opus/48000/2 a=fmtp:102 useinbandfec=1; maxaveragebitrate=14400; maxplaybackrate=8000; ptime=20; minptime=10; maxptime=40 a=fingerprint:sha-256 8F:B3:EB:3D:C8:8C:9E:45:EC:EF:F7:E4:9F:DB:CC:DC:BC:E9:B7:08:20:DD:51:23:A0:07:C9:39:BF:2B:CF:9B a=setup:actpass a=rtcp-mux a=rtcp:31970 IN IP4 54.154.222.32 a=ssrc:3636203136 cname:6LLIjrc5iUa3v6VU a=ssrc:3636203136 msid:x4bcMHQEW0SfVL62y1GNNQP1dDUnlcJI a0 a=ssrc:3636203136 mslabel:x4bcMHQEW0SfVL62y1GNNQP1dDUnlcJI a=ssrc:3636203136 label:x4bcMHQEW0SfVL62y1GNNQP1dDUnlcJIa0 a=ice-ufrag:YsxB8dtcGdpSgZqc a=ice-pwd:B1KKjNGsyGlUD7Esp2To5dqC a=candidate:3449784969 1 udp 659136 54.154.222.32 31970 typ host generation 0 a=candidate:3449784969 2 udp 659136 54.154.222.32 31970 typ host generation 0 a=ptime:20 But jssip fails call with tryit-jssip.js:8 JsSIP:Transport sending message:SIP/2.0 408 RTP Timeout Via: SIP/2.0/WS qa1-rtc.crazy-calls.com:443 ;branch=z9hG4bKd523.0e53395c81c97731505d9a419e74277f.0 To: <sip:calling-1@rd9liaa7lu.crazycall.com>;tag=02uof1d2c1 From: <sip:9005551212@rd9liaa7lu.crazycall.com>;tag=DrZQygUQ7tg3S Call-ID: 6c33377c-6142-11e9-9a3a-b966c9f42136 CSeq: 3209884 INVITE Supported: timer,ice,replaces,outbound Content-Length: 0 +0ms while I can see UDP traffic hitting server from both IP's (running with VPN connected) 18:56:05.897282 IP ZZ.VV.199.228.51931 > 10.23.253.61.31970: UDP, length 108 18:56:05.997047 IP XX.YY.99.114.62790 > 10.23.253.61.31970: UDP, length 108 18:56:06.095205 IP ZZ.VV.199.228.51931 > 10.23.253.61.31970: UDP, length 108 18:56:06.229668 IP XX.YY.99.114.62790 > 10.23.253.61.31970: UDP, length 108 18:56:06.322814 IP ZZ.VV.199.228.51931 > 10.23.253.61.31970: UDP, length 108 18:56:06.423745 IP XX.YY.99.114.62790 > 10.23.253.61.31970: UDP, length 108 18:56:06.544214 IP ZZ.VV.199.228.51931 > 10.23.253.61.31970: UDP, length 108 When I put RTPEngine in a middle works perrfectly. Only difference I can see in SDP that in such case there is NO duplicated line with same candidate in SDP a=candidate:3449784969 1 udp 659136 54.154.222.32 31970 typ host generation 0 a=candidate:3449784969 2 udp 659136 54.154.222.32 31970 typ host generation 0 I've tried to put instead of fixed ip into ext-rtp-ip stun:stun:google.... but did not change anything. Do you have idea what might be wrong here?
participants (1)
-
Marcin Kowalczyk