[Asterisk-Users] Dynamic DNS causes problems

Wilson Pickett wilson.pickett at gmail.com
Fri Nov 5 00:04:17 MST 2004


> <-------------- sip.conf
> 
> [general]
> externip=<MY_HOSTNAME>.dyndns.org

Larry, I had the exact same problem and here is what I did:

I have a little script running that refreshes the DDNS and when it
detects that the ip has changed, it writes the line 
"externip=123.123.123.123\n" to a file, let's say externip.inc

I have the statement in sip.conf:

#include "externip.inc"

The script running does a SIP RELOAD:
 system("asterisk -rx \"sip reload\"");

Unfortunately, the IAXy has to be reprovisioned as well:
  system("/etc/asterisk/reprov");

It then emails me and another person with a phone, since the Grandstreams
only look at DNS when booted. The BT100 series needs to reboot after
the asterisk server changes ip.

This has been working for months with no problem.

hth



More information about the asterisk-users mailing list