Remote phones randomly going down through site-to-site vpn

Running freepbx distro with FreePBX 2.9.0.12 and Asterisk 1.8.7.1 with Aastra phones.

Have a site-to-site VPN using draytek firewalls. Only one side has a static IP address, so I had to build it out with the other dialing in.

The remote phones will be up for a random period of time (a few hours to several weeks). They might both appear to go down at the same time, but about as often as not, only one will go down at a time.

When logging in to the webgui’s for the remote phones, I can see that a down phone is getting error 401. To get the phone re-registered with the PBX, I simply change the IP address from a DHCP address to a different IP address statically, or vice-versa if a static is already set, I change the setting to DHCP, reboot, and the phone registers again.

Any idea what’s going on here; I don’t see anything in the full logs.

Anyone at all have experience with site to site vpns? Even anyone that has never experienced this issue?

Could well be a timing issue. Can you see from the Draytek logs if the VPN is dropping and reconnectinbg from time to time. It might be worth trying to play with some of the timers on the VPN settings.

Thanks Lee. There aren’t many that use Drayteks in my part of the US. I know they’re popular in the UK. I’ll take a look tomorrow and give the timings a good working. Would these symptoms possibly relate to the following post?

http://www.freepbx.org/forum/freepbx/users/remote-extensions-over-vpn-settings

Previously I had externip= and localnet=, but removed them because my SIP provider’s proxy was stopping all calls left and right because it was seeing the wrong ip address (the SIP trunk’s connected through their own VPN to network and their proxy wanted to see the private ip address of the PBX, but asterisk was randomly sending externip to the proxy). SO, we set up vpn’s hoping it would fix the matter–and it did, but only for the local extensions. The remote extensions on the other hand are completely losing registrations randomly, as mentioned.

Is it possible to add settings to sip_nat.conf without adding externip=.

I’ll post results on the timing changes in a few days.

Thanks again.