Sipjs and asterisk sound call do not sound

I am using sipjs version 0.7.5 and asterisk 13.12.1 for an established call between two sipjs calls via webRTC. The sipjs client and the asterisk server are on the local network. I give an asterisk of the logs of both sip messages and rtp packets below:

My problem is with the magazine. I see that an RTP packet is being sent to both ends via ICE. but no sound is played in the client’s browser. those. there is no sound in the browser.

<--- SIP read from WS:192.168.40.48:10380 ---> INVITE sip: 1063@192.168.40.45 :5060 SIP/2.0 Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627 Max-Forwards: 70 To: <sip: 1063@192.168.40.45 :5060> From: "1062" <sip: 1062@192.168.40.45 :5060>;tag=dc2e904hed Call-ID: iu2sjhg9scpcrir0slju CSeq: 8911 INVITE Contact: <sip: haitt3bm@192.0.2.208 ;transport=ws;ob> Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Content-Type: application/sdp Supported: outbound User-Agent: SIP.js/0.7.5 Content-Length: 1220 v=0 o=mozilla...THIS_IS_SDPARTA-49.0.2 2371358821422302787 0 IN IP4 0.0.0.0 s=- t=0 0 a=sendrecv a=fingerprint:sha-256 DD:4B:CC:5D:70:15:CE:34:6B:A7:AF:2A:F8:AA:E8:B8:00:C3:28:F6:C8:9C:03:F5:E6:69:04:D6:81:11:3B:85 a=ice-options:trickle a=msid-semantic:WMS * m=audio 55294 UDP/TLS/RTP/SAVPF 109 9 0 8 c=IN IP4 192.168.35.1 a=candidate:0 1 UDP 2122252543 192.168.35.1 55294 typ host a=candidate:1 1 UDP 2122187007 192.168.221.1 55295 typ host a=candidate:2 1 UDP 2122121471 192.168.40.48 55296 typ host a=candidate:0 2 UDP 2122252542 192.168.35.1 55297 typ host a=candidate:1 2 UDP 2122187006 192.168.221.1 55298 typ host a=candidate:2 2 UDP 2122121470 192.168.40.48 55299 typ host a=sendrecv a=end-of-candidates a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=fmtp:109 maxplaybackrate=48000;stereo=1 a=ice-pwd:43428b6027fb801be25dae4fdf05981a a=ice-ufrag:84b4daa9 a=mid:sdparta_0 a=msid:{aaa3da10-5310-4167-b4b7-8328a8e5ba84} {4bee853d-06c4-4bfd-ae69-319a1994c844} a=rtcp:55297 IN IP4 192.168.35.1 a=rtcp-mux a=rtpmap:109 opus/48000/2 a=rtpmap:9 G722/8000/1 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=setup:actpass a=ssrc:1072212720 cname:{a978e140-65a4-49e8-bb8b-2273ab1b6026} <-------------> --- (13 headers 32 lines) --- Using INVITE request as basis request - iu2sjhg9scpcrir0slju Found peer '1062' for '1062' from 192.168.40.48:10380 == DTLS ECDH initialized (automatic), faster PFS enabled == DTLS ECDH initialized (automatic), faster PFS enabled == Using SIP VIDEO CoS mark 6 == Using SIP RTP CoS mark 5 [Nov 2 10:07:30] NOTICE[64407][C-00000008]: chan_sip.c:10315 process_sdp: Received SAVPF profle in audio offer but AVPF is not enabled, enabling: audio 55294 UDP/TLS/RTP/SAVPF 109 9 0 8 Found RTP audio format 109 Found RTP audio format 9 Found RTP audio format 0 Found RTP audio format 8 Found audio description format opus for ID 109 Found audio description format G722 for ID 9 Found audio description format PCMU for ID 0 Found audio description format PCMA for ID 8 Capabilities: us - (ulaw|alaw|gsm|h263), peer - audio=(ulaw|alaw|g722|opus)/video=(nothing)/text=(nothing), combined - (ulaw|alaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x0 (nothing), combined - 0x0 (nothing) Peer audio RTP is at port 192.168.35.1:55294 Peer doesn't provide video Looking for 1063 in default (domain 192.168.40.45) sip_route_dump: route/path hop: <sip: haitt3bm@192.0.2.208 ;transport=ws;ob> <--- Transmitting (no NAT) to 192.168.40.48:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48 From: "1062" <sip: 1062@192.168.40.45 :5060>;tag=dc2e904hed To: <sip: 1063@192.168.40.45 :5060> Call-ID: iu2sjhg9scpcrir0slju CSeq: 8911 INVITE Server: Asterisk PBX 13.12.1 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Contact: <sip: 1063@192.168.40.45 :5060;transport=WS> Content-Length: 0 <------------> -- Executing [ 1063@default :1] Dial("SIP/1062-00000010", "SIP/1063") in new stack == DTLS ECDH initialized (automatic), faster PFS enabled == DTLS ECDH initialized (automatic), faster PFS enabled == Using SIP VIDEO CoS mark 6 == Using SIP RTP CoS mark 5 Audio is at 14284 Adding codec ulaw to SDP Adding codec alaw to SDP Adding codec gsm to SDP Adding non-codec 0x1 (telephone-event) to SDP Reliably Transmitting (no NAT) to 192.168.40.48:10383: INVITE sip: thqqcmh6@192.0.2.218 ;transport=ws SIP/2.0 Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747 Max-Forwards: 70 From: "1062" <sip: 1062@192.168.40.45 >;tag=as0cfcb1f6 To: <sip: thqqcmh6@192.0.2.218 ;transport=ws> Contact: <sip: 1062@192.168.40.45 :5060;transport=WS> Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290@192.168.40.45 :5060 CSeq: 102 INVITE User-Agent: Asterisk PBX 13.12.1 Date: Wed, 02 Nov 2016 04:07:32 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Content-Type: application/sdp Content-Length: 878 v=0 o=root 1773642892 1773642892 IN IP4 192.168.40.45 s=Asterisk PBX 13.12.1 c=IN IP4 192.168.40.45 t=0 0 m=audio 14284 RTP/SAVP 0 8 3 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=maxptime:150 a=ice-ufrag:72465290354ec1f13cdfbb24592c36f1 a=ice-pwd:2e3f757f3f18a66e4ce88b32509c65d3 a=candidate:Hc0a8282d 1 UDP 2130706431 192.168.40.45 14284 typ host a=candidate:Sb6a06f32 1 UDP 1694498815 182.160.111.50 14284 typ srflx raddr 192.168.40.45 rport 14284 a=candidate:Hc0a8282d 2 UDP 2130706430 192.168.40.45 14285 typ host a=candidate:Sb6a06f32 2 UDP 1694498814 182.160.111.50 14285 typ srflx raddr 192.168.40.45 rport 14285 a=connection:new a=setup:actpass a=fingerprint:SHA-256 4B:8C:EF:A9:7A:59:B0:3A:73:B2:BF:70:4D:EC:94:B4:03:BD:FA:5C:E0:50:F8:CD:5B:52:CC:21:5E:D2:32:D4 a=sendrecv --- -- Called SIP/1063 <--- SIP read from WS:192.168.40.48:10383 ---> SIP/2.0 100 Trying Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747 To: <sip: thqqcmh6@192.0.2.218 ;transport=ws> From: "1062" <sip: 1062@192.168.40.45 >;tag=as0cfcb1f6 Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290@192.168.40.45 :5060 CSeq: 102 INVITE Supported: outbound User-Agent: SIP.js/0.7.5 Content-Length: 0 <-------------> --- (9 headers 0 lines) --- <--- SIP read from WS:192.168.40.48:10383 ---> SIP/2.0 180 Ringing Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747 To: <sip: thqqcmh6@192.0.2.218 ;transport=ws>;tag=iliacjnojs From: "1062" <sip: 1062@192.168.40.45 >;tag=as0cfcb1f6 Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290@192.168.40.45 :5060 CSeq: 102 INVITE Contact: <sip: thqqcmh6@192.0.2.218 ;transport=ws> Supported: outbound User-Agent: SIP.js/0.7.5 Content-Length: 0 <-------------> --- (10 headers 0 lines) --- sip_route_dump: route/path hop: <sip: thqqcmh6@192.0.2.218 ;transport=ws> -- SIP/1063-00000011 is ringing <--- Transmitting (no NAT) to 192.168.40.48:5060 ---> SIP/2.0 180 Ringing Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48 From: "1062" <sip: 1062@192.168.40.45 :5060>;tag=dc2e904hed To: <sip: 1063@192.168.40.45 :5060>;tag=as6443d323 Call-ID: iu2sjhg9scpcrir0slju CSeq: 8911 INVITE Server: Asterisk PBX 13.12.1 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Contact: <sip: 1063@192.168.40.45 :5060;transport=WS> Content-Length: 0 <------------> <--- SIP read from WS:192.168.40.48:10383 ---> SIP/2.0 200 OK Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK3f05c747 To: <sip: thqqcmh6@192.0.2.218 ;transport=ws>;tag=iliacjnojs From: "1062" <sip: 1062@192.168.40.45 >;tag=as0cfcb1f6 Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290@192.168.40.45 :5060 CSeq: 102 INVITE Contact: <sip: thqqcmh6@192.0.2.218 ;transport=ws> Allow: ACK,CANCEL,INVITE,MESSAGE,BYE,OPTIONS,INFO,NOTIFY,REFER Supported: outbound User-Agent: SIP.js/0.7.5 Content-Type: application/sdp Content-Length: 2050 v=0 o=- 8316228832686210830 2 IN IP4 127.0.0.1 s=- t=0 0 a=msid-semantic: WMS Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI m=audio 55300 UDP/TLS/RTP/SAVP 0 8 101 c=IN IP4 192.168.35.1 a=rtcp:55303 IN IP4 192.168.35.1 a=candidate:1468545711 1 udp 2122260223 192.168.35.1 55300 typ host generation 0 network-id 3 a=candidate:4198037383 1 udp 2122194687 192.168.221.1 55301 typ host generation 0 network-id 2 a=candidate:235970510 1 udp 2122129151 192.168.40.48 55302 typ host generation 0 network-id 1 network-cost 10 a=candidate:1468545711 2 udp 2122260222 192.168.35.1 55303 typ host generation 0 network-id 3 a=candidate:4198037383 2 udp 2122194686 192.168.221.1 55304 typ host generation 0 network-id 2 a=candidate:235970510 2 udp 2122129150 192.168.40.48 55305 typ host generation 0 network-id 1 network-cost 10 a=candidate:420202079 1 tcp 1518280447 192.168.35.1 9 typ host tcptype active generation 0 network-id 3 a=candidate:3032157047 1 tcp 1518214911 192.168.221.1 9 typ host tcptype active generation 0 network-id 2 a=candidate:1083401022 1 tcp 1518149375 192.168.40.48 9 typ host tcptype active generation 0 network-id 1 network-cost 10 a=candidate:420202079 2 tcp 1518280446 192.168.35.1 9 typ host tcptype active generation 0 network-id 3 a=candidate:3032157047 2 tcp 1518214910 192.168.221.1 9 typ host tcptype active generation 0 network-id 2 a=candidate:1083401022 2 tcp 1518149374 192.168.40.48 9 typ host tcptype active generation 0 network-id 1 network-cost 10 a=ice-ufrag:Y4fJ a=ice-pwd:v8rrrqGJU+aLsIg34kJbx9KL a=fingerprint:sha-256 E0:34:1F:A5:DC:CA:56:F1:D1:70:61:DD:7F:F6:7A:34:F0:D7:9D:53:EF:22:0C:AB:09:63:B9:F5:1F:63:E4:E3 a=setup:active a=mid:audio a=sendrecv a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=ssrc:4040961807 cname:zubAX2k8KRNEKsTO a=ssrc:4040961807 msid:Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI b17cfaa5-2826-4bce-9f23-be489c523d03 a=ssrc:4040961807 mslabel:Lezzrl9JzDRw0rDdgktZDKQiqy9HrSw4vQzI a=ssrc:4040961807 label:b17cfaa5-2826-4bce-9f23-be489c523d03 <-------------> --- (12 headers 33 lines) --- Found RTP audio format 0 Found RTP audio format 8 Found RTP audio format 101 Found audio description format PCMU for ID 0 Found audio description format PCMA for ID 8 Found audio description format telephone-event for ID 101 Capabilities: us - (ulaw|alaw|gsm|h263), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) Peer audio RTP is at port 192.168.35.1:55300 sip_route_dump: route/path hop: <sip: thqqcmh6@192.0.2.218 ;transport=ws> set_destination: Parsing <sip: thqqcmh6@192.0.2.218 ;transport=ws> for address/port to send to set_destination: URI is for WebSocket, we can't set destination Transmitting (no NAT) to 192.0.2.218:5060: ACK sip: thqqcmh6@192.0.2.218 ;transport=ws SIP/2.0 Via: SIP/2.0/WS 192.168.40.45:5060;branch=z9hG4bK52a8c1f1 Max-Forwards: 70 From: "1062" <sip: 1062@192.168.40.45 >;tag=as0cfcb1f6 To: <sip: thqqcmh6@192.0.2.218 ;transport=ws>;tag=iliacjnojs Contact: <sip: 1062@192.168.40.45 :5060;transport=WS> Call-ID: 30d68fec7f1ab1ad5f413e2031ad3290@192.168.40.45 :5060 CSeq: 102 ACK User-Agent: Asterisk PBX 13.12.1 Content-Length: 0 --- -- SIP/1063-00000011 answered SIP/1062-00000010 Audio is at 11134 Adding codec ulaw to SDP Adding codec alaw to SDP <--- Reliably Transmitting (no NAT) to 192.168.40.48:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK4771627;received=192.168.40.48 From: "1062" <sip: 1062@192.168.40.45 :5060>;tag=dc2e904hed To: <sip: 1063@192.168.40.45 :5060>;tag=as6443d323 Call-ID: iu2sjhg9scpcrir0slju CSeq: 8911 INVITE Server: Asterisk PBX 13.12.1 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer Contact: <sip: 1063@192.168.40.45 :5060;transport=WS> Content-Type: application/sdp Content-Length: 797 v=0 o=root 562796326 562796326 IN IP4 192.168.40.45 s=Asterisk PBX 13.12.1 c=IN IP4 192.168.40.45 t=0 0 m=audio 11134 RTP/SAVPF 0 8 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=maxptime:150 a=ice-ufrag:58d669ea38ed577755928de05ad017a0 a=ice-pwd:4513e77c0ac114a14e1f9a654764e1e9 a=candidate:Hc0a8282d 1 UDP 2130706431 192.168.40.45 11134 typ host a=candidate:Sb6a06f32 1 UDP 1694498815 182.160.111.50 11134 typ srflx raddr 192.168.40.45 rport 11134 a=candidate:Hc0a8282d 2 UDP 2130706430 192.168.40.45 11135 typ host a=candidate:Sb6a06f32 2 UDP 1694498814 182.160.111.50 11135 typ srflx raddr 192.168.40.45 rport 11135 a=connection:new a=setup:active a=fingerprint:SHA-256 4B:8C:EF:A9:7A:59:B0:3A:73:B2:BF:70:4D:EC:94:B4:03:BD:FA:5C:E0:50:F8:CD:5B:52:CC:21:5E:D2:32:D4 a=sendrecv <------------> -- Channel SIP/1063-00000011 joined 'simple_bridge' basic-bridge <047baea4-91e3-43fa-99ec-5b49d10b595c> -- Channel SIP/1062-00000010 joined 'simple_bridge' basic-bridge <047baea4-91e3-43fa-99ec-5b49d10b595c> > 0x7f243407b350 -- Probation passed - setting RTP source address to 192.168.40.48:55302 Got RTP packet from 192.168.40.48:55302 (type 00, seq 012779, ts 909638055, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012780, ts 909638215, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012781, ts 909638375, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012782, ts 909638535, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012783, ts 909638695, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012784, ts 909638855, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012785, ts 909639015, len 000160) <--- SIP read from WS:192.168.40.48:10380 ---> ACK sip: 1063@192.168.40.45 :5060;transport=ws SIP/2.0 Via: SIP/2.0/WS 192.0.2.208;branch=z9hG4bK6228050 Max-Forwards: 70 To: <sip: 1063@192.168.40.45 :5060>;tag=as6443d323 From: "1062" <sip: 1062@192.168.40.45 :5060>;tag=dc2e904hed Call-ID: iu2sjhg9scpcrir0slju CSeq: 8911 ACK Supported: outbound User-Agent: SIP.js/0.7.5 Content-Length: 0 <-------------> --- (10 headers 0 lines) --- Got RTP packet from 192.168.40.48:55302 (type 00, seq 012786, ts 909639175, len 000160) Sent RTP packet to 192.168.35.1:55294 (via ICE) (type 00, seq 006802, ts 909639168, len 000160) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012787, ts 909639335, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006803, ts 909639328, len 000170) > 0x7f24340788f0 -- Probation passed - setting RTP source address to 192.168.40.48:55296 Got RTP packet from 192.168.40.48:55296 (type 00, seq 029688, ts 3658919058, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024034, ts 3658919056, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012788, ts 909639495, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006804, ts 909639488, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029689, ts 3658919218, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024035, ts 3658919216, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012789, ts 909639655, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006805, ts 909639648, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029690, ts 3658919378, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024036, ts 3658919376, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012790, ts 909639815, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006806, ts 909639808, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029691, ts 3658919538, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024037, ts 3658919536, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012791, ts 909639975, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006807, ts 909639968, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029692, ts 3658919698, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024038, ts 3658919696, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012792, ts 909640135, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006808, ts 909640128, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029693, ts 3658919858, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024039, ts 3658919856, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012793, ts 909640295, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006809, ts 909640288, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029694, ts 3658920018, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024040, ts 3658920016, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012794, ts 909640455, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006810, ts 909640448, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029695, ts 3658920178, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024041, ts 3658920176, len 000170) Got RTP packet from 192.168.40.48:55302 (type 00, seq 012795, ts 909640615, len 000160) Sent RTP packet to 192.168.40.48:55296 (via ICE) (type 00, seq 006811, ts 909640608, len 000170) Got RTP packet from 192.168.40.48:55296 (type 00, seq 029696, ts 3658920338, len 000160) Sent RTP packet to 192.168.40.48:55302 (via ICE) (type 00, seq 024042, ts 3658920336, len 000170) 
+6
source share

Source: https://habr.com/ru/post/1011975/


All Articles