Is there a way for asterisk's voicemail to send an email (including voicemail attachment) to multiple email addresses? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110408/8908db5f/attachment.htm>
_____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vip killa Sent: Friday, April 08, 2011 1:13 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] send voicemail to multiple emails Is there a way for asterisk's voicemail to send an email (including voicemail attachment) to multiple email addresses? [Danny Nicholas] If you set up a "mail group" that might do it. I personally do this with an AGI, but then I work too hard. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110408/b947e666/attachment.htm>
On 4/8/2011 1:13 PM, vip killa wrote:> Is there a way for asterisk's voicemail to send an email (including > voicemail attachment) to multiple email addresses? > > > -- > _____________________________________________________________________ > -- 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-usersThe easiest way would be to set up an alias in your MTA configuration. That way, you could configure the mailbox for the alias email address and copies would be sent to all addresses in the alias definition. -- Sherwood McGowan <sherwood.mcgowan at gmail.com> Carrier, ITSP, Call Center, and PBX Solutions Consultant
That does not sound easy... besides these email addresses would be taken from a MySQL database.> The easiest way would be to set up an alias in your MTA configuration. > That way, you could configure the mailbox for the alias email address > and copies would be sent to all addresses in the alias definition. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110408/5401d791/attachment.htm>
_____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vip killa Sent: Friday, April 08, 2011 1:18 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] send voicemail to multiple emails That does not sound easy... besides these email addresses would be taken from a MySQL database. The easiest way would be to set up an alias in your MTA configuration. That way, you could configure the mailbox for the alias email address and copies would be sent to all addresses in the alias definition. [Danny Nicholas] Actually, it is MUCH easier than it sounds. Instead of sending an email to bob at example.com, send it to accounting at example.com (set this up in users.conf) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110408/f22d2a5e/attachment.htm>
On Friday 08 Apr 2011, vip killa wrote:> Is there a way for asterisk's voicemail to send an email (including > voicemail attachment) to multiple email addresses?It's probably easiest to set up a user on your mail server to receive the voicemail messages that are meant for multiple recipients, then just use a procmail recipe on that user's account to send copies to everyone else who needs one. Something like this; :0: * From:.*asterisk !anna at localhost bob at localhost charlie at some.place.else dave at localhost This is all from memory, so be sure to read `man procmail` ..... To save space on the mail server, you might want to pipe it through a script which strips off the attachment and saves it to a password-protected folder where apache can serve it up by HTTP, then notify the intended recipients with a short message (but note I grew up in the days of kilobytes aot gigabytes, so this might be overkill). -- AJS Answers come *after* questions.
Not quite true. I use a PHP script to do my processing (called from voicemail.conf [externnotify = /usr/local/bin/vmnotify.php]). The main three lines are: $vm_context = $argv[1]; $extension = $argv[2]; $number_of_messages = $argv[3]; Self explanatory really. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vip killa Sent: 10 April 2011 05:57 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] send voicemail to multiple emails 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> wrote: On Fri, Apr 8, 2011 at 1:18 PM, vip killa <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 If you have received this communication in error we would appreciate you advising us either by telephone or return of e-mail. The contents of this message, and any attachments, are the property of DataVox, and are intended for the confidential use of the named recipient only. If you are not the intended recipient, employee or agent responsible for delivery of this message to the intended recipient, take note that any dissemination, distribution or copying of this communication and its attachments is strictly prohibited, and may be subject to civil or criminal action for which you may be liable. Every effort has been made to ensure that this e-mail or any attachments are free from viruses. While the company has taken every reasonable precaution to minimise this risk, neither company, nor the sender can accept liability for any damage which you sustain as a result of viruses. It is recommended that you should carry out your own virus checks before opening any attachments. Registered in England. No. 27459085.
On 4/11/2011 12:47 PM, vip killa wrote:> Anyway, i figured out how to accomplish this using "externnotify"... > In app_voicemail.c, in the function "vm_execmain" i > commented out "run_externnotify(vmu->context, vmu->mailbox, NULL);" > Now "externnotify" is called by asterisk only when there is a new > message and not when someone checks their voicemail... > > > -- > _____________________________________________________________________ > -- 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-usersAh, there was the problem, apparently somewhere along the way the fact that your complaint was with externnotify and not mailcmd got lost. -- Sherwood McGowan <sherwood.mcgowan at gmail.com> Carrier, ITSP, Call Center, and PBX Solutions Consultant
So why not simply go back to square one and create a 'distribution group' e-mail address - and send to that? You've probably realised by now that if you want * to do something it doesn't already do - you have to write that bit yourself. Good luck. ________________________________ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vip killa Sent: 11 April 2011 13:09 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] send voicemail to multiple emails We are talking about "mailcmd" not "externnotify" 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.... On Mon, Apr 11, 2011 at 6:32 AM, Andrew Thomas <andy at datavox.co.uk> wrote: Not quite true. I use a PHP script to do my processing (called from voicemail.conf [externnotify = /usr/local/bin/vmnotify.php]). The main three lines are: $vm_context = $argv[1]; $extension = $argv[2]; $number_of_messages = $argv[3]; Self explanatory really. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of vip killa Sent: 10 April 2011 05:57 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] send voicemail to multiple emails 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> wrote: On Fri, Apr 8, 2011 at 1:18 PM, vip killa <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 If you have received this communication in error we would appreciate you advising us either by telephone or return of e-mail. The contents of this message, and any attachments, are the property of DataVox, and are intended for the confidential use of the named recipient only. If you are not the intended recipient, employee or agent responsible for delivery of this message to the intended recipient, take note that any dissemination, distribution or copying of this communication and its attachments is strictly prohibited, and may be subject to civil or criminal action for which you may be liable. Every effort has been made to ensure that this e-mail or any attachments are free from viruses. While the company has taken every reasonable precaution to minimise this risk, neither company, nor the sender can accept liability for any damage which you sustain as a result of viruses. It is recommended that you should carry out your own virus checks before opening any attachments. Registered in England. No. 27459085. -- _____________________________________________________________________ -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110412/7ea15143/attachment.html>
One of those points being to turn off a MWI if the total number of msgs reaches 0. Not everyone uses the same extension number for the user as for the device they are on (think hot-desking). I'm glad you got it to work your way :) -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Tilghman Lesher Sent: 12 April 2011 22:43 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] send voicemail to multiple emails On Tuesday 12 April 2011 15:28:50 vip killa wrote:> Honestly, I don't understand why "externnotify" should run when > someone checks their voicemail... the change i made, makes sense so > maybe that should be contributed to the asterisk source.The point of it is to run whenever there is a potential change in state. It runs after someone checks voicemail, because checking voicemail can clear new messages (or change the number of new messages). You are certainly welcome, in the external notification script to exit early, if you determine that further action is not necessary. The idea that we even need an extra flag for this is ridiculous. If there is that much penalty in starting up another script instance, you're using the wrong scripting language or the wrong machine. -- Tilghman -- _____________________________________________________________________ -- 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 If you have received this communication in error we would appreciate you advising us either by telephone or return of e-mail. The contents of this message, and any attachments, are the property of DataVox, and are intended for the confidential use of the named recipient only. If you are not the intended recipient, employee or agent responsible for delivery of this message to the intended recipient, take note that any dissemination, distribution or copying of this communication and its attachments is strictly prohibited, and may be subject to civil or criminal action for which you may be liable. Every effort has been made to ensure that this e-mail or any attachments are free from viruses. While the company has taken every reasonable precaution to minimise this risk, neither company, nor the sender can accept liability for any damage which you sustain as a result of viruses. It is recommended that you should carry out your own virus checks before opening any attachments. Registered in England. No. 27459085.