These can be a real hurdle when setting up VoIP, help others by posting your configs, tips and tricks or simply ask others for help if you're stuck.

Advertisement

By Sponsor
By flapjack
#182
I had a problem with the HT-502 dropping registration for no apparent reason. My voip provider were able to help to some extent by recommending a particular version of the firmware (3.3.3) for my main router, which is a Draytek Vigor 2820Vn.

For some time I have not been able to use SIP on the Vigor itself as it gives problems on conference calls when new callers join - the simulated DTMF codes on joining caused my connection to drop or play a continuous tone. I then opted to try the HT502, bought directly from my previous SIP provider, thinking it would be 100% compatible. Not so, but at least it makes makes my VoIP solution portable.

Anyway cutting a long story short, downgrading the firmware on the Vigor did not work - I could not use my 3G USB modem on WAN2. Eventually had to upgrade again to latest, beta_0414, which gives me WAN2 again.

HT502 NR persisted so I have written some shell/expect scripts on my Ubuntu box to periodically check for:

Register transaction got code 0:403

in syslog. Using Splunk simplifies this as it is so easy to limit the time span to the last minute and run this with cron every 5 or 10 minutes.

The Expect script then uses telnet to check the status. If there are no FXS ports 'Off Hook', then another expect script is called to reboot the HT502, again using telnet. This resolves the NR and keeps down time to a minimum.

Main code here, if anyone is interested:
Code: Select all
#!/bin/bash

#set -x
cd /opt/splunk/bin
lg=/opt/splunk/var/log/ht502hr.log
> $lg
./splunk search ' Register transaction got code 0:403 earliest=-1m ' -auth splunk_user:splunk_passwd >> $lg

exec 6<&0
exec 0<$lg
while read line1
do
[ `/usr/sbin/ht502stat.sh | grep -c 'Off Hook' ` -eq 0 ] || break
/usr/sbin/ht502ipl.sh
mail -s "HT-502 NR (rebooting)" email@address.com < $lg
break
done
exec 0<&6
/usr/sbin/ht502stat.sh:
Code: Select all
#!/usr/bin/expect
spawn telnet <ip address>
expect "Password:"
send "admin\r"
expect "*>"
send "status\r"
expect "*>"
send "exit\r"
/usr/sbin/ht502ipl.sh:
Code: Select all
#!/usr/bin/expect
spawn telnet <ip address>
expect "Password:"
send "admin\r"
expect "*>"
send "status\r"
expect "*>"
send "reboot\r"
expect "*>"
send "exit\r"
I hope this helps anyone finding themselves in a similar position.

Advertisement

By Sponsor

In the past month, Microsoft have changed their sp…

Porting NGN Issue...

Hi WelshPaul, thanks for the replies and your ef…

Not at this time no. :dunno: Having just looked…

Hello, I have a Google Voice number as well as …