Hi, I’m new on Asterisk and I am working on a server on asterisk 18 with some extensions. One of them is a main extension for us in wich we can see all reachable extensions. How should I build a keep alive correctly? I wish that when an extension is unreachable, the server notifies to our main extension. I should use AMI or I should work on extensions_custom.conf ? Help!
Thats interesting one.
I’ve used bash scripts that I run to dump the queue and look for when no agents are in queues. From that it would be easy enough to create a call file and playback a message.
ie user=$(/sbin/asterisk -rx “queue show $i” |sed ‘/paused/d’ |grep Unav |cut -f2 -d( |cut -f1 -dn)
Then you just have part the list
Use that to generate a callfile,
AMI would be more nice than my hack. but up to you.
My hackis to ‘follow the logs’, in my startup methods I have
tail -F /var/log/asterisk/full |while read LINE; do [[ $LINE =~ 'Contact [0-9]*/' ]] && echo $LINE|tr ':' ' '|cut -d ' ' -f10,13,14,15|mail -s 'Attention' [email protected];done &
test with
cat /var/log/asterisk/full |while read LINE; do [[ $LINE =~ 'Contact [0-9]*/' ]] && echo $LINE|tr ':' ' '|cut -d ' ' -f10,13,14,15;done
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.