The Short Version:
I’ve been reading about SendDTMF, but it looks like it’s used in dialplans only, I was wondering if there was a way to send DTMF in a call file?
The Longer Version w/ some background.
This might seem like a weird question, but we’re using a bash script to monitor our Asterisk installation and send the results to our Zabbix server. Right now I’ve put together:
[code]#!/bin/bash
DATE=date +%d%m%Y-%H%M
FILENAME=Outgoing-"$DATE".call
echo “Channel: Local/1234567890@from-internal” >> /tmp/$FILENAME
echo “Application: Playback” >> /tmp/$FILENAME
echo “Data: hello-world” >> /tmp/$FILENAME
echo “MaxRetries: 2” >> /tmp/$FILENAME
echo “RetryTime: 30” >> /tmp/$FILENAME
echo “Priority: 1” >> /tmp/$FILENAME
echo “Archive: Yes” >> /tmp/$FILENAME
chmod 777 /tmp/$FILENAME
mv /tmp/$FILENAME /var/spool/asterisk/outgoing/
sleep 10
STATUS=cat /var/spool/asterisk/outgoing_done/$FILENAME |grep Status:|awk '{print $2}'
/etc/zabbix/./zabbix_sender -z 192.168.0.## -p [port] -s [hostname] -k asterisk.testcallout -o $STATUS
[/code]
This creates a test call to 1234567890 from our main line, plays back hello-world and then reports whether that call Completed, Expired, or Failed to the Zabbix server.
I’ve been asked to make another script that will call out from our Asterisk server into one of our other phone numbers on the same Asterisk server and verify that we’re able to accept incoming calls as well as make sure that they’re clear.
If there’s a simpler way to accomplish the previous requirement we’d love to hear about it is, but our thinking is modify the previous script to place a call to one of our phone numbers on the same asterisk server, have the server pick up the other line and monitor it for the proper DTMF sequence.
[code]#!/bin/bash
DATE=date +%d%m%Y-%H%M
FILENAME=Outgoing-"$DATE".call
echo “Channel: Local/18001234567@from-internal” >> /tmp/$FILENAME
echo "[Insert DTMF Command Here]"
echo “MaxRetries: 2” >> /tmp/$FILENAME
echo “RetryTime: 30” >> /tmp/$FILENAME
echo “Priority: 1” >> /tmp/$FILENAME
echo “Archive: Yes” >> /tmp/$FILENAME
chmod 777 /tmp/$FILENAME
mv /tmp/$FILENAME /var/spool/asterisk/outgoing/
[Insert Monitoring Command(s) Here]
sleep [However long necessary to make sure the test has complete]
CALLSTATUS=[Wherever we would pull whether the call status from]
CALLCLARITY=[Wherever we would pull whether the call clarity from]
Might be able to just use stdout from the previous command(s)
/etc/zabbix/./zabbix_sender -z 192.168.0.## -p [port] -s [hostname] -k asterisk.testcallinstatus -o $CALLSTATUS
/etc/zabbix/./zabbix_sender -z 192.168.0.## -p [port] -s [hostname] -k asterisk.testcallinclarity -o $CALLCLARITY
[/code]