To me it would be simpler to use externhost instead of externip and then use a 
dynamic DNS service.  It has worked flawlessly for me for many years.

Regards
David.


-----Original Message-----
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Raj Mathur (??? 
?????)
Sent: Tuesday, 7 February 2012 1:19 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Script to automatically update externip. Useful 
for a host with dynamic public IP

On Monday 06 Feb 2012, John Cahill wrote:
>                 logger -s "checksetexternip.sh: External IP address 
> has changed, changing /etc/asterisk/sip_general_custom.conf" grep -v 
> "externip" /etc/asterisk/sip_general_custom.conf > 
> /etc/asterisk/sip_general_custom.conf.tmp echo "externip=$EXTERNIP"
> >> /etc/asterisk/sip_general_custom.conf.tmp cp
> /etc/asterisk/sip_general_custom.conf.tmp
> /etc/asterisk/sip_general_custom.conf rm 
> /etc/asterisk/sip_general_custom.conf.tmp

You could also do something like:

  sed -i -e "s/^externip *=.*/externip = $EXTERNIP/"
    /etc/asterisk/sip.conf

Apologies for the wrapped code.

Regards,

-- Raj
-- 
Raj Mathur                          || r...@kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves           || http://schizoid.in   || D17F

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to 
Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to