Solved

Asterisk loses it's connection to VoIP provider every day or so

Posted on 2011-03-12
14
555 Views
Last Modified: 2012-06-27
I am trying to get my connection to be stable.  Everything works fine but then every 24 hours (not exactly) SIP SHOW PEERS reports that Viatalk, my VoIP provider, is UNREACHABLE (but I can ping Viatalk, no problem) which is then fixed by power cycling the modem (not the router). It is a Zyxel 660R modem.  All other servers and connections on the network work fine while this is happening.
0
Comment
Question by:Jeff swicegood
  • 9
  • 4
14 Comments
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35117899
Just to clarify: Asterisk is the only thing that loses it Internet connection. Asterisk is running within a Virtual machine  on an Ubuntu host. The VM has it's own NIC (is bridged to) connected directly to the router.

Router: Netgear WNR3500L running dd-wrt
0
 
LVL 16

Expert Comment

by:memo_tnt
ID: 35120049
hi
does the connection become ok when you restart asterisk??
plus are your connected to your VoiP provider using their server name or IP?

0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35122007
Hi, Thank you for your response.  Resetting Asterisk does not restore the connection. It is connected using the server name, but ping is able to resolve it when I try it.
0
 
LVL 19

Expert Comment

by:feptias
ID: 35122870
In the past, Netgear firewall/routers would often manipulate the contents of some SIP packets - I assume this was in a misguided attempt to be "helpful", but the consequences were nearly always bad. However, on the latest firmware versions I have seen a new "SIP ALG" option (in the Security section, under Advanced settings). The option can be switched on or off. I recommend that you (a) upgrade to the latest firmware on the Netgear router and (b) see if that SIP ALG option exists and, if so, switch it off.

Another possibility is to disable connection testing on Asterisk for this SIP Peer. It could mean that you are just hiding the problem rather than fixing it, but sometimes the connection testing thinks the link is broken when in fact it is still working. The option to look for is "qualify". To disable it just set qualify=no.
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35124447
Could it still be the Netgear router if I am not running Netgear firmware on it? It is running dd-wrt firmware. Also the same problem was there on the previous router, a trendnet 632BRP, also running dd-wrt. Could it be a dd-wrt problem?

I set quality=no. We'll see if it loses it's connection tonight.
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35124474
When I set qualify=now is shows the peer as "unmonitored" but I know it's not connected because I can't make or receive any calls. It's temporarily fixed by power-cycling the modem.
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35124492
I mean qualify=no.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 19

Expert Comment

by:feptias
ID: 35126803
Thanks for trying qualify=no, but if you cannot make or receive calls when the problem occurs then clearly it is not just a case of Asterisk making a mistake about the connection. In which case, I suggest you put qualify back to "yes".

Are you able to try different firmware or a different router to see if it makes any difference?

It is a curious problem - the evidence available does not point to any specific part of the connection being at fault. I would say the service provider, except that power cycling your modem fixes it. So I would say your Internet connection, except that your other servers still work. So I would say the router, except that power cycling the modem should make no difference to that.

Do you have any port forwarding set for SIP on the router?
Does Asterisk know it is behind NAT. If so, what settings are you using - STUN, externip, localnet, etc.
Are you using host=<IP-address> in the peer definition or host=name that has to be resolved by DNS? If the latter, could it be a problem with the DNS on your Asterisk server?
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35127807
I will test it with a different router/firmware.

It is set to nat=yes

externip=xx.xx.xxx.xxx
localnet=192.168.0.0/255.255.255.0

I do not have port forwarding set for SIP on the router.

It has been set to host=name but I just tried it with host=<IP address> with no success.

The modem also has a NAT built in. That NAT still has the default settings. Could the double NAT be the problem? I would try setting the modem to bridge mode but I don't know what settings to make.
0
 
LVL 19

Accepted Solution

by:
feptias earned 500 total points
ID: 35128455
Double NAT could be the problem, but not necessarily. You would need externip to be the external IP address of the modem.

Try the different router/firmware and see if it makes a difference.
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35140347
I am still testing it with a different router. It has been about 20 hours. I'll let you know tomorrow it it's still connected
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35151870
It's still connected after 48 hours.I guess it was the dd-wrt causing it to disconnect. What now?
0
 
LVL 19

Expert Comment

by:feptias
ID: 35151957
Keep testing for a bit longer to be sure. Then its up to you to decide. Can't you just run some alternative firmware such as the standard one provided by Netgear? What was the advantage of the dd-wrt firmware? If you really like dd-wrt then you'll have to contact the developers and report it as a possible bug.
0
 
LVL 1

Author Comment

by:Jeff swicegood
ID: 35173246
OK it's still connected. Thank you for all your help. I am going to try and salvage dd-wrt, but I guess that will take some research.

Thanks again!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Implementing Avaya's One-X portal is pretty painless, until you want to deploy this to the Android and iPhone clients when these clients are outside of your network. The clients will also work within your local network. Here is our experience and so…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now