[asterisk-users] E-Mail notification for each received call

Administrator admin at tootai.net
Fri Mar 27 03:24:33 CDT 2020

Le 26/03/2020 à 21:50, Kai Herlemann a écrit :
> Hi everybody,
Hi Kai
> we use Asterisk to route all calls to a inbound phone number to a
> specific outbund mobile phone number, depending on time and date. I'd
> like to send a notification email to a specific email address, each time
> we receive a call. For this I used the tip of "dicko" here
> [1]. I'm a Asterisk newbie.
> Unfortunately it doesn't work. The System() command is not executed.
> I've tried to execute the a simple bash script for testing purposes
> (write a test string with > into a file, it's attached) - even that
> doesn't work. Even if I try it with System(/bin/bash <testfile>), it
> makes no difference.
> My test bash script and extension_custom.conf file is attached.
> This advice, which is is related to the first one, didn't help, too. [2]
> Our system is the most current FreePBX Distro release, Asterisk 16.9.0
> and DAHDI. (We can't use VoIP, the communications department uses a
> proprietary protocol.)
> Also "core set debug"/"core set verbose" didn't help.
> Any help is appreciated.
> Kind regards,
> Kai
> [1]
> https://community.freepbx.org/t/send-email-or-sms-notification-for-every-inbound-hangup-call/45169
> [2]
> https://community.freepbx.org/t/email-notification-of-incoming-missed-call/29913

Hangup is h extension. your macro will never be executed. Solution:

same = n,Dial(whatever)
same = n,[...])
same = n,Hangup

exten  = h,1,1,DumpChan()
  same = n,System(/home/asterisk/bash_test)


More information about the asterisk-users mailing list