Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 586
  • Last Modified:

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

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
Jeff swicegood
Asked:
Jeff swicegood
  • 9
  • 4
1 Solution
 
Jeff swicegoodAuthor Commented:
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
 
memo_tntCommented:
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
 
Jeff swicegoodAuthor Commented:
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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
feptiasCommented:
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
 
Jeff swicegoodAuthor Commented:
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
 
Jeff swicegoodAuthor Commented:
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
 
Jeff swicegoodAuthor Commented:
I mean qualify=no.
0
 
feptiasCommented:
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
 
Jeff swicegoodAuthor Commented:
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
 
feptiasCommented:
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
 
Jeff swicegoodAuthor Commented:
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
 
Jeff swicegoodAuthor Commented:
It's still connected after 48 hours.I guess it was the dd-wrt causing it to disconnect. What now?
0
 
feptiasCommented:
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
 
Jeff swicegoodAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 9
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now