Three trunks, one failure causes all to fail

I have set up three trunks
a) Zap
b) SIP Voip
c) SIP Voip

When I have internet connection all works fine but when the internet is down trunk 2 & 3 fail but then asterisk just refuses everything else. The Zap channel does not work and next the extensions fail. I can’t even make an internal extension to extension call. Asterisk even unregisters my extension. This is really weird and I am sure I am missing some small but important detail

My settings for the sip trunk are as follows
disallow=all
allow=ulaw
canreinvite=no
dtmfmode=inband
fromdomain=lowratevoip.com
fromuser=username
host=sip.lowratevoip.com
insecure=very
progressinband=yes
qualify=yes
secret=password
type=friend
username=username

My Zapata.conf settings are as follows
[channels]

language=en
context=from-pstn
signalling=pri_cpe ; pri_cpe = PRI slave ; pri_net = PRI master
switchtype=euroisdn
rxwink=300 ; Atlas seems to use long (250ms) winks
;usedistinctiveringdetection=yes
callerid=asreceived
pridialplan=unknown
nationalprefix=70
internationalprefix=700
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=400
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

;Include AMP configs
#include zapata_additional.conf
channel => 1-15,17-31

asterisk log does not show many errors. The only error it shows is the following:
[May 6 20:04:39] WARNING[3423] chan_sip.c: No such host: sip.lowratevoip.com
[May 6 20:04:39] WARNING[3423] chan_sip.c: Probably a DNS error for registration to [email protected], trying REGISTER again (after 20 seconds)
[May 6 20:04:39] DEBUG[3423] sched.c: Request to schedule in the past?!?!

As my extensions are not On I cannot make calls to see any more logs

I even tried creating a trunk to my own server so the server will see atleast one trunk available and not go down !! No change.

Please someone help if you know

Why can’t I see zap as a trunk in freepbx admin page. It displays other trunks but not zap although I can use zap trunk to receive and make calls.

I believe I’ve had this issue before, setting up a local caching name server like dnsmasq seemed to help.

Were you ever able to find a fix for this problem? It’s causing me much grief.

Thanks,
Nicholas

Nicholas,

If you do not have a local DNS server that the server is using then you’ll have huge problems as each DNS query will take seconds to time out when the internet is down. That’s why it is HIGHLY recommended that you use a internal DNS or local caching DNS server so that the delay’s of the failure do not bring things to a grinding halt.

I’ve put our local Microsoft DNS server in there and a root DNS server as a secondary.

Will report back if it’s ok in a month or two…

Well if the internet goes down you’ll still encounter delays while attempting to talk to the root DNS server as it can’t contact it without a internet connection.

Best bet is to install the named service in caching mode on the server.

From Review of Foncordiax Telephone Systems:

So it appears that at least one FreePBX-based distribution is finally attempting to address this issue, and that’s how they are doing it.

All distributions based on CentOS include BIND.

The script to preconfigure is a bonus, it’s about a 5 minute job.

Of course a stable DNS platform should be present external to the PBX.