One-way audio during outbound calls

Hello All,

I have an Asterisk 16 installation which is running behind a TD-LTE modem-router. I have a DID from my ISP which is configured as a SIP trunk (chan_sip). I have set RTP port range to 7000-20000 in Asterisk also have forwarded this port range in my router.

Incoming calls from trunk work well. However when dial an outside number, only outgoing audio is working and incoming audio does not touch my softphone. My extension is an IAX2 type to avoid NAT traversal issues as both Asterisk and softphones are behind NAT but inside different networks. Also using IAX2 solved my security problem where SIP scanners were trying to scan and extensions so I have only white-listed my ISP’s VoIP server.
Bellow is my trunk config as Asterisk general and SIP config:

sip.conf:
[global]
type=global
user_agent=FPBX-15.0.16.38(16.7.0)
default_outbound_endpoint=dpma_endpoint
endpoint_identifier_order=ip,username,anonymous,header,auth_username

sip_additional.conf (trunk config):[2191012100]
type=user
secret=mysecret
context=from-trun

[Asiatel-021]
username=2191012100
type=friend
secret=mysecret
qualify=yes
nat=force_rport,comedia
insecure=port,invite
host=185.98.113.122
fromuser=2191012100
context=from-trunk
allow=all
nat=force_rport,comedia

sip_general_additional.confaccept_outofcall_message=yes
auth_message_requests=no
outofcall_message_context=dpma_message_context
faxdetect=no
vmexten=*97
useragent=FPBX-15.0.16.38(16.7.0)
language=fa
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g726
allow=g722
allow=g723
allow=g719
allow=g729
allow=slin
allow=slin12
allow=slin16
allow=slin24
allow=slin32
allow=slin44
allow=slin48
allow=slin96
allow=slin192
allow=opus
allow=speex
allow=speex16
allow=speex32
allow=siren7
allow=adpcm
allow=silk8
allow=silk12
allow=silk16
allow=silk24
allow=lpc10
allow=testlaw
allow=none
allow=ilbc
allow=codec2
allow=siren14
context=from-sip-external
callerid=Unknown
notifyringing=yes
notifyhold=yes
tos_sip=cs3
tos_audio=ef
tos_video=af41
alwaysauthreject=yes
limitonpeers=yes
icesupport=no
rtpend=20000
context=from-trunk
callerid=Unknown
rtpstart=7000
tcpenable=yes
callevents=yes
jbenable=yes
jblog=no
jbimpl=adaptive
jbforce=yes
jbmaxsize=200
jbresyncthreshold=1000
checkmwi=10
maxexpiry=3600
minexpiry=60
srvlookup=no
tlsenable=no
allowguest=yes
notifyhold=yes
rtptimeout=10
canreinvite=yes
tlsbindaddr=[::]:5161
rtpkeepalive=10
videosupport=no
defaultexpiry=120
notifyringing=yes
maxcallbitrate=384
rtpholdtimeout=300
g726nonstandard=no
registertimeout=20
tlsclientmethod=tlsv1
registerattempts=0
nat=force_rport,comedia
ALLOW_SIP_ANON=no
udpbindaddr=0.0.0.0:5060
tlscafile=/etc/ssl/certs/ca-certificates.crt
externip=MyIP
localnet=192.168.1.0/24

Your help is appreciated

Any idea? Anything wrong with my config?

Anyone here to help solve this issue?

First, I think that is way too many codecs to accept. You might try picking 3-4 instead.

If that doesn’t fix it, then you could try sending some RTP right away by Answer()'ing the call before you Dial() out – at least as a test.

Make sure audio is going to/from Asterisk and to/from the endpoint on the negotiated host:port. You can do this by getting pcap of the call scenario and check what codecs get negotiated and what host:port audio will be going to and coming from.

Then enable rtp debug in Asterisk:

*CLI> rtp set debug on

And compare the ports for incoming, and outgoing audio to make sure audio is flowing to/from the expected ports using the negotiated codecs.

Note you can turn rtp debugging off using the following:

*CLI> rtp set debug off

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