We are talking about "mailcmd" not "externnotify" <div>I am aware of extennotify, problem is, it runs script when someone checks their voicemail, i need a script to run only when a voicemail is left....<br>
<br><div class="gmail_quote">On Mon, Apr 11, 2011 at 6:32 AM, Andrew Thomas <span dir="ltr"><<a href="mailto:andy@datavox.co.uk">andy@datavox.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Not quite true. I use a PHP script to do my processing (called from<br>
voicemail.conf [externnotify = /usr/local/bin/vmnotify.php]).<br>
<br>
The main three lines are:<br>
<br>
$vm_context = $argv[1];<br>
$extension = $argv[2];<br>
$number_of_messages = $argv[3];<br>
<br>
Self explanatory really.<br>
<div class="im"><br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>
</div><div class="im">[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>] On Behalf Of vip killa<br>
Sent: 10 April 2011 05:57<br>
To: Asterisk Users Mailing List - Non-Commercial Discussion<br>
</div><div class="im">Subject: Re: [asterisk-users] send voicemail to multiple emails<br>
<br>
<br>
</div><div><div></div><div class="h5">I've already taken the steps you described...issue i ran into was there<br>
is no variables passed to "mailcmd" only STDIN... as a result i have to<br>
"extract" variables from STDIN...<br>
<br>
<br>
On Fri, Apr 8, 2011 at 5:09 PM, Warren Selby <<a href="mailto:wcselby@selbytech.com">wcselby@selbytech.com</a>><br>
wrote:<br>
<br>
On Fri, Apr 8, 2011 at 1:18 PM, vip killa <<a href="mailto:vipkilla@gmail.com">vipkilla@gmail.com</a>> wrote:<br>
<br>
That does not sound easy... besides these email addresses would be taken<br>
from a MySQL database.<br>
<br>
<br>
<br>
<br>
It's actually what you're going to end up doing, whether you do it on<br>
the MTA level or your code it into your script that you execute instead<br>
of sendmail -f. Currently, there is no way to natively have asterisk<br>
send one voicemail to multiple email addresses.<br>
<br>
What's probably going to work best for you since you seem to like<br>
program your own scripts (and I'm not talking an AGI here, I'm talking<br>
either pure bash, php, perl, or whichever you prefer), is to change the<br>
mailcmd= option inside voicemail.conf and replace it with a script of<br>
your own design. I'm not sure off the top of my head which variables<br>
are passed to the command, but you could always write a simple script<br>
that just outputs all arguments to see and go from there. My guess is<br>
you're going to at the least get the preconfigured email address and the<br>
contents of your emailsubject and emailbody options (both of which have<br>
the option of passing multiple useful variables).<br>
<br>
<br>
--<br>
Thanks,<br>
--Warren Selby, dCAP<br>
<a href="http://www.selbytech.com" target="_blank">http://www.selbytech.com</a><br>
<br>
--<br>
_____________________________________________________________________<br>
</div></div><div class="im">-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
<br>
<br>
</div> If you have received this communication in error we would appreciate<br>
you advising us either by telephone or return of e-mail. The contents<br>
of this message, and any attachments, are the property of DataVox,<br>
and are intended for the confidential use of the named recipient only.<br>
If you are not the intended recipient, employee or agent responsible<br>
for delivery of this message to the intended recipient, take note that<br>
any dissemination, distribution or copying of this communication and<br>
its attachments is strictly prohibited, and may be subject to civil or<br>
criminal action for which you may be liable.<br>
Every effort has been made to ensure that this e-mail or any attachments<br>
are free from viruses. While the company has taken every reasonable<br>
precaution to minimise this risk, neither company, nor the sender can<br>
accept liability for any damage which you sustain as a result of viruses.<br>
It is recommended that you should carry out your own virus checks<br>
before opening any attachments.<br>
<br>
Registered in England. No. 27459085.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div>