How can I make the asterisk to work with multiple IPs

Hi Guys,

The server has to NIC, NIC1 (XXX.XXX.XXX.XXX) is connected to the internet WAN link, and the other NIC2 ( is connected to my LAN. I want to bind asterisk on both ip and want to use WAN ip for trunk link and LAN IP for internal IP Phones. how we can with out NATing issue.



in the iax and sip conf files will do it,


Hi Ian, it’s working but getting audio problem. no RTP getting.


Have you played around the canreinvite option? No, I believe, forces asterisk to be in the middle of all phone calls which may eliminate you need for NATing as Asterisk will be the middle of the media path. Check out the command.

i have tested canreinvite=no & nat=no option and canreinvite=no & nat =yes option but still i am facing audio problem (softphone on LAN to trunk on WAN IP). when i have register softphone on WAN IP and tested with canreinvite=no & nat=no option setting. i found 2 way audio. can we fix with other option please help.

You don’t say the version. canreinvite has been renamed to something like directmedia, in the most recent versions.

Thanks for help. i am using asterisk-1.6.13 version.

There isn’t a 1.6.13 version. They don’t go beyond 1.6.2.x


Sounds like you havent set the localnet in the sip.conf


asterisk version is, my fault in typing. :frowning:


Sounds like you havent set the localnet in the sip.conf


In general section i have configure
externip = WAN IP address