Hi all,
I need to get some monitoring in place that will ensure that an asterisk server is receiving calls. I want my home asterisk server to call the monitored server (from the Managers Interface) regularly and when the IVR answers, enter an extension (dtmf). The call should then be transferred to a special extension that answers and then sends a ‘123’ sequence of dtmf tones. My home asterisk server should read these tones and detect that the ‘123’ it received is a sign that everything is ok. If I make the call to my cell phone I can hear that my home server is sending the tones and I can manually enter a ‘123’ and the process completes as expected. Also, if I call the special extension internally at work I can hear the ‘123’ being sent. The problem is when I have the call go to the monitored server it never gets transferred from the ivr. Here are clips of the code in use:
home server extensions.conf
[check_asterisk]
;exten => s,1,Wait(1)
exten => s,1,Answer
exten => s,n,Wait(3)
exten => s,n,SendDTMF(100)
exten => s,n,Read(digit,3,5)
exten => s,n,GotoIf($["${digit}" = “123”]?200:400)
exten => s,200,System(/usr/bin/asterisk_happy.sh)
exten => s,400,System(/usr/bin/asterisk_down.sh)
exten => s,n,Hangup
monitored server extensions.conf
;Extension for asterisk monitoring
exten => 799,1,Answer
exten => 799,n,Wait(1)
exten => 799,n,SendDTMF(123)
exten => 799,n,Hangup
code entered in Manager’s Interface on home server:
Action: Originate
Channel: SIP/from_pstn/XXXXXXXXXX <—work phone number
MaxRetries: 1
RetryTime: 60
Context: check_asterisk
Priority: 1Action: Originate
Any help is appreciated.
Thanks,
Brad