Asterisk/trixbox VFX timeout issues

By Steve Biddle, in , posted: 2-SEP-2009 11:42

A handful of users have encountered some issues with SIP registration timeout issues using Asterisk and Asterisk distributions such as trixbox with the VFX VoIP service.

For reasons that aren't necessarily clear Asterisk fails to register. This results in inbound calls failing and either being redirected to the failover destination or the VFX voicemail platform.

This is not a regular occurance - it is something that has been reported by several users here on Geekzone (including myself) who have encountered this issue periodically, I've had it happen on two or three occasions in the past year. When it does happen however it is annoying!

The fix for this issue simply requires sending a "SIP RELOAD" command to Asterisk which will force it to reregister all SIP peers.

To make things simple for people I'll show you how to automate this process so that your system will perform this task automatically which should minimise the intances of this happening.

Linux includes a built in scheduler called cron. This enables tasks to be run at a selected time. We'll create a script that forces Asterisk to register all SIP trunks once every 30 minutes.

Connect to your Asterisk/trixbox system via SSH.

Now we need to edit the cron configuration file. We'll do this in the nano editor which is included in trixbox. Depending on your Linux distribution you may have a different favourite editor.

type

# nano /etc/crontab

The nano editor will then come up and you can add text. Scroll down to below the cron.monthly task and then add a new line.

*/30 * * * * root /usr/sbin/asterisk -rx "sip reload"

-------------------------

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

*/30 * * * * root /usr/sbin/asterisk -rx "sip reload"                  <------ ADD THIS LINE

05 0 * * * root rm -f /var/lib/asterisk/sounds/tts/tts*

*/5 * * * * root /etc/init.d/apf stop >> /dev/null 2>&1

-------------------------


Now press CTRL X and press Y and enter to save.

Every 30 minutes the cron scheduler will now force a SIP reload command. If you Registration has failed this will resolve the issue. This 30 minute period could be changed if required.




Other related posts:
Slingshot offer NZ's best ever mobile plan?
Is the MTR saga over?
Mail For Exchange 3.0 for Nokia delivers HTML and folder support


 





Comment by Datacraft, on 2-SEP-2009 14:09

Reminds me of the days when Matt used to write hacks to reload Asterisk every night. Good to see after all these years nothing has changed!


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.

Your name:

Your e-mail:

Your webpage:

sbiddle's profile

Steve Biddle
Wellington
New Zealand





I like to think I know a thing or two about lots of things..



My interests include:

*VoIP (incl Asterisk/trixbox)

*Telecommunications

*Structured cabling

*Computer networking

*CCTV solutions

*Alarm solutions

*Home theatre

*HTPC solutions (Freeview|HD)

*Pizza & Beer


Need help with trixbox or VoIP solutions or require VoIP consultancy in Wellington? I can help.

Want to hire me or employ me?

You can contact me here or by email at stevenbiddle@gmail.com

twitter.com/stevebiddle








Located in NZ and after a cheap way to call friends or family in Australia?

Faktortel VoIP offers plans from $0 per month that offer you the convenience of being able to call landline numbers anywhere in Australia from A$ 10c per call (yes *per call*, not per minute!). An optional Australian DDI number also lets friends and family call you and they will only pay the cost of a local call. Interested? Check out Faktortel for more details.