Make sure trixbox works when Internet is down
It's true that the default trixbox-ce setup can not call PSTN or another extension when internet is down. Actually it still rings the another extension if you wait 20 - 90 sec for DNS queries to timeout.
After examing caching nameserver's debuging log, I found a simple solution that make the trixbox works (such as call internal extension and PSTN) when internet is down or even without internet connection.
1. Install cache only name server on the trixbox (BIND with caching config)
yum -y install caching-nameserver
chkconfig --add named
chkconfig --level 345 named on
echo "* IN A 127.0.0.2" >> /var/named/localdomain.zone
service named start
2. Set trixbox as its own DNS server by adding 127.0.0.1 on the first line of /etc/resolve.conf, like
127.0.0.1
your.other.dns.servers
3. Make sure trixbox has default settings for file /etc/sysconfig/network
NETWOKING=yes
HOSTNAME=trixbox1.localdomain
(Do not change HOSTNAME to trixbox1.yourdomain.com )
and for file /etc/hosts, something like
127.0.0.1 trixbox1.localdomain trixbox1 localhost.localdomain localhost
4. Reboot (try without intetnet)
Please let me know if this works for you.
PS: the problem is not related to the VOIP trunk hostnames, as noted in my previous post on another thread. Can any Asterisk expert answer why asterisk is looking up the ip for 2001-a1b2c3d4.localdomain when ext. 2001 is calling? This is causing the long delay when internet is down. Above solution works around this DNS lookup bug/feature.
Hi Hongbo,
Thanks for you great workaround solution.
We've tried and to my delight, it worked just as I wanted.
However the joy lasted only about an hour.
* locks up again after about an hour.
We've tried it on a few different boxes and it seems that 1 hour is the magic number.
I can see cached only DNS server holds the VSP's records for some hours at least,
so we can only conclude * somehow locks itself up.
Other forums suggest that it's a known issue that is in the famous "won't fix" category, which upsets lots of people who're using * as hybrid solution.
Some suggest that it's best to run a script to update sip.conf (and related) to remove possible DNS queries, when internet goes down - apparently the idea was ridiculed by many * developers...
I have no doubt that if we could get this workaround work permanently, it will rescue so many people out there.


Member Since:
2007-07-03