One way audio with Asterisk 15 and a WebRTC client


#1

I have two ways audio when calling from a WebRTC client to a mobile phone (through Asterisk), but when I call from the mobile phone to the WebRTC client the client rings, the call is established but there is only one way audio: from the WebRTC client to the mobile phone.

I’m using Asterisk 15.6.1 installed on a VPS with a static IP, the WebRTC client is a browser softphone using the SIP.js library, and I have a local phone number from Localphone.

I enabled debug logging in “logger.conf” but the log doesn’t show any errors.

Your help will be greately appreciated !


#2

I’ve been struggling to solve this problem for a week. I’ve made all possible combinations of settings in “pjsip.conf”. The result is the same: two ways audio when calling from the browser to the PSTN and one way audio when calling from the PSTN to the browser.

My debug lines look like:

<— Received SIP request (428 bytes) from WSS:152.231.162.25:53283 —>
BYE sip:asterisk @ mail . example . com:5060;transport=ws SIP/2.0
Via: SIP/2.0/WSS qae9g3ug98cm.invalid;branch=z9hG4bK8418203
Max-Forwards: 70
To: <sip:10782172281 @ mail . example . com>;tag=46b408fd-815a-49c1-b337-74ee894d6e44
From: “Grant Brandon” <sip:6l78pghi @ 152.231.162.25>;tag=1l7sldm3o2
Call-ID: 4b8d773b-243b-4e97-9962-efc4d55eb0de
CSeq: 27946 BYE
Supported: outbound
User-Agent: SIP.js/0.7.8
Content-Length: 0

<— Transmitting SIP response (376 bytes) to WSS:152.231.162.25:53283 —>
SIP/2.0 200 OK
Via: SIP/2.0/WSS qae9g3ug98cm.invalid;rport=53283;received=152.231.162.25;branch=z9hG4bK8418203
Call-ID: 4b8d773b-243b-4e97-9962-efc4d55eb0de
From: “Grant Brandon” <sip: 6l78pghi @ 152.231.162.25>;tag=1l7sldm3o2
To: <sip:10782172281 @ mail . example . com>;tag=46b408fd-815a-49c1-b337-74ee894d6e44
CSeq: 27946 BYE
Server: Asterisk PBX 15.6.1
Content-Length: 0

– Channel PJSIP/601-00000003 left ‘simple_bridge’ basic-bridge
– Channel PJSIP/localphone-00000002 left ‘simple_bridge’ basic-bridge
== Spawn extension (localphone-pjsip, 601, 1) exited non-zero on ‘PJSIP/localphone-00000002’
<— Transmitting SIP request (487 bytes) to UDP:140.153.72.56:5060 —>
BYE sip:126.219.52.41;vbdid=941.29056c13 SIP/2.0
Via: SIP/2.0/UDP 136.46.324.75:5060;rport;branch=z9hG4bKPjf05b6f33-c9d2-4606-80d5-1e54fc110d40
From: <sip:13051079265 @ localphone . com>;tag=514dc3ba-68ed-42ff-9733-bd65b8ebb7c7
To: <sip:10782172281 @ 126.219.52.41>;tag=gK086bb5a7
Call-ID: 793253110_109248450 @ 199.199.12.56
CSeq: 13266 BYE
Route: sip:140.153.72.56;lr;ftag=gK086bb5a7
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: Asterisk PBX 15.6.1
Content-Length: 0

<— Received SIP response (335 bytes) from UDP:140.153.72.56:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 136.46.324.75:5060;rport=5060;branch=z9hG4bKPjf05b6f33-c9d2-4606-80d5-1e54fc110d40
From: <sip:13051079265 @ localphone . com>;tag=514dc3ba-68ed-42ff-9733-bd65b8ebb7c7
To: <sip:10782172281 @ 126.219.52.41>;tag=gK086bb5a7
Call-ID: 793253110_109248450 @ 199.199.12.56
CSeq: 13266 BYE
Content-Length: 0

I replaced the real IP’s and phone numbers as follows:

VPS public IP: 136.46.324.75
Mobile phone: 10782172281
Local phone number (rented from Localphone): 13051079265
Localphone IP’s: 140.153.72.56, 126.219.52.41
WebRTC client IP: 152.231.162.25


#3

Nobody ???


#4

You haven’t included a relevant part of the SIP session.

My understanding is that that WebRTC is only suitable for people who are able to understand such traces themselves, as it is constantly changing and requires the integration of a large number of different technologies.


#5

@ david551 I only listed a small fragment of the SIP session because the forum wouldn’t let me enter all the text that I intended to list. When I was trying to save the post it kept sayng “Sorry, new users can only put 2 links in a post.” although I didn’t enter any link except ‘localphone.com’ which is just mentioned as a domain. That’s why I tried to rewrite what the forum considered links by entering spaces around dots. Anyway, the SIP session part before the lines listed above is the following:

<— Received SIP request (1175 bytes) from UDP:140.153.72.56:5060 —>
INVITE sip:136.46.324.75:5060 SIP/2.0
Record-Route: < sip:140.153.72.56;lr=on;ftag=gK086bb5a7 >
Record-Route: < sip:126.219.52.41;lr;ftag=gK086bb5a7 >
Via: SIP/2.0/UDP 140.153.72.56;branch=z9hG4bK356c.5360dbb7.0
Via: SIP/2.0/UDP 126.219.52.41:5060;rport=5060;branch=z9hG4bK356c.10463da.0
From: < sip: 10782172281 @ 126.219.52.41 >;tag=gK086bb5a7
To: < sip: 13051079265 @ localphone . com >;tag=514dc3ba-68ed-42ff-9733-bd65b8ebb7c7
Call-ID: 793253110_109248450 @ 199.199.12.56
CSeq: 63984 INVITE
Max-Forwards: 12
Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH
Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed
Contact: < sip: 126.219.52.41;vbdid=941 . 29056c13 >
Supported: timer
Session-Expires: 1800;refresher=uac
Min-SE: 90
Content-Length: 239
Content-Disposition: session; handling=required
Content-Type: application/sdp

v=0
o=Sonus_UAC 13229 650067 IN IP4 199.199.12.56
s=SIP Media Capabilities
c=IN IP4 199.199.12.54
t=0 0
m=audio 40808 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-15
a=sendrecv
a=maxptime:20

0x7fddf001b170 – Strict RTP learning after remote address set to: 199.199.12.54:40808
<— Transmitting SIP response (1062 bytes) to UDP: 140.153.72.56:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 140.153.72.56;rport=5060;received=140.153.72.56;branch=z9hG4bK356c . 5360dbb7 . 0
Via: SIP/2.0/UDP 126.219.52.41:5060;rport=5060;branch=z9hG4bK356c .10463da . 0
Record-Route: < sip: 140.153.72.56;lr;ftag=gK086bb5a7 >
Record-Route: < sip: 126.219.52.41;lr;ftag=gK086bb5a7 >
Call-ID: 793253110_109248450 @ 199.199.12.56
From: < sip: 10782172281 @ 126.219.52.41 >;tag=gK086bb5a7
To: < sip: 13051079265 @ localphone . com >;tag=514dc3ba-68ed-42ff-9733-bd65b8ebb7c7
CSeq: 63984 INVITE
Session-Expires: 1800;refresher=uac
Require: timer
Contact: < sip: 136.46.324.75 : 5060 >
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub
Server: Asterisk PBX 15.6.1
Content-Type: application/sdp
Content-Length: 234

v=0
o=- 13229 650069 IN IP4 136.46.324.75
s=Asterisk
c=IN IP4 136.46.324.75
t=0 0
m=audio 10010 RTP/AVP 0 100
a=rtpmap:0 PCMU/8000
a=rtpmap:100 telephone-event/8000
a=fmtp:100 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

0x7fddf001b170 – Strict RTP switching to RTP target address 199.199.12.54:40808 as source
<— Received SIP request (411 bytes) from UDP:140.153.72.56:5060 —>
ACK sip:136.46.324.75:5060 SIP/2.0
Via: SIP/2.0/UDP 140.153.72.56;branch=z9hG4bK356c . 5360dbb7.2
Via: SIP/2.0/UDP 126.219.52.41:5060;rport=5060;branch=z9hG4bK356c.10463da.2
From: < sip: 10782172281 @ 126.219.52.41 >;tag=gK086bb5a7
To: < sip: 13051079265 @ localphone . com >;tag=514dc3ba-68ed-42ff-9733-bd65b8ebb7c7
Call-ID: 793253110_109248450 @ 199.199.12.56
CSeq: 63984 ACK
Max-Forwards: 12
Content-Length: 0