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 [email protected] Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users