Asterisk/trixbox VFX timeout issues

By Steve Biddle, in , posted: 2-Sep-2009 12: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.


# 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"



# 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:
No, AT aren’t stealing your money. How Stuff confused a nation.
The perils of using Airbnb during big events
How to remotely control your heat pump from your phone for under NZ$25

comments powered by Disqus

sbiddle's profile

Steve Biddle
New Zealand

I'm an engineer who loves building solutions to solve problems.

I also love sharing my views and analysis of the tech world on this blog, along with the odd story about aviation and the travel industry.

My interests and skillset include:

*VoIP (Voice over IP). I work with various brands of hardware and PBX's on a daily basis
  -Asterisk (incl PiaF, FreePBX, Elastix)

  -xDSL deployments

*Structured cabling
  -Home/office cabling
  -Phone & Data

*Computer networking
  -Mikrotik hardware
  -WAN/LAN solutions

*Wireless solutions
  -Motel/Hotel hotspot deployments
  -Outdoor wireless deployments, both small and large scale
  -Temporary wireless deployments
*CCTV solutions
  -Analogue and IP

I'm an #avgeek who loves to travel the world (preferably in seat 1A) and stay in nice hotels.

+My views do no represent my employer. I'm sure they'll be happy to give their own if you ask them.

You can contact me here or by email at