@avayax wrote:
I have a custom dial plan in extensions_custom.conf to send an email to security whenever a 911 call was made.
This works well, but I have an additional requirement.
I need to be able to send the email to a different recipient depending on what extension (or CID) made the call.Reason being, that some extensions are remote and a different security person has to be notified.
So, e.g. if 911 call was made from extension 1234 or 1235, send the email to email address 1.
From all other extensions, send email to address 2.How would I change below dial plan to do that?
[macro-dialout-trunk-predial-hook] exten => s,1,ExecIf($["${OUTNUM}"="911"]?System(echo "Ext ${AMPUSER} - ${AMPUSERCIDNAME} just placed a 911 emergency call on ${STRFTIME(%C%m%d%y%H%M)}" | mailx -r "asterisk@abcd.org" -s "911 Alert from ext ${AMPUSER} - ${AMPUSERCIDNAME}" 1234567890@vtext.com)) exten => s,n,MacroExit()
Posts: 2
Participants: 2