parent
6fc187dd8b
commit
871697aa92
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#Bruno Thibodeau
|
||||||
|
#FreePBX 13
|
||||||
|
|
||||||
|
|
||||||
|
#Sortir les trunk et leur status
|
||||||
|
trunks=($(asterisk -rx "pjsip show registrations" ! grep Registered | awk '{print$3}'))
|
||||||
|
|
||||||
|
#Compter le nombre de trunk "Registered"
|
||||||
|
trstatus=($(echo ${trunks[*]} | grep -o 'Registered' | wc -l))
|
||||||
|
#echo $trstatus
|
||||||
|
|
||||||
|
#Si moins de deux trunks enregistrés, repartir le process
|
||||||
|
if (( $trstatus != 2 )) ; then $(which fwconsole) reload; fi
|
||||||
Loading…
Reference in new issue