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