Send notification email for each outgoing call, how?

I maintain a PBX for a statewide non-profit, using FreePBX 2.10.1.9. They don’t do many outbound calls; most calls are inbound, or intra-network (i.e. from one PBX extension to another). Because of the hacking episode I recently (last few days) described in another post on this forum, I would like to arrange to receive an email on my cell phone whenever anyone makes an outbound call, including the outbound route used, and the number called.

Here’s what I’ve done so far, just to get the basics of this working, and so far no joy.

My FreePBX-generated extensions_additional.conf, which is #include’d in extensions.conf which also #include’s extensions_custom.conf (so, all three of these should be visible), contains this:

[outrt-1] ; RouteName1
include => outrt-1-custom
…then a bunch of dial plan rules, all of which work…

[outrt-2] ; RouteName2
include => outrt-2-custom
…then a bunch of dial plan rules, all of which work…

[outrt-3] ; RouteName3
include => outrt-3-custom
…then a bunch of dial plan rules, all of which work…

[outrt-4] ; RouteName4
include => outrt-4-custom
…then a bunch of dial plan rules, all of which work…

My extensions_custom.conf file, that I hand-edit, contains this to (a) send an empty email to my cell phone, just alerting me (by the subject of the email) that an outgoing call is happening; and (b) put an empty file in /etc/asterisk with the filename “junk.outrt” so I’ll know the sequence was executed:

[outrt-custom]
exten => s,1,System(mail -s “Call out” [email protected] < /dev/null)
exten => s,n,System(touch junk.outrt)

[outrt-1-custom]
include => outrt-custom

[outrt-2-custom]
include => outrt-custom

[outrt-3-custom]
include => outrt-custom

[outrt-4-custom]
include => outrt-custom

No joy… no email received on my cell, and no junk.outrt file in /etc/asterisk.

I did try hand-executing mail -s “Call out” [email protected] < /dev/null just to verify that I have the mail calling syntax correct, and it works.

As I said this is just to get the basics running… then I’ll deal with how to put useful information in the mail subject line, like number called, date/time, etc.

I’m sure it’s some basic noob thing…

Eric in NH