I have a standard BT home DSL, which means I cannot have a static IP address, therefore i'm forced to use NAT, I subscribe to a DDNS service and have written a VB app which polls the router every 10 seconds and updates the DDNS if appropriate. 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? Regards, Ray -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050824/7ffeaec3/attachment.htm
Message>I have a standard BT home DSL, which means I cannot have a static IP >address, therefore i'm forced to use NAT, I subscribe to a DDNS >service >and have written a VB app which polls the router every 10 seconds and >updates the DDNS if appropriate.There are ready applications to do that>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 are you running behind NAT? Do you have asterisk server or SIP client? In case of server, you just set in sip.conf externip <my address as FQDN> In case of SIP clients, set : host=dynamic in the definition of relevant client. I have both server and client running behind NAT without any problems. Rudolf
On Wednesday 24 Aug 2005 09:44, razza wrote:> I have a standard BT home DSL, which means I cannot have a static IP > address, therefore i'm forced to use NAT, I subscribe to a DDNS service > and have written a VB app which polls the router every 10 seconds and > updates the DDNS if appropriate.Ditch your ISP and go with one who will give you a static IP. B
I'm assuming no apps/scripts exist which completes this? Can someone please confirm that if I use a FQDN in sip.conf for my external IP, the FQDN is only resolved at the time of loading, therefore if my IP changes after sip is loaded, I will have to manually reload asterisk/sip? Regards, Ray ----------------------------------------------------- Ray Originally Wrote: I have a standard BT home DSL, which means I cannot have a static IP address, therefore i'm forced to use NAT, I subscribe to a DDNS service and have written a VB app which polls the router every 10 seconds and updates the DDNS if appropriate. 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? Regards, Ray -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050827/8eab2917/attachment.htm
I'm assuming no apps/scripts exist which completes this? Can someone please confirm that if I use a FQDN in sip.conf for my external IP, the FQDN is only resolved at the time of loading, therefore if my IP changes after sip is loaded, I will have to manually reload asterisk/sip? Regards, Ray ----------------------------------------------------- Ray Originally Wrote: I have a standard BT home DSL, which means I cannot have a static IP address, therefore i'm forced to use NAT, I subscribe to a DDNS service and have written a VB app which polls the router every 10 seconds and updates the DDNS if appropriate. 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? Regards, Ray -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050829/411270a8/attachment.htm
On 24/08/05, razza <rjames31@btopenworld.com> wrote:> I have a standard BT home DSL, which means I cannot have a static IP > address,Yes you can - depends on your ISP, but the underlying IPStream Home products don't prevent the allocation of static addresses. It's all down to who you buy your service through - some will give you a static IP for free. Time to shop around - most IPStream resellers will migrate you for free, also. Peter -- Peter Bowyer Email: peter@bowyer.org Tel: +44 1296 768003 VoIP: sip:peter@bowyer.org
> 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.
Could you send me a copy of your script? %<----- SNIP! ----->% Wilson Pickett wrote: 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 %<----- SNIP! ----->%