No audio on direct redirect using SIP (external follow up numbers) on Asterisk

May 7, 2018 - Reading time: ~1 minute

I had a set up where incoming calls and outbound calls had audio but when a call was redirected without being picked up to an external number there was no audio. This is probably because direct media is not working through NAT. To work around this I did something like this:

[provider]
type=friend
host=93.184.216.34
disallow=all
nat=yes
qualify=yes
allow=alaw
allow=ulaw
context=in-provider
dtmfmode=rfc2833
deny=0.0.0.0/0
permit=93.184.216.34/32
directmediadeny=93.184.216.34/32

The directmediadeny will make sure direct media will not be used for the IP of the external SIP server. Most of the times this is a quick fix, direct media should work if your NAT set up is OK.

 

About

Koen Diels




I'm a freelance system and network engineer from Mechelen (BE) and I'm available for ad-hoc and long term projects.

>>my resume<<

Navigation