SUGGESTIONS Trunks Unregistered on DO with Ubuntu 14

jrglass

Guru
Joined
Oct 18, 2007
Messages
302
Reaction score
20
I am running PBXIAF V2 for Ubuntu 14 on Digital Ocean. Every so often all registered trunk become unregistered

UB14v2*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
inbound34.vitelity.net:5060 N XXXXX 120 Unregistered
sms.intelafone.com:5060 N XXXXX 120 Unregistered
chicago2.voip.ms:5060 N XXXXX 120 Unregistered
sip2sip.info:5060 N XXXXX 120 Unregistered

This could do this in and hour or 12 hours. after I reboot the trunks are registered


UB14v2*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
inbound34.vitelity.net:5060 Y XXXXX 45 Registered Thu, 31 Jul 2014
sms.intelafone.com:5060 Y XXXXX 105 Registered Thu, 31 Jul 2014 chicago2.voip.ms:5060 Y XXXXX 105 Registered Thu, 31 Jul 2014
sip2sip.info:5060 Y XXXXX 105 Registered Thu, 31 Jul 2014
4 SIP registrations.
Any suggestion what may cause this. I also had this problem with v1
Thanks,
Jeff
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,221
As we've said many times, DO is a nice platform for development, but not for production. Try it using VirtualBox on your desktop, and I'll bet the problem goes away.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,221
Another option would be to build yourself a little script and run it as a cron job every 15-60 minutes. Don't forget to make it executable and test it. ;)

Instead of sending an email as the example below, you might prefer amportal restart.

Code:
#!/bin/bash
 
test=`asterisk -rx "sip show registry" | grep "Auth"`
 
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -s "SIP Trunk Failure" [email protected]
# echo -e "Trunk off line:\n$test"
fi
 
test=`asterisk -rx "sip show registry" | grep "Request Sent"`
 
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -s "SIP Trunk Failure" [email protected]
# echo -e "Trunk off line:\n$test"
fi
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,202
Reaction score
5,221
Here's a more elaborate one if you have IAX and GV trunks as well.

Code:
#!/bin/bash
 
from="[email protected]"
email="[email protected]"
 
# Don't mess with stuff below here
 
test=`asterisk -rx "sip show registry" | grep "Auth"`
 
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "SIP Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
test=`asterisk -rx "sip show registry" | grep "Request Sent"`
 
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "SIP Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
test=`asterisk -rx "iax2 show registry" | grep "Reje"`
 
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "IAX2 Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
astversion=`sudo asterisk -rx "core show version" | grep -m 2 ^ | tail -1 | cut -f 2 -d " "`
if [ "${astversion:0:2}" != "11" ]; then
test3=`asterisk -rx "jabber show connections"`
else
test3=`asterisk -rx "xmpp show connections"`
fi
 
test=`echo "$test3" | grep "Authen"`
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "Google Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
test=`echo "$test3" | grep "Disconn"`
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "Google Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
test=`echo "$test3" | grep "Reques"`
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "Google Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
test=`echo "$test3" | grep "Waitin"`
if [[ $test ]]; then
test2=`echo -e "Trunk off line:\n$test"`
echo $test2 | mail -r $from -s "Google Trunk Failure" $email
# echo -e "Trunk off line:\n$test"
fi
 
# end of trunkcheck script
 

Members online

Forum statistics

Threads
25,812
Messages
167,765
Members
19,241
Latest member
bellabos
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