Hello,
As now in final, possibly we will upgrade to NS8 NethVoice.
Question:
Does NethVoice has some kind of Watchdog for Trunks?
If not, then do you have plans to add this feature?
Or alternatively, how could I add it with custom code, as I am still a bit unfamiliar with the container model.
History:
In NS7 we had the problem that after loosing internet connection (either ISP side or internal network update etc) seemingly the connection would not resume even after 1 hour. So I ended up making a cron running every 15 minutes and restarts the service if needed.
My NS7 code for PJSIP trunk:
#!/bin/bash
# Asterisk Watchdog
DIR=/tmp/watchdog
if [ ! -d $DIR ]; then
mkdir $DIR
fi
cd $DIR
rm -f result
/usr/sbin/asterisk -rx 'pjsip list registrations' | grep -E '__mysipname__' | grep -Ev 'Registered' > result
if [ -s "result" ]; then
mail -s 'PJSIP status - restarting' it@tradeservice.hu < result
systemctl restart asterisk
fi
Inspired by SIP code (different status format):
Thank you for your feedback!