> This is fine but I need to be able to modify my sip.conf (externip =
> w.x.y.z) and reload sip, does anyone know of a script/app which does an
> nslookup and modifies the conf file, then reloads sip? 

What I did was to have the ip checker write a one line file called
"externip.conf" containing the line:

externip = nnn.nnn.nnn.nnn ; this is the new ip address

then in sip.conf, 

#include "externip.conf" ; replace the externip= line in sip.conf with
this include

Now in your ip checker script (run every n minutes with crontab),

check the ip against an the last saved ip (in file "old_ip" for example)
if ips are the same, exit, nothing to do
if different, write the externip.conf file and 
 do a "sip reload" command
 save  the ip to the old_ip file
exit

When I couldn't get fixed ip, this worked flawlessly for months.
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to