[asterisk-users] IAX trunk behing NAT with dynamic IP

Michiel van Baak michiel at vanbaak.info
Tue Aug 8 09:21:05 MST 2006


On 07:51, Tue 08 Aug 06, DM wrote:
> If that doesn't work, the OP can set up a cron job to do a IAX2 Reload
> every 5 minutes like I did.  I have the exact same problem.
> 
> I hope the OP reports back if that works, because I would rather add
> the host statement than run a cron job every 5 minutes.
> 
> On 8/8/06, Jon Schøpzinsky <jos at detele.dk> wrote:
> >Set the host=dynamic on serverA, and let the serverB register with serverA
> >
> >Jon
> >

Another option is to create a shellscript that writes a
tempfile with the current ip. Next time it's run it will
compare the current ip with the recorded ip.
If they are the same, terminate.
If they are not, run an IAX2 reload.
That way you will only reload when needed.

I remember there are tools that allow you to run scripts on
ip address change, but cant find them in my 1 minute search.
-- 
Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD

"Why is it drug addicts and computer afficionados are both called users?"




More information about the asterisk-users mailing list