No Audio During Calls

There’s absolutely no audio whatsoever when the calls are answered. I tried looking up old community threads and following their solutions to similar problem but it didn’t work.

Here are my configs:

=========PJSIP.CONF=========

[global]
type=global

[0.0.0.0-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060
external_media_address=xxx.xx.xx.xx
external_signaling_address=xxx.xxx.xxx.xxx
allow_reload=no
tos=cs3
cos=3
local_net=xx.xx.xx.xx/24


[VoIPVoIP-auth]
type = auth
auth_type = userpass
username = 5551231234
password = nottellingyou      ; your VoIPVoIP password

[VoIPVoIP-aor]
type = aor
contact = sip:sip3.voipvoip.com ; SIP trunk provider's URI

; Add any other AOR settings here if needed

[VoIPVoIP]
type = aor
contact = sip:sip3.voipvoip.com ; SIP trunk provider's URI

; Add any other AOR settings here if needed

[VoIPVoIP-endpoint]
type = endpoint
context = from-trunk
transport = 0.0.0.0-udp
dtmf_mode = rfc4733
disallow = all
allow = ulaw
allow = alaw
aors = VoIPVoIP-aor
auth = VoIPVoIP-auth
outbound_auth = VoIPVoIP-auth
outbound_proxy = sip:sip3.voipvoip.com  ; Replace with your SIP trunk provider's URI
from_domain = sip3.voipvoip.com         ; Replace with your SIP trunk provider's domain
from_user = 5551231234

[VoIPVoIP-registration]
type=registration
transport=0.0.0.0-udp ; Replace with your transport configuration
outbound_auth=VoIPVoIP-auth
server_uri=sip:sip3.voipvoip.com ; SIP trunk provider's URI
client_uri=sip:5551231234@sip3.voipvoip.com ; Your VoIPVoIP account URI
retry_interval=60 ; You can adjust this retry interval as needed
forbidden_retry_interval=300 ; You can adjust this retry interval as needed
fatal_retry_interval=3600 ; You can adjust this retry interval as needed


[VoIPVoIP-identify]
type=identify
endpoint=VoIPVoIP-endpoint
match=sip3.voipvoip.com



; Add any other endpoint settings here if needed


;--------------------------
;       ENDPOINT TEMPLATE
;--------------------------

[endpoint-basic](!)
type=endpoint
transport=0.0.0.0-udp
context=from-internal
disallow=all
allow=ulaw
allow=alaw
direct_media=no

[auth-userpass](!)
type=auth
auth_type=userpass
password=asimplepass

[aor-single-reg](!)
type=aor
max_contacts=1

;---------------------
;       EXTENSION 7001
;---------------------

[7001](endpoint-basic)
callerid= "7001" <7001>
auth= 7001
aors=7001

[7001](auth-userpass)
username=7001

[7001](aor-single-reg)
max_contacts=2
======Extensions.conf======
[from-trunk]
exten => _+1NXXXXXXXXX,1,Dial(PJSIP/${EXTEN})

[from-internal]
exten => 7001,1,Dial(PJSIP/7001)
exten => _NXXNXXXXXX,1,Set(CALLERID(all)="Bob" <+15551231234>)
same => n,Dial(PJSIP/+1${EXTEN}@VoIPVoIP-endpoint)
same => n(end),Hangup()

exten => *764,1,Verbose(2, Run CURL to get IP address from whatismyip.org)
same => n,Answer()
same => n,Set(MyIPAddressIs=${CURL(https://ipinfo.io/ip)})
same => n,SayAlpha(${MyIPAddressIs})
same => n,Hangup()

Here are the logs from asterisk:

<--- Received SIP request (1039 bytes) from UDP:123.253.126.112:48021 --->
INVITE sip:*764@13.200.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.69.139:48021;branch=z9hG4bK-524287-1---00b1b060c4c9e11c;rport
Max-Forwards: 70
Contact: <sip:7001@123.253.126.112:48021;transport=UDP>
To: <sip:*764@13.200.0.116:5060>
From: <sip:7001@13.200.0.116:5060;transport=UDP>;tag=e2b9376c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.6.1 v2.10.19.9
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 345

v=0
o=Z 0 8186526 IN IP4 123.253.126.112
s=Z
c=IN IP4 123.253.126.112
t=0 0
m=audio 55370 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux

<--- Transmitting SIP response (520 bytes) to UDP:123.253.126.112:48021 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.69.139:48021;rport=48021;received=123.253.126.112;branch=z9hG4bK-524287-1---00b1b060c4c9e11c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
From: <sip:7001@13.200.0.116>;tag=e2b9376c
To: <sip:*764@13.200.0.116>;tag=z9hG4bK-524287-1---00b1b060c4c9e11c
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1694502789/91bee1f23b868e84caa4917b5e5bd8b9",opaque="2445d21d6c9e2309",algorithm=md5,qop="auth"
Server: Asterisk PBX certified-18.9-cert5
Content-Length:  0

<--- Received SIP request (361 bytes) from UDP:123.253.126.112:48021 --->
ACK sip:*764@13.200.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.69.139:48021;branch=z9hG4bK-524287-1---00b1b060c4c9e11c;rport
Max-Forwards: 70
To: <sip:*764@13.200.0.116>;tag=z9hG4bK-524287-1---00b1b060c4c9e11c
From: <sip:7001@13.200.0.116:5060;transport=UDP>;tag=e2b9376c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 1 ACK
Content-Length: 0

<--- Received SIP request (1341 bytes) from UDP:123.253.126.112:48021 --->
INVITE sip:*764@13.200.0.116:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.69.139:48021;branch=z9hG4bK-524287-1---37fc8780c0cd6ea0;rport
Max-Forwards: 70
Contact: <sip:7001@123.253.126.112:48021;transport=UDP>
To: <sip:*764@13.200.0.116:5060>
From: <sip:7001@13.200.0.116:5060;transport=UDP>;tag=e2b9376c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.6.1 v2.10.19.9
Authorization: Digest username="7001",realm="asterisk",nonce="1694502789/91bee1f23b868e84caa4917b5e5bd8b9",uri="sip:*764@13.200.0.116:5060;transport=UDP",response="c3e8f1441d441469a6e9aa5c89a7fb31",cnonce="ca8e6eca5508a4db8dc2165055842a64",nc=00000001,qop=auth,algorithm=md5,opaque="2445d21d6c9e2309"
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 345

v=0
o=Z 0 8186526 IN IP4 123.253.126.112
s=Z
c=IN IP4 123.253.126.112
t=0 0
m=audio 55370 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:

106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux

<--- Transmitting SIP response (328 bytes) to UDP:123.253.126.112:48021 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.69.139:48021;rport=48021;received=123.253.126.112;branch=z9hG4bK-524287-1---37fc8780c0cd6ea0
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
From: <sip:7001@13.200.0.116>;tag=e2b9376c
To: <sip:*764@13.200.0.116>
CSeq: 2 INVITE
Server: Asterisk PBX certified-18.9-cert5
Content-Length:  0

-- Executing [*764@from-internal:1] Verbose("PJSIP/7001-00000004", "2, Run CURL to get IP address from whatismyip.org") in new stack
== Run CURL to get IP address from whatismyip.org
-- Executing [*764@from-internal:2] Answer("PJSIP/7001-00000004", "") in new stack
> 0x7f03402b1bf0 -- Strict RTP learning after remote address set to: 123.253.126.112:55370

<--- Transmitting SIP response (843 bytes) to UDP:123.253.126.112:48021 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.69.139:48021;rport=48021;received=123.253.126.112;branch=z9hG4bK-524287-1---37fc8780c0cd6ea0
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
From: <sip:7001@13.200.0.116>;tag=e2b9376c
To: <sip:*764@13.200.0.116>;tag=f055df3f-101d-4153-a460-d109a8251b11
CSeq: 2 INVITE
Server: Asterisk PBX certified-18.9-cert5
Contact: <sip:13.200.0.116:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length:   251

v=0
o=- 0 8186528 IN IP4 113.200.0.116
s=Asterisk
c=IN IP4 113.200.0.116
t=0 0
m=audio 10324 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP request (413 bytes) from UDP:123.253.126.112:48021 --->
ACK sip:13.200.0.116:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.69.139:48021;branch=z9hG4bK-524287-1---0dc97e05a774ccc6;rport
Max-Forwards: 70
Contact: <sip:7001@123.253.126.112:48021;transport=UDP>
To: <sip:*764@13.200.0.116>;tag=f055df3f-101d-4153-a460-d109a8251b11
From: <sip:7001@13.200.0.116>;tag=e2b9376c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 2 ACK
User-Agent: Z 5.6.1 v2.10.19.9
Content-Length: 0

-- Executing [*764@from-internal:3] Set("PJSIP/7001-00000004", "MyIPAddressIs=13.200.0.116")

 in new stack
-- Executing [*764@from-internal:4] SayAlpha("PJSIP/7001-00000004", "13.200.0.116") in new stack
-- <PJSIP/7001-00000004> Playing 'digits/1.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/3.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'letters/dot.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/2.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/0.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/0.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'letters/dot.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/0.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'letters/dot.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/1.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/1.ulaw' (language 'en')
-- <PJSIP/7001-00000004> Playing 'digits/6.ulaw' (language 'en')
-- Executing [*764@from-internal:5] Hangup("PJSIP/7001-00000004", "") in new stack
== Spawn extension (from-internal, *764, 5) exited non-zero on 'PJSIP/7001-00000004'

<--- Transmitting SIP request (415 bytes) to UDP:123.253.126.112:48021 --->
BYE sip:7001@123.253.126.112:48021 SIP/2.0
Via: SIP/2.0/UDP 13.200.0.116:5060;rport;branch=z9hG4bKPj820cec9c-1758-4426-b57e-c03c810731d6
From: <sip:*764@13.200.0.116>;tag=f055df3f-101d-4153-a460-d109a8251b11
To: <sip:7001@13.200.0.116>;tag=e2b9376c
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 1890 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: Asterisk PBX certified-18.9-cert5
Content-Length:  0

<--- Received SIP response (391 bytes) from UDP:123.253.126.112:48021 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 13.200.0.116:5060;rport=5060;branch=z9hG4bKPj820cec9c-1758-4426-b57e-c03c810731d6
Contact: <sip:7001@123.253.126.112:48021;transport=UDP>
To: <sip:7001@13.200.0.116>;tag=e2b9376c
From: <sip:*764@13.200.0.116>;tag=f055df3f-101d-4153-a460-d109a8251b11
Call-ID: bHLPqQ0w0q5Ha2a8qFpXPg..
CSeq: 1890 BYE
User-Agent: Z 5.6.1 v2.10.19.9
Content-Length: 0

@jcolp please help!

Please do not tag me directly. If I have anything to add to threads, then I post.

Wireshark logs:

Asterisk Logs:

Maybe NAT problem

As asterisk is sending RTP your problem lies on your network configuration. Are you able to traceroute to 123.253.126.112 ?

@tootai

yes,

I tried every solution(related to no audio) mentioned on asterisk community threads , nothing works. I’m clueless as to what’s wrong

Asterisk output without RTP DEBUG:

Have you try on Wireshark logs to play capture stream??
You can listen and check if streams go to the right way.

Please, no screenshots.

Your traceroute doesn’t show that other end is up. If you register to the same address it’s OK.

You should tcpdump your outgoing RTP packets on your WAN router to see if they leave your network.
If yes, problem is outside your network or on your router firewall on incoming packets.

@tootai @Rmcgrath

I have attached a screenshot of wireshark above which shows that 192.168.1.200 (me/source) and destination

@tootai @Rmcgrath

Also I tested using tcpdump getting the same output as mentioned above. source (192.168.1.200) and destination (13.200.0.116) UDP packets are being sent.

With Wireshark you can see in details and play both channel audio path.
It only needs to open capture packet file and go to telephony and VOIP calls item.

If you are behind NAT, the RTP ports selected by Asterisk might not be what actually arrives at the telco. You might want to try a public IP address directly on your PBX.

So i checked ports :-

TCPDUMP of call (Asterisk server to softphone )

User Datagram Protocol, Src Port: 17098, Dst Port: 58624
    Source Port: 17098
    Destination Port: 58624
    Length: 180
    Checksum: 0xd13a [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
    [Timestamps]
    UDP payload (172 bytes)

TCPDUMP From my pc where softphone is running :-

User Datagram Protocol, Src Port: 54558, Dst Port: 19196
    Source Port: 54558
    Destination Port: 19196
    Length: 21
    Checksum: 0x9bd9 [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
    [Timestamps]
    UDP payload (13 bytes)

Are those capture from a call between both ends ? If yes, it can’t work, your src and dst port doesn´t match between them.

Yes, it’s a capture from both ends. How do I solve it ?

I tried adding these and other nat related solutions mentioned on community threads to my endpoints :-

rewrite_contact=yes
direct_media=no
force_rport=yes
rtp_symmetric=yes

it didn’t solve it. I’m using zoiper , checked the settings of zoiper aswell . Nothing out of the order.

What device (firewall?) is sitting in between Asterisk and Zoiper? Do you have control over this device? What are the IPs (not just the ports) involved?

I tried using zoiper from my mobile aswell , same problem no audio and for the PC that I’m currently running zoiper on ,I do have control over it and the router aswell. Earlier when I used chan_sip it was working fine , after switching to pjsip I’m facing this problem.