[asterisk-users] custom voicemail e-mail

Steve Edwards asterisk.org at sedwards.com
Thu Sep 17 02:26:49 CDT 2009


On Thu, 17 Sep 2009, Patrick wrote:

> I was thinking also to replace the email sent by the voicemail by a php 
> script. My questions is simple, how do you manage to get the voicemail 
> variables from the php script ? Or, maybe, you get from stdin the 
> content of the "email" that should be send via sendmail ?

Unfortunately:

1) The command line is the value of the "mailcmd" variable from 
voicemail.conf -- no additional arguments, nothing interesting like the 
channel, exten, etc.

2) The environment is boring, nothing of value here.

3) Stdin is the header and body ready to be processed by "sendmail -t" or 
your replacement. You could define emailbody to something like:

emailbody=VM_CALLERID=${VM_CALLERID}\nVM_CIDNAME=${VM_CIDNAME}\nVM_CIDNUM=${VM_CIDNUM}\nVM_DATE=${VM_DATE}\nVM_DUR=${VM_DUR\ 
}\nVM_MAILBOX=${VM_MAILBOX}\nVM_MSGNUM=${VM_MSGNUM}\nVM_NAME=${VM_NAME}\n

to make it somewhat easy to parse. If you need something else, you could 
stuff it into CALLERID(name) before calling the voicemail application.

What do you want to accomplish?

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list