Email When Certain Numbers Are Called
Hi. I have an installation of asterisk 11 and i have ssmtp in the system to send emails. I would like to get informed by email when someone dials a set of numbers eg international calls or premium numbers with the country. my dialplan is simple enough and it is the following:
[DefaultPlan]exten =>
_XXXXXXXXXX,1,Dial(SIP/VoipGate/${EXTEN},120,Tt)exten =>
_XXXXXXXXXX,1,Busy()
exten => _4XX,2,Answer()exten =>
_4XX,3,VoiceMail(${EXTEN}@BranchA,su)exten => _4XX,4,HangUp()exten =>
_4XX,102,Answer()exten => _4XX,103,VoiceMail(${EXTEN}@BranchA,sb)exten
=> _4XX,104,HangUp()
One thought on - Email When Certain Numbers Are Called
exten => _XXXXXXXXXX,1,System(echo “Dialed number ${EXTEN} on Asterisk from ${CALLERID(num)}” | mail -s “Dialed number ${EXTEN} on Asterisk from ${CALLERID(num)}” -a “From: Asterisk PBX” yo uremail@address.com)
exten => _XXXXXXXXXX,2,Dial(SIP/VoipGate/${EXTEN},120,Tt)