Help me get my dual wan setup to auto-update "externip"

I have found three different internet posts on how to automatically check and update the “externip” on freepbx/asterisk but I cannot get them to work correctly. I am pretty good with nano and “cut and paste” but i do not know much about linux/centos. I just need a simple script and to set the cron job, but apparently I am a dummy because I cant get the sample scripts to work :frowning:

Does anybody have any recent, and easy to follow directions on this?

I have a Cisco RV042 dual wan that can switch from Cable to DSL automatically. I am running freepbx 5.211.65-1 and I do not use dyndns, nor do I have external extensions. I am configured to register with my inbound provider so they can contact me. My other location connects via IAX2 and its outbound route contains a trunk for both the Cable and DSL static IP’s. The fail-over works fine as long as I manually “auto configure” and “apply settings” in the sip settings page.

I just need “exterip” to update automatically…

Alex, that doesn’t really answer his question. The real bottom line is you can’t have more than one NAT. externip is used in NAT translations. Asterisk can sort out different interfaces and different NAT’s. You can have three outside IP’s but you can’t have three inside IP’s and three NAT’s. No matter what the source interface the traffic will egress the default route with the externip added.

If you add a static route for each IP that is inbound on the other interfaces then Asterisk will still translate to the externip, even though you will egress the right interface the voice won’t work.

Sorry

1 Like