FS: Rename SIP Profiles
This commit is contained in:
parent
0e24b1e31b
commit
1fbe4aef12
10 changed files with 333 additions and 514 deletions
|
@ -9,31 +9,32 @@ LOGFILE="/var/log/monitor_fs.log"
|
|||
|
||||
IFS=
|
||||
FS_STATUS="$(fs_cli -x 'sofia status')"
|
||||
FS_STATUS_GW="$(fs_cli -x 'sofia status gateway')"
|
||||
|
||||
if !(echo $FS_STATUS | egrep -q "internal.*<%= @mncc_ip_address %>"); then
|
||||
logc "Missing internal profile! Restarting Profile";
|
||||
fs_cli -x "sofia profile internal stop"
|
||||
if !(echo $FS_STATUS | egrep -q "GERAN.*<%= @mncc_ip_address %>"); then
|
||||
logc "Missing GERAN profile! Restarting Profile";
|
||||
fs_cli -x "sofia profile GERAN stop"
|
||||
sleep 10
|
||||
fs_cli -x "sofia profile internal start"
|
||||
fs_cli -x "sofia profile GERAN start"
|
||||
fi
|
||||
|
||||
if !(echo $FS_STATUS | grep -q "external::provider") && (ping -qc 5 8.8.8.8 > /dev/null); then
|
||||
logc "Missing external provider! Restarting Profile";
|
||||
fs_cli -x "sofia profile external stop"
|
||||
if !(echo $FS_STATUS_GW | grep -q "extrtp::extrtp") && (ping -qc 5 8.8.8.8 > /dev/null); then
|
||||
logc "Missing external RTP Gateway. Restarting Profile";
|
||||
fs_cli -x "sofia profile extrtp stop"
|
||||
sleep 10
|
||||
fs_cli -x "sofia profile external start"
|
||||
fs_cli -x "sofia profile extrtp 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"
|
||||
if !(echo $FS_STATUS_GW | grep -q "vpn::rhizomatica") && (ping -qc 5 10.23.0.2 > /dev/null); then
|
||||
logc "Missing VPN Gateway. Restarting Profile";
|
||||
fs_cli -x "sofia profile vpn stop"
|
||||
sleep 10
|
||||
fs_cli -x "sofia profile outgoing start"
|
||||
fs_cli -x "sofia profile vpn 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"
|
||||
if !(echo $FS_STATUS | grep -q "rem_xcode") && (ping -qc 5 10.23.0.2 > /dev/null); then
|
||||
logc "Missing Remote Transcoding Profile. Restarting FreeSWITCH profile";
|
||||
fs_cli -x "sofia profile rem_xcode stop"
|
||||
sleep 10
|
||||
fs_cli -x "sofia profile internalvpn start"
|
||||
fs_cli -x "sofia profile rem_xcode start"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue