No Audio in asterisk 13

Hello everybody.

I have two extensions registered to asterisk (asterisk has a real IP), both of them behind NAT, and every one of them belong to a different LAN network.

The SIP work just fine (i.e: the extensions can call each other), but there is no voice at all.

I configure sip.conf in asterisk as follow:

[general]

tcpenable=yes
udpenable=yes

udpbindaddr=0.0.0.0
bindport=49500
tcpbindaddr=0.0.0.0:49501
nat=force_rport
nat=comedia,force_rport
qualify=yes
qualifyfreq=60
directrtpsetup=yes

[terminal](!)
host=dynamic
context=myphones
disallow=all
allow=ulaw
allow=alaw
type=friend

[1001](terminal)
username=zoiper
secret=1001
transport=udp

[1002](terminal)
username=zoiper
secret=1002
transport=udp

Note: when i put the extensions in the same NAT, there is no problem, both SIP and RTP work just fine.

does anybody knows what is the problem or how to solve it?

thanks in advance.

Recent Asterisks, I believe default to directmedia=yes. Iā€™m not sure that directrtpsetup ever entered a supported state.

Invert the former and remove the latter.

Also change friend to peer in your terminal template as it is a urban myth that this should be friend, and using friend can cause security and other problems.

1 Like

That is correct, directrtpsetup never reached a supported state. In 14 some groundwork was put in so it could theoretically be done correctly, but it has not yet happened.