Trunk Losing Registration

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
I've a PIAF OsmV installation which otherwise is running perfectly but my sip trunks loose registration once in 24 hrs and then re-registers only when I reboot my ADSL router.

I believe it should be the router issues at my PBX end, but I tried with netgear DG834G and now some box provided by my ISP with same results. But since rebooting the router re-establishes the trunks, it really should be the issue ?
 
Joined
Nov 14, 2008
Messages
1,398
Reaction score
320
To help you with this other folks will need more info... ie: voip provider, sanitized trunk config and registration string, static or dynamic ip?, setup at the provider end etc...

When you say it loses registration what do you see / symptom ...

Brian
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
hmm.. I've trunks with localphone, messagenet.it, ukddi.com, ipcomms, and couple of others. While all of them basically are free DID trunks that I use, only localphone is used for outgoing. I dont know if trunk configuration is of any importance here, but if required maybe I can post the config for one of them to make things simpler.

I'm running on a dynamic ip resolved to dyndns on the router. The Piaf is in the internal lan with a local IP. I'm also running trunk monitor scrip which I installed just yesterday to keep a track how often it goes down.

Following are few lines from the log:

[2010-06-18 19:56:55] NOTICE[3082] chan_sip.c: -- Registration for '[email protected]' timed out, trying again
(Attempt #52)
[2010-06-18 19:56:55] NOTICE[3082] chan_sip.c: -- Registration for '[email protected]' timed out, trying again (Attempt #5
3)

I think this was a result of the trunk monitor scrip that does sip reload:

[2010-06-18 20:01:21] WARNING[3082] chan_sip.c: No such host: localphone.com
[2010-06-18 20:01:21] WARNING[3082] chan_sip.c: Probably a DNS error for registration to [email protected], trying REGISTER a
gain (after 20 seconds)

Also when the trunks goes down, on freepbx system status screen, IP trunk registrations becomes 0 where as IP trunks online is still the same at 8, I cant however make or receive calls using these trunks.

I was not running sip debug, do you want me to post sip debug results ? (will have to wait for it to go down next to get the results).
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
My ISP would not provide a fix IP, I was tinkering with the idea of using piaf on a embedded system like Alix instead of my present router to mitigate such issues. Not sure if it will really work for me if the router is an issue.

On the other hand if dynamic IP or dyndns is an issue, what the next best approach than to have a fix ip ?
 

Boolah

Guru
Joined
Nov 16, 2007
Messages
331
Reaction score
20
Do you have the following entries in your sip_general_custom.conf file:

nat=yes
externhost=your.dyndns.hostname
externrefresh=300
localnet=xxx.xxx.xxx.xxx/255.255.255.0

where "your.dyndns.hostname" is your FQDN DynDNS hostname and xxx.xxx.xxx.xxx is your network.

If you have the above entries in your sip_general_custom.conf file and you're still experiencing the problem, then chances are it's your router. See if there's some way for you to modify (reduce) the UDP timeout values on it.
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
These are my present configurations:

I've in sip_nat.conf:

nat=yes
externip=127.124.115.124
localnet=192.168.0.0/255.255.255.0

and in sip_general_custom.conf:

rtptimeout=120
externrefresh=120
videosupport=yes

I initially had externhost=myhost.dyndns.com in sip_nat.com, then I installed Dnsomatic scrip scrip (from this forum) which checks the ip every 5 minutes and rewrites sip_nat.conf whenever there is a change. With externhost, the issue was more accute and my trunks used to go down more than once in 24 hrs, now it does only once.
 

Boolah

Guru
Joined
Nov 16, 2007
Messages
331
Reaction score
20
Any chance you could replace your router and see if that makes a difference? If you have an old PC lying around, you could run the LiveCD version (so you don't need a HD or have to install anything) of pfSense or monowall to test.
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
I've just ordered the alix board today. will try it with the same and post the result in this thread. The delivery it self will take about 2 weeks, keeping my fingers crossed.
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
There seems to be some observation that I made on this issue, thanks to the trunk monitor scrip. Since installation of the scrip I usually get email notifying me of trunk failure between 9am to 11am only (once a day). Today being holiday, I was at home and my laptop lost internet connectivity for about a min, at around 10:20am, i quickly checked the pbx trunk information and all my trunks were down, after 10 mins at 10:30am I started to receive trunk notification emails. I saw the router log and seems it looses pppoe connection for few seconds daily during this time which causes the trunks to fail. Looks like the ISP revalidates the connection or something. But why does the trunk not register on its own after a min when the connection is restored ? it does only when I give the router a reboot ? Still a problem with the router or is there something that I can do on the PBX to avoid this ?

Jun 26 10:20:13 daemon crit pppd[433]: Clear IP addresses. Connection DOWN.
Jun 26 10:20:13 daemon crit pppd[433]: Clear IP addresses. PPP connection DOWN.
Jun 26 10:20:19 daemon notice pppd[433]: PPP: Start to connect ...
Jun 26 10:20:20 daemon crit pppd[433]: PPP server detected.
Jun 26 10:20:20 daemon crit pppd[433]: PPP session established.
Jun 26 10:20:20 daemon crit pppd[433]: PPP LCP UP.
Jun 26 10:20:20 daemon crit pppd[433]: Received valid IP address from server. Connection UP.
 

Boolah

Guru
Joined
Nov 16, 2007
Messages
331
Reaction score
20
I still think this is a router problem. I've seen the exact same problem you describe on a Linksys before. What happens is the router doesn't properly flush its state tables. If you can manipulate the router's state tables or modify the UDP timeout on the router in real-time, you can either manually reset the state on your stale UDP connections or reduce the UDP timeout to 0. Once you do that, the trunk will register within one or two seconds. Then you can increase the UDP timeout on your router again (if you don't increase from 0, your trunk will continuously go up and down).
 

vbhoj74

New Member
Joined
Jan 20, 2010
Messages
23
Reaction score
0
The router is a UTstar WA3002-G4 running Busybox V1 on broadcom chipsets. I do not know any way to manipulate the state tables or the UDP timeouts on this box.

Anyway, the alix is on its way, so I guess pfsense is the best thing to try.
 

Members online

No members online now.

Forum statistics

Threads
25,827
Messages
167,874
Members
19,254
Latest member
hezbay
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top