Asterisk MGCP and SDP NAT IP

I run an asterisk server connecting several locations of a medium sized business. The asterisk server is physically located behind a linux iptables router at one office location. I have been using SIP and IAX sip and IAX devices until now.

IAX has not given me any problems with NAT. SIP is working setting nat-yes in asterisk for the specific SIP channel.

I have recently aquired a fair amount of MGCP network phones. I have congfigured them to run just fine with asterisk. They work 100% when on the local net with asterisk. In the few cases where the phones themselves are behind a NAt router I have been able to set SDP NAT IP to the public IP of the NAT router and the phones work fine. If I do not do this, signaling works fine but there in no media path.

In the cases where the phones are on public IP’s, the phones ring (signalling working) but upon call conenct there is no sound. I imagine this is because asterisk is reporting the call managers IP address as the internal local address and not the public IP.

Is there a way to set the SDP NAT IP in the asterisk mgcp.conf, something similar to externip = used in SIP.conf? This would solve my issue. For now I have put asterisk out in the wild on a public IP.

Thanks for any input…

To clarify…

Is there a setting for mgcp.conf similar to externip= in sip.conf to provide the public acessable IP?


I think what you’re looking for is the host= line in the mgcp.conf file. … +mgcp.conf

host =

is for the ip of the call agent

I want a place in mgcp.conf in the general section to put the public IP of the call manager. Sort of like in sip.conf.