Rafael Bermúdez
2011-Apr-02 18:03 UTC
[asterisk-users] Is it possible to dial an automated message when Asterisk receives an email?
Hello. I have a server that sends a preformatted email when an event occur. What I need is that when Asterisk receives this email automatically dial a pre-recorded message. It doesn't have to dial ride away, maybe a scheduled cron job will be enough. Is that possible? Any hint? What should I be looking for? Thanks, and sorry for my lousy English -- Berm?dez Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110402/3b45b415/attachment.htm>
John Kiniston
2011-Apr-02 18:39 UTC
[asterisk-users] Is it possible to dial an automated message when Asterisk receives an email?
You could use a procmail recipe to create a call file and then move it to the /var/spool/asterisk/outgoing directory. Below is a untested example .procmailrc: :0: * ^To.trigger at example.com | /usr/local/bin/callout.sh where callout.sh would look like this perhaps: !/bin/bash sleep 5 CALL="callout.call"; echo channel: LOCAL/NUMBER at pstn-local > /tmp/$CALL; echo context: ivr-call-out >> /tmp/$CALL; echo exten: s >> /tmp/$CALL; echo priority: 1 >> /tmp/$CALL; echo mv /tmp/$CALL /var/spool/asterisk/outgoing done Again all untested writing by the seat of my pants type stuff. 2011/4/2 Rafael Berm?dez <r.n.bermudez at gmail.com>:> Hello. > > I have a server that sends a preformatted email when an event occur. What I > need is that when Asterisk receives this email automatically dial a > pre-recorded message. It doesn't have to dial ride away, maybe a scheduled > cron job will be enough. > > Is that possible? Any hint? What should I be looking for? > > > Thanks, and sorry for my lousy English > > -- > Berm?dez Rafael > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > ? ? ? ? ? ? ? http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > ? http://lists.digium.com/mailman/listinfo/asterisk-users >
Steve Edwards
2011-Apr-02 18:49 UTC
[asterisk-users] Is it possible to dial an automated message when Asterisk receives an email?
On Sat, 2 Apr 2011, Rafael Berm?dez wrote:> I have a server that sends a preformatted email when an event occur. > What I need is that when Asterisk receives this email automatically dial > a pre-recorded message. It doesn't have to dial ride away, maybe a > scheduled cron job will be enough.Procmail, call files and a little scripting would be one approach. Can you take a step back up the chain and have your server: ) Execute the script to create the call file? ) Create the call file on a shared drive? ) Connect to Asterisk via AMI to originate the call?> Thanks, and sorry for my lousy EnglishProbably much better than my <whatever part of the world you are in>ish. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000