Asterisk-18 In and outgoing calls work but no audio

Here is my SiP conf file.

[voximplant]
dtmfmode=rfc2833
type=friend
fromdomain=ip.b24-1457-1644356757.bitrixphone.com
host=ip.b24-1457-1644356757.bitrixphone.com
fromuser=sip3
username=sip3
secret=sdewrd43f45ff

insecure=port,invite
context=public
allow=ulaw
qualify=yes

;incoming calls from sip trunk(124)
[124-user]
type=friend
username=124-user
secret=11111 ; Asterisk extension password
context=public ; Incoming calls context
nat=force_rport,comedia
qualify=yes

externip=196.0.0.0.0.

transport=udp
host=196.0.0.0.0.


;outgoing call
[tollfreeE1]
type=friend
username=142-user
insecure=port ; Asterisk extension password
context=public ; Incoming calls context
nat=force_rport,comedia
qualify=yes
transport=udp
externip=196.0.0.0.0.
;localnet=192.168.1.0/255.255.255.0
host=196..0.0.0

port=5060
[901]
type=friend
username=901
secret=oooo
context=internal
allow=ulaw
allow=alaw
host=dynamic
qualify=yes

[906]
type=friend
username=901
secret=ooooo
context=internal
allow=ulaw
allow=alaw
host=dynamic
qualify=yes

These are some of the options that affect NAT handling, when using chan_sip.

These are some of the options that affect NAT handling, when using chan_sip, some of these options are applied at a general level and others individually on peers

localnet=x.x.x.x/y
externadd=x.x.x.x
media_addres=x.x.x.x
nat=force_rport,comedia
;directmedia=no

How should i apply it in this case?

Here’s some information about it.
https://www.linuxjournal.com/article/9399

Anyway, you should give PJSIP a go!

This is not a general application recipe, you have to adapt each setting to the characteristics of your network. And please stay away from chan_sip, it will be difficult to get updated help if you use a protocol that is deprecated.

The thing is, everything was working until a week ago when it stopped audio from going through

Maybe your Asterisk configuration have not changed and that is the problem, looks like there is a change on the Network or one of the carrier, an external change that you didn’t realize, because things don’t stop working just because they do. And now you need to adapt Asterisk to your new network environment or carrier change.

externip cannot be set here and it certainly shouldn’t be the same as host. I don’t understand why you have an in and an out for the trunk, when they seem to have the same host address, but inconsistent parameters.

You need to have a disallow=all before your allow’s. This breaks some 2022 versions of Asterisk and can create SIP requests which are too big to handle.

username doesn’t mean what you presumably think it means and isn’t useful here.

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