No audio on one side sometimes

Hello,

I am having some trouble lately with some calls. I have an asterisk server up for some time now and everything seems fine for the most part, the server receives a call from a device and then places the call in a conference, then anyone (using chan_sip) can join in the conference via SIP.

The SIP extensions are on a Webrtc page using SIPml5 as the javascript library. There doesn’t seems to be any issues with the javascript implementation as I can see each and every SIP extension connected to the Asterisk server.

The issue is that sometimes there is no audio on the SIP side, the confbridge is recording the call so there is audio from the device side.

On my sip.conf we have this:
General:

[general]
externaddr=18.777.222.111
media_access=18.777.222.111
localnet=172.0.0.1/255.255.255.0
context=public
transport=udp,wss
allowguest=no
rtcp_mux=yes

And one sip extension:

[505]
    context=wrtc
host=dynamic
type=friend
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
canreinvite=no
disallow=all
allow=ulaw
transport=ws,wss,udp
force_avp=yes
nat=force_rport,comedia
qualify=yes
secret=password
dtlsenable=yes
dtlsverify=no
dtlscertfile=/usr/asterisk/etc/asterisk/keys/cert.crt
dtlsprivatekey=/usr/asterisk/etc/asterisk/keys/key.pem
dtlscafile=/usr/asterisk/etc/asterisk/keys/ca.crt
dtlssetup=actpass
srtpcapable=yes
videosupport=no

Every SIP extension registers on the server normally and I can check it using sip show peers. And for the most part, there is audio on the SIP side normally. Only lately I started hearing complaints that there is no audio on the call and it is not happening on everyone just some people, I haven’t changed anything on the sip.conf and on the sipml5 implementation.

I traced a log for when a SIP extension that is having the issue enters in the confbridge:

<------------>
[May 12 15:33:09] WARNING[24602] chan_sip.c: Retransmission timeout reached on transmission 1423023248-1701818430-818783292 for seqno 2 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32096ms with no response
[May 12 15:33:09] VERBOSE[24602] chan_sip.c: Really destroying SIP dialog '1423023248-1701818430-818783292' Method: INVITE
[May 12 15:33:09] VERBOSE[15903][C-001175db] pbx.c: Executing [001251997901667@wrtc:1] NoOp("SIP/505-000095e1", "WebRTC Mobile Phone call") in new stack
[May 12 15:33:09] VERBOSE[15903][C-001175db] pbx.c: Executing [001251997901667@wrtc:2] Set("SIP/505-000095e1", "TIMEOUT(absolute)=900") in new stack
[May 12 15:33:09] VERBOSE[15903][C-001175db] func_timeout.c: Channel will hangup at 2020-05-12 15:48:09.882 -03.
[May 12 15:33:09] VERBOSE[15903][C-001175db] pbx.c: Executing [001251997901667@wrtc:3] Set("SIP/505-000095e1", "VOLUME(RX)=2") in new stack
[May 12 15:33:09] VERBOSE[15903][C-001175db] pbx.c: Executing [001251997901667@wrtc:4] ConfBridge("SIP/505-000095e1", "001251997901667,,default_attendant") in new stack
[May 12 15:33:09] VERBOSE[15903][C-001175db] chan_sip.c: Audio is at 12678
[May 12 15:33:09] VERBOSE[15903][C-001175db] chan_sip.c: Adding codec ulaw to SDP
[May 12 15:33:09] VERBOSE[15903][C-001175db] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[May 12 15:33:09] VERBOSE[15903][C-001175db] chan_sip.c: 
<--- Reliably Transmitting (NAT) to 189.6.239.38:27884 --->
SIP/2.0 200 OK
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKNIoNQKBpz5tiqqxpQQge1yTmPyqHvZ4s;received=189.6.239.38;rport=27884
From: "Asterisk"<sip:505@tsc.asterisk.contactto.care>;tag=tZkZMpNgHsg5VnCIl7H4
To: <sip:001251997901667@https>;tag=as38e08609
Call-ID: d236f7b6-d458-76d6-8659-167e25c47553
CSeq: 16469 INVITE
Server: Asterisk PBX 13.26.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:001251997901667@18.231.143.52:0;transport=ws>
Content-Type: application/sdp
Content-Length: 837

v=0
o=root 2033887403 2033887403 IN IP4 18.231.143.52
s=Asterisk PBX 13.26.0
c=IN IP4 18.231.143.52
t=0 0
m=audio 12678 RTP/SAVPF 0 126
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:126 0-16
a=maxptime:150
a=ice-ufrag:38871064122319901ddd7d3a003d554d
a=ice-pwd:04a96405387f4c866a8b001c27d61219
a=candidate:Hac1f0b29 1 UDP 2130706431 172.31.11.41 12678 typ host
a=candidate:S12e78f34 1 UDP 1694498815 18.231.143.52 12678 typ srflx raddr 172.31.11.41 rport 12678
a=candidate:Hac1f0b29 2 UDP 2130706430 172.31.11.41 12679 typ host
a=candidate:S12e78f34 2 UDP 1694498814 18.231.143.52 12679 typ srflx raddr 172.31.11.41 rport 12679
a=connection:new
a=setup:active
a=fingerprint:SHA-256 A6:BE:EC:AC:33:5E:CB:CB:45:63:C3:D9:B4:08:44:E0:20:D8:E2:6D:D7:31:A5:9A:09:E7:EC:5B:9A:17:AC:42
a=rtcp-mux
a=sendrecv

<------------>
[May 12 15:33:09] VERBOSE[13951] chan_sip.c: 
<--- SIP read from WS:189.6.239.38:27884 --->
ACK sip:001251997901667@18.231.143.52;transport=ws SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKyGCgicCwBGBXNgPzvAfs;rport
From: "Asterisk"<sip:505@tsc.asterisk.contactto.care>;tag=tZkZMpNgHsg5VnCIl7H4
To: <sip:001251997901667@https>;tag=as38e08609
Contact: "Asterisk"<sips:505@df7jal23ls0d.invalid;rtcweb-breaker=no;click2call=no;transport=wss>
Call-ID: d236f7b6-d458-76d6-8659-167e25c47553
CSeq: 16469 ACK
Content-Length: 0
Route: <sip:tsc.asterisk.contactto.care:5060;lr;sipml5-outbound;transport=udp>
Max-Forwards: 70
Authorization: Digest username="505",realm="asterisk",nonce="73c17732",uri="sip:001251997901667@18.231.143.52;transport=ws",response="4ae01594da604138f14ee2e169141e6e",algorithm=MD5
User-Agent: IM-client/OMA1.0 sipML5-v1.0.0.0
Organization: xyz

<------------->
[May 12 15:33:09] VERBOSE[13951] chan_sip.c: --- (13 headers 0 lines) ---
[May 12 15:33:10] VERBOSE[15903][C-001175db] bridge_channel.c: Channel SIP/505-000095e1 joined 'softmix' base-bridge <690a6811-3d3f-4a11-9325-008e0e31ea78>
[May 12 15:33:10] VERBOSE[15841] file.c: <CBAnn/001251997901667-00001622;1> Playing 'confbridge-join.gsm' (language 'en')
[May 12 15:33:10] VERBOSE[24602] chan_sip.c: Really destroying SIP dialog 'dc7dcf4a-b352-4e03-60e4-f3f09670ce32' Method: REGISTER
[May 12 15:33:11] VERBOSE[16424] chan_sip.c: 
<--- SIP read from WS:189.42.19.226:25421 --->
REGISTER sip:https SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKsIDo3IrORk2cgNrt4MTkW2W0cy8ByzG4;rport
From: "Asterisk"<sip:300@tsc.asterisk.contactto.care>;tag=zV9dQLPhO8pdmIvL9eKl
To: "Asterisk"<sip:300@tsc.asterisk.contactto.care>
Contact: "Asterisk"<sips:300@df7jal23ls0d.invalid;rtcweb-breaker=no;transport=wss>;expires=200;click2call=no;+g.oma.sip-im;+audio;language="en,fr"
Call-ID: 5dd7c2d0-6f8e-c3d0-c2ea-89b501ed49cc
CSeq: 61907 REGISTER
Content-Length: 0
Route: <sip:tsc.asterisk.contactto.care:5060;lr;sipml5-outbound;transport=udp>
Max-Forwards: 70
Authorization: Digest username="300",realm="asterisk",nonce="7d73278f",uri="sip:https",response="b7ca31a6f5de3bad3064c3391eea7fc0",algorithm=MD5
User-Agent: IM-client/OMA1.0 sipML5-v1.0.0.0
Organization: xyz

Then nothing until the end of the call. When the SIP extension leaves the conference, the call ends, and the call ended when this extension left so there is connection between the SIP extension and the server, but there is no audio on the SIP side.

I tried disabling the windows defender, check if there is any popup/ad blockers or any antivirus chrome extension (firefox too) and putting this computer in DMZ but no audio on the SIP side.

When I log in this SIP extension on my network everything works fine, it seems to be only on the person’s network.

Is there something more I can do?

These messages appear at every call that succeeds in having audio.

Strict RTP learning after ICE completion
Strict RTP switching to RTP target address x.x.x.x:11995 as source
Strict RTP learning complete - Locking on source address x.x.x.x:11995

The second and third messages sometimes takes way too long to appear or, in some cases, never appear.

Okay, after some research and logging with my Wireshark I discovered what was causing the no audio in some connections.

My Asterisk version was 13.26 and the certfile from my CA got bigger because security. But because it got longer my Asterisk version couldn’t send it in a single TLS handshake packet and some connections were discarding the handshake and thus having no audio.

After updating to the version 13.33 all audio started working as intended… So, moral of the story, update your Asterisk minor version from time to time.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.