internet down, can't dial other extensions.
Hello,
Our internet connection was down for a few hours today.
Of course we could not dial to external voip numbers.
*** Our problem is that we could not dial to other extensions.***
We have 10 polycom phones in our office. None of them were reachable from other phones.
calling voice mail was also hot or miss. sometimes would work others not.
I'd like to have our system work as much as possible when the internet connection is down. We have 1 pots line and we should at least have access to that and dialing other extensions,
I figure I have setup something incorrectly.
Could someone give suggestions as to what I should check to fix this problem?
We use Trixbox CE with all FreePbx modules up to date.
Here is some of our config info:
sip.conf:
[general]
srvlookup=yes ; VoicePulseSRV
#include sip_general_additional.conf
bindport = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=ulaw
allow=alaw
sip_additional.conf for an extension:
[215]
type=friend
secret=215
record_out=Adhoc
record_in=Adhoc
qualify=yes
port=5060
pickupgroup=1
nat=yes
mailbox=215@device
host=dynamic
dtmfmode=rfc2833
disallow=
dial=SIP/215
context=from-internal
canreinvite=no
callgroup=1
callerid=device <215>
allow=
accountcode=
thanks
Rob
from what i understand (ive had this problem before) it is normal behaviour and if i remember correctly happens when you use sip trunks.
Someone posted a workaround for this - but i havent had time to try it yet.
It is a pain though - when the internet goes down, we cant monitor the door.
It shouldn't do that at all, usually the only reason for this is if the phones are connecting via a host name but they need internet access to get DNS resolution.
Here is some info on our dns setup.
I checked a Polycom's phone. I forget the exact wording, but the dns settings were for 127.0.0.1 then 192.168.1.2 . the 2-nd is our router.
Trixbox is on 192.168.1.17, and does not have a dns server running.
I figure that path to solving this would involve :
- having Trixbox running a dns server
- have the Polycom phones get dns / routing info from Trixbox instead of the firewall [192.168.1.2 ]
Any comments on those assumptions?
recently this change was made to our sip.conf to solve a problem we were having. srvlookup-yes was added.
--------------------------
sip.conf:
[general]
srvlookup=yes ; VoicePulseSRV
--------------------------
could 'srvlookup=yes' be causing the problem?
Pushing 127.0.0.1 as a DNS server to the phone is pointless as that tells the phone to look at itself for DNS lookups and the last I checked, the phones don't have DNS servers running on them.
In this description (http://www.voip-info.org/wiki/view/Asterisk+SIP+srvlookup) it says that Asterisk can get into a bizarre state when DNS lookups fail on registers which can cause a condition that will eventually lead to all handsets failing to register. The solution is to run DNS on the phone system and point the devices' DNS server to the phone system.
this is a problem which seems to affect all flavours of Asterisk
it is certainly a "gotcha" for those who wouldn't expect the internal phones to fail in this manner! It is easy to get caught out as I've got my office network linked up to the "business" router supplied by BT (actually a 2wire home router!), and if I remove the DSL cable or physically disconnect the router from the switch, obviously all the machines on DHCP stop working but the kit with static IP (the PBX, Linksys ATA's/phone, and some other boxes) still stay working - so you'd expect the same to happen with Asterisk..
As a workaround disabling the (SIP) trunks in freepbx seems to do the job, but does anyone have a quick guide to setting up BIND so the phone system can act as a DNS as well?
I did try a few days ago but without much success..
When the net connection was down there were 2 problems:
1- extension to extension calls did not work for local phones. that is fixed.
2- calls would not go out over POTS lines.
# 1 is fixed [as of now for me] by setting up bind on Trixbox and having phones get their dns from bind. here are my notes: [ note our trixbox is 192.168.1.17] .
webmin and bind were already installed.
- from cli: yum update bind # to use latest bind rpm.
- webmin : servers > bind > forwarding and transfers enter i/p addresses of your isp dns.
- cli: set bind to start at boot: chkconfig --levels 12345 named on
- cli: /etc/resolv.conf : put this line at top: nameserver 127.0.0.1
restart trixbox and make sure networking and the phone system work.
- phones: I run a dhcp on our main linux [debian] server . I edited this line in dhcpd.conf :
option domain-name-servers 192.168.1.17,192.168.1.2, 208.67.222.222;
The point is to have your dhcp server tell the dhcp clients to use trixbox 1-st for dns.
power cycled the phones and checked their setting to make sure trixbox was listed 1-st for
DNS Server .
unplug the ethernet cable from the cable modem.
dial an extension.
works for me as of now.
------------------------------------------
Next I need to be able to use SIP phones to dial out on a POTS line when the cable is unplugged from the cable modem.
These notes are a work in progress.
It's a known problem in Asterisk that has been around for a long time. I have not kept up to see if later versions (1.4 and beyond) have addressed it. The symptoms are, if anything in your Asterisk setup uses a fqdn that requires a lookup, then the system goes off the deep end, extension to extension dialing and all. All this even if a trunk that you don't use has a fqdn that needs to be looked up. If you can stick with raw IP addresses for any such trunks then you should be able to avoid this problem.
I think I have that fixed.
I'll restart the system and the phones a few times to see if it stays fixed.
The test I'll do is
- disconnect the internet connection.
- restart trixbox and the phones.
- test extension to extension dialing.
After
- disconnecting internet.
- restarting the phones.
- restarting asterisk server
extension to extension dialing did NOT work. nor did trying to dial out using pots.
This is a pretty big flaw in our setup. When voip is down, pots needs to work.
So next I'll try to eliminate all fqdn's .
I wonder if this is a Centos issue or an Asterisk issue? I'm just a lot more familiar with Debian..
Have had the same situation here... tried enabling bind, tried enabling bind in caching mode with no result. I haven't had time to look closer but I'm assuming that most of these providers have their TTL set very low in DNS such that even in caching mode the cached data is expiring.
From what I've read it is certainly an asterisk issue, and has been around for a long long time (really rather surprised that more people haven't been faced with it's consequences). To me it certainly seems like a pretty major issue, and something that could bring even a major installation to it's knees in very short order.
Really hesitate to remove the fqdn's because then if the provider decides to change IP's you are stuck making hand changes once things just stop working all of a sudden (and in the case of one provider, one of their fqdn's resolves to 4 different IP's).
Was able to wrangle a workaround by changing the SIP configuration to limit the number of registration retries and the time between attempts. The end result of this is that your internal phones stop working, only until the trunks stop trying to re-register. The downside to this plan is that you would have to set up some sort of watchdog to reset sip because if during the normal course of events one of your SIP trunks went down for long enough to exceed that timeout, it would not automatically reregister.
The workaround would probably be a better solution for someone running mostly POTS lines with perhaps only one or two SIP lines as "backup" (ironic that your backup failing makes your primary stop working :-)
Until I can come up with a better solution I've elected to leave things as-is, armed with the knowledge that a quick edit to the SIP configuration can make the problem go away if it's needed in an outage.
I think the biggest problem with this issue is that it slaps you out of nowhere. It first hit me when I was quite literally on the way out the door (late already) for a business trip. Absolutely *fantastic* way to raise your blood pressure :-)
Nobody expects internal phones to stop working when the internet connection goes down... even if you think of a DNS issue you then dismiss it... because none of your phones have a stitch of configuration on them that would require a DNS lookup so that couldn't possibly be the problem. Last thing you think of is that the entire SIP stack is going to take a nosedive.
Cheers,
>>>>> Mike <
<
Does IAX2 have the same problem?
installing bind appears to have worked for our server. After pulling the enternet from the wireless modem and did a amportal restart. Prior to installing bind this would cause everything to break, now everything continues on as normal, apart from the 4 sip trunks obviously not being registered.
I can't recommend running BIND or any other non-required process and expect Asterisk to play nice with it.
There is a reason why commercial builds are locked down, and this is just it.
I am curios of Asterisk behavior so I am going to replicate the exact sequence. After the first failure of the preferred route Asterisk should route to the next route, I have no experience that after a timeout that SIP channel service would hang if it can't resolve the remote host.
My interest is will the SIP channel attempt to reregister each time the outbound route is hit?
I will share my findings tomorrow.
Scott
On a testing computer installed Trixbox 2.4.2 and upgraded rpm's and Freepbx to latest. Then configured trunks , outbound routes and added extensions. I did not restore a backup from my production system - I wanted a clean install. Both systems have a Sangoma 200 pci card for pots lines.
Outbound route is set to voip then pots trunk.
On my test system, when there is not an internet connection, calls try to go out on voip, then after about 20 secs go out on the pots trunk.
So when the internet will be down for more than a little while disable the voip trunks on the FreePbx screen.
There needs to be a way setup to monitor the internet connection and auto disable voip trunks. Then re-enable voip trunks when the internet is back up. Maybe it should be on a bounty page.
At least for now I can document and have office staff disable voip trunks as needed.
After debuging the DNS queries, I found a solution that make the system work (such as internal extension and PSTN calls) when the internet is down.
1. Install cache only name server on the trixbox
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. Add 127.0.0.1 on the first line of /etc/resolve.conf
3. Make sure in /etc/sysconfig/network, the HOSTNAME is xxx.localdomain
HOSTNAME=trixbox1.localdomain // not mytrixbox.mydomain.com
4. in file /etc/hosts, add VOIP provider IPs (used in voip trunk)
127.0.0.1 trixbox1.localdomain
x.11.22.3 sip01.myvsp.com
y.66.77.8 proxy00.myisp.net
5. Reboot
6. Configure the phones to use trixbox as DNS server (maybe not needed).
In this way, there is nothing you need to do when internet goes down.
Please let me know if this works for you.
see my post above "Almost Solved"
A new clean install works ok without using bind or caching-nameserver
If I restore a backup from my production system to the test system then the test system does not work when the internet is down.
So we are hand entering all of our setup from the production system to the test one. After each step I retest the new system . the test is disconnect the internet connection , and see that calls out make it to the pots trunk.
wonderful, work for me!
Hongbo, I've follow your indications, and internal calls are possible without internet connection.
Thank's a lot.
Even though, when start trixbox some utilities start slowly:sendmail, sm-client, smartd and then appear:
could not reliably determine the server's fully qualified domain name using 127.0.0.1 for servername.
when internet connection returs, voip external calls have no audio, internal have audio.
From this morning I have many problems with the calls, so I reported the host name to trixbox.localdomain. Boot is fast, and phone calls seem to have no problems.
It's seem work now!
I will do other tests, and then you say.
But I have this other problem, without resolution. I've an IP dynamic internet adsl connection, and I use Linksys SPA942 IP phone. When my connection goes down, and then returns, I can call, but there is no sound. This only in external telephone calls, because those internal everything worked ok. Have you any idea?
Thank's
I have the same phone, but did not have this no-sound problem. I think it's the modem/router/firewall problem. Please try to reboot your modem/router, and check if the sound comes back.
my situation is:
router draytek 2700v
adsl connection with dynamic IP
I've open 5060 tcp port on router, disable all dos defence, but when connection go down and then reconnect, my isp ip change and I've no audio in external calls.
This is active channels during a call test:
Peer User/ANR Call ID Seq (Tx/Rx) Format Hold Last Message
83.211.227.21 3201909210 67f6f8b14d6 00103/00000 0x4 (ulaw) No Tx: INVITE
192.168.1.12 201 3d0c9c7e-78 00101/00102 0x4 (ulaw) No Rx: INVITE
2 active SIP channels
3201909210 is my phone cell, 201 is my spa942
I've also rebooted my router, and rebooted to factory default my spa942, but nothing.
When reboot trixbox, everything works fine
your nameserver to 208.67.222.222
I assume it is set to your router's i/p address.
edit /etc/resolv.conf and change nameserver to 208.67.222.222
You need to forward UDP 5060 and UDP 10001 - 20000 (as defined in rtp.conf) from router to trixbox. If you can ring but there is no sound, most likely RTP ports are not forwarded.
in /etc/resolv.conf I've:
nameserver 127.0.0.1
nameserver 208.67.222.222
I've just forwarded 5060udp and 10000-20000 udp port on router.
dsl go down-->dsl return-->I try to call-->call place, the called (my spa942) don't have audio
I reboot trixbox-->all work fine
:-(
did you use to install your system?
trixbox 2.4.2 works for me when the net is down. see my post above.
earlier versions did not . could be do to something I mis-configured or what I do not know.
OK this issue has been around a long time
For those who are having issues install DNS on the box
The VOIP provider /router is also in play here.
Some VOIP providers are just crap, Vitelity.net never has this issue
Many DSL modem router combo will always fail, have the DSL device put in bridge mode and buy a real router
hint: if you are spending atleast 200.00 or so you are not buy a real router.
try amportal restart instead of a reboot
really just sip reload should do it
You can use a little batch file to do this via a phone call as well you can call a batch file from the dailplan
The problem of the missing voice on external calls always happens when change the IP address assigned by the provider;with a simple reset of trixbox everything works well.
I have tried many settings, but always the problem. I think we should reset trixbox whenever lose the dsl signal.
THIS IS THE WORK OF HONGBO TO WHOM WE OWE MANY THANKS FOR SOLVING THIS LONG FRUSTRATING ISSUE. I HAVE ALTERED HIS WORK TO ACCOMMODATE THE TRIXBOX DASHBOARD:
1. Install cache only name server on the trixbox
a) temporarily activate the CENTOS base packages and CENTOS base extras in the repositories dropdown menu under the settings tab in the dashboard
b) load the package manager and find the caching-nameserver module
c) tick the box to install caching-nameserver and go to bottom /press install
2. Open an ssh window and type the following:
cd
chkconfig --add named
chkconfig --level 345 named on
echo "* IN A 127.0.0.2" >> /var/named/localdomain.zone
service named start
3. back to dashboard: system tab, dropdown menu NETWORKING:
a) click on OPEN NETWORK PARAMETERS
b) click on USE OPEN DNS
c) change the primary dns to: 127.0.0.1
d) make sure host is: trixbox1.localdomain
(note by hongbo: HOSTNAME=trixbox1.localdomain // not mytrixbox.mydomain.com)
5. Reboot
In this way, there is nothing you need to do when internet goes down.
Please let me know if this works for you.
This should keep from messing with the "dont configure these manually files" to prevent an accidental screw up. It is also much faster
Here is my solution using BIND DNS server (via Webmin).
1) First go in Webmin and under BIN DNS Server select "Setup nameserver for internal non-internet use only".
2) Create a master zone : trixbox1.localdomain
3) go in "Forward and Transfer" and set IP address of two (or more) Internet DNS server (public DNS Server as OpensDNS Server : 208.67.222.222, 208.67.220.220 or those provided from your ISP) and set "Lookup directly if forwarders cannot?" to YES - no default - (this is the most important thing!)
4) Go in Trixbox -> System -> Network and set as Primary DNS the internal IP Address of your TB server.
In this way all works fine even when Internet goes down.
Bye.
Ing. Cosimo MERCURO
Mercuro for Business
We already run our own DNS servers in house, so I resisted adding yet another DNS server to my trixbox, but I did anyway.
The result is, if the ISP goes down for more than 1 hour, we lose ALL phones. Including internal, and the backup analog (Zap) lines to 911.
I can't believe this Earth-shattering bug has been plaguing Asterisk for this long. I think Asterisk is really cool, and I want to use it, but this alone is a reason why it could never be used for a serious installation. We don't lose our ISP often, but, when we do, WE DO.
Any other ideas? Besides putting cellphones next to everyone's phone?
Something else is setup wrong. There is no earth shattering bug. We have systems with SIP and IAX trunks that have never been connected to the Internet. Some do have Zap channels in them also.
I would like to find the common issue with your type of problem so that we can better help users experiencing this issue.
Scott
Its the same bug everyone else is talking about.
If you have any sip trunks, and if you lose internet connectivity, then everything goes down. This is a known, documented bug in asterisk. I have been following discussions on this from asterisk 1.2 through 1.4. I know that people have known about it for a LONG time.
Adding a local DNS caching name server helped, but only for 1 hour. After 1 hour, the cache expires, no more phones.
The whole region here lost all Internet (through Comcast) last week for most of a day. One hour into the ISP failure, trixbox was dead. No intercom calls (not a big deal), but my Zap channels could not be reached either. That is a big deal. The worst part is, you don't know anything is wrong until you go to make a call and "all circuits are busy" or something like that. We will never know how many people tried to reach us and couldn't...
I have an analog line with verizon on a zap card. But after 1 hour, after the cache expires, it too is unusable.
I'd bet your system has the same problem, you just don't know it yet.
does the problem occur when using IAX2 trunk?
No they don't and it systems plural.
Maybe I did not make it clear, we have many systems that have SIP trunks and are not connected to the Internet, they do not have any Internet access at all. The SIP trunk is on a private network.
No DNS services are configured or needed. The peers are hard coded with an IP.
You may have given me the answer I am looking for, if you have a FQDN as the target of a peer and the DNS in unable to resolve then the Zap channels become 'unavailable'?
I am almost sure there is a way in BIND to overwrite the TTL in a DNS A record. This may be a valid workaround.
Scott
About IAX2, no, we don't have any.
About manually coding the IP address, sure, i can do that with the hosts file. Don't even need bind. But, what's going to happen when a SIP provider changes an IP address for one of their servers?
You may have given me the answer I am looking for, if you have a FQDN as the target of a peer and the DNS in unable to resolve then the Zap channels become 'unavailable'?
Sorry, I thought that was understood. I am kind of pissed off right now... :)
After scouring for hours and trying various solutions, I still find myself with this problem at 2 sites (at least) Did I miss something? Is there a fix for this from the Trixbox side available? This seems to be a rather common problem killing systems!
I HAVE to use DNS names and I have set up a Bind server on my * box, although I am not 100% sure that it was done correctly. (The box resolves DNS names though....?) I have pointed my DNS on my SIP phones (AAstra, SNOM, Grandstream & Sipura) to the * box, but with no luck. If I disconnect the internet, my whole system goes down in seconds, only to work 100% when internet is restored. Extremely frustrating!!!!!
Can somebody with good Linux + Trixbox knowledge not write a foolproof article on how to permanently fix this problem?
i have a couple of iax2 extensions as well as sip. with internet disconnected, sip extensions do not register with asterisk however, iax extensions are not affected. i should mention that ALL phones as well as the trixbox have static IP addresses.
This is a known problem with Asterisk and the best thing to do is to use a local DNS server. If that is not working then something you have it not setup properly.
Asterisk does SRV lookups (a lot of them) and that brings the system down when the Internet is offline.
DNS in Asterisk currently is blocking based, this leads to all sorts of issues when the DNS is down. This is something we will hopefully be making an effort to solve in the next development cycle but at this point in time there's nothing we can do. I would suggest following oej's suggestion. Peace!
We are just living with the reality that the phones go down frequently. I have a POTS line that rings when the trixbox is dead.
Make sure you set "srvlookup=no" in one of your sip.conf files.
This will stop the rambling SRV dns lookups (that don't work anyway).
Then, if you have a local DNS server, you should be good for short ISP outages.
The docs say that srvlookup defaults to no, but on my system it defaults to yes.
Took me a while to figure that one out. A network trace revealed the SRV lookups going out every few seconds to nowhere. These are not cached in the DNS server, so having a local DNS server with srvlookup=yes is not helpful.
Make sense?
i am getting same issue, and not able to understand what happens to my asterisk. One more thing i am using local DNS server, and that server is forward to opendns. but still same issue, but when i switch my internet link every thing again comes back and work fine.
any other solution please, if any update is available ?
Naveed Razaq | www.beyondweblogs.com | www.apnimarzi.com | www.techno-soft.com
Was really surprised this was the source of the problem, and that I had not been plagued by it more severely in the past. I guess I had a lucky combination of configurations/internet connections that didn't make this a huge issue.
Just wanted to second Basildane's solution as a fix. I didn't test this for any serious length of time (only 5-10 minutes), however without this configuration set the phones would almost instantly fall of the radar.
-THX2000
There is an Elastix tutorial at http://www.elastixconnection.com/index.php?option=com_content&tas... which addresses this issue, it is quick to install, easy to set up and cures the problem.
Hope this helps.


Member Since:
2007-08-01