From 1c0962480bf9499155c6b2059ec1d9bca707d3af Mon Sep 17 00:00:00 2001 From: Monocots Date: Sun, 16 Jun 2019 11:35:33 +0000 Subject: [PATCH] FS monitoring, check the outgoing profile --- modules/rhizo_base/files/bin/monitor_freeswitch.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/rhizo_base/files/bin/monitor_freeswitch.sh b/modules/rhizo_base/files/bin/monitor_freeswitch.sh index 5cf12d5..5fe3bef 100755 --- a/modules/rhizo_base/files/bin/monitor_freeswitch.sh +++ b/modules/rhizo_base/files/bin/monitor_freeswitch.sh @@ -24,6 +24,13 @@ if !(echo $FS_STATUS | grep -q "external::provider") && (ping -qc 5 8.8.8.8 > /d fs_cli -x "sofia profile external start" fi +if !(echo $FS_STATUS | grep -q "outgoing::rhizomatica") && (ping -qc 5 10.23.0.2 > /dev/null); then + logc "Missing outgoing profile! Restarting Profile"; + fs_cli -x "sofia profile outgoing stop" + sleep 10 + fs_cli -x "sofia profile outgoing start" +fi + if !(echo $FS_STATUS | grep -q "internalvpn") && (ping -qc 5 10.23.0.2 > /dev/null); then logc "Missing internal VPN. Restarting FreeSWITCH profile"; fs_cli -x "sofia profile internalvpn stop"