[asterisk-users] send voicemail to multiple emails

Sherwood McGowan sherwood.mcgowan at gmail.com
Mon Apr 11 11:13:33 CDT 2011


On 4/9/2011 11:56 PM, vip killa wrote:
> I've already taken the steps you described...issue i ran into was
> there is no variables passed to "mailcmd" only STDIN... as a result i
> have to "extract" variables from STDIN...
>
> On Fri, Apr 8, 2011 at 5:09 PM, Warren Selby <wcselby at selbytech.com
> <mailto:wcselby at selbytech.com>> wrote:
>
>     On Fri, Apr 8, 2011 at 1:18 PM, vip killa <vipkilla at gmail.com
>     <mailto:vipkilla at gmail.com>> wrote:
>
>         That does not sound easy... besides these email addresses
>         would be taken from a MySQL database.
>          
>
>
>     It's actually what you're going to end up doing, whether you do it
>     on the MTA level or your code it into your script that you execute
>     instead of sendmail -f.  Currently, there is no way to natively
>     have asterisk send one voicemail to multiple email addresses.
>
>     What's probably going to work best for you since you seem to like
>     program your own scripts (and I'm not talking an AGI here, I'm
>     talking either pure bash, php, perl, or whichever you prefer), is
>     to change the mailcmd= option inside voicemail.conf and replace it
>     with a script of your own design.  I'm not sure off the top of my
>     head which variables are passed to the command, but you could
>     always write a simple script that just outputs all arguments to
>     see and go from there.  My guess is you're going to at the least
>     get the preconfigured email address and the contents of your
>     emailsubject and emailbody options (both of which have the option
>     of passing multiple useful variables). 
>
>     -- 
>     Thanks,
>     --Warren Selby, dCAP
>     http://www.selbytech.com
>
>     --
>     _____________________________________________________________________
>     -- 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
>
>
>
> --
> _____________________________________________________________________
> -- 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
That's pretty much where you're at. What gets passed to STDIN is an
email, it's not set up for use by a script. Remember, what you're doing
is asking Asterisk to do something out of the ordinary, hence why having
an email alias is typically the best solution.

-- 
Sherwood McGowan <sherwood.mcgowan at gmail.com>
Carrier, ITSP, Call Center, and PBX Solutions Consultant




More information about the asterisk-users mailing list