Re: [asterisk-users] send voicemail to multiple emails

2011-04-13 Thread M Hulber
Instead of picking from multiple scripts, send the action to the script 
in a variable like the dial status


On 4/12/11 4:58 PM, Warren Selby wrote:

Sorry for the top post, on my phone...

It makes sense for someone who has written a custom visual voicemail 
application to be able know when the vm has been checked...and that's 
just one example off the top of my head.


What I think would really be nice is that instead of removing features 
from externnotify, it could be enhanced in a way that you can tell it 
to run one script on a new vm, and a different one on a checked vm, 
and yet another one on a deleted vm, etc. Obviously all of the bases 
would have to be covered (move vm, listen to vm but not delete, skip 
vm, new vm, transferred vm, etc).


If I had the programming chops, I would take a crack at it myself.

Thanks,
--Warren Selby, dCAP

On Apr 12, 2011, at 3:28 PM, vip killa vipki...@gmail.com 
mailto:vipki...@gmail.com 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.


On Tue, Apr 12, 2011 at 4:26 PM, Steve Edwards asterisk.org 
http://asterisk.org@sedwards.com http://sedwards.com wrote:


On Tue, 12 Apr 2011, vip killa wrote:

i ended up modify app_voicemail.c to not run
externnotify when someone checks their voicemail, it
now only runs when a new message is left... then
externnotify will send out the emails and other
notifications...


On Tue, 12 Apr 2011, Steve Edwards wrote:

I would suggest that enhancing mailcmd to include relevant
channel variables (like VM_*) in the child environment or on
the command line would be more useful than changing the
behavior of externnotify.


The 'difference' between enhancing mailcmd and changing
externotify is that the enhancement can be contributed and
accepted into the source so everybody can use it and the Asterisk
developers will maintain it for you while your change will always
be yours alone to remember to re-apply and update with each
revision of Asterisk.


-- 
Thanks in advance,

-
Steve Edwards sedwa...@sedwards.com
mailto:sedwa...@sedwards.com  Voice: +1-760-468-3867
tel:%2B1-760-468-3867 PST
Newline  Fax:
+1-760-731-3000 tel:%2B1-760-731-3000

--
_
-- 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



--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-13 Thread vip killa
I understand now the need for externnotify to run on vm check is to update
MWI. But I agree with M Hulber, an extra variable would be nice to tell the
script why externnotify was called...

On Wed, Apr 13, 2011 at 6:32 AM, M Hulber asterisk.ad...@hulber.com wrote:

  Instead of picking from multiple scripts, send the action to the script in
 a variable like the dial status


--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-12 Thread Andrew Thomas
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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 a...@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-boun...@lists.digium.com

[mailto:asterisk-users-boun...@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 wcse...@selbytech.com
wrote:

On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@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

 

--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-12 Thread vip killa
I already am using 'distribution groups', the point is I want 2 or more
emails to be sent per mailbox...
I've already figured out how i'm going to do this... i ended up modify
app_voicemail.c to not run externnotify when someone checks their
voicemail, it now only runs when a new message is left... then externnotify
will send out the emails and other notifications...

On Tue, Apr 12, 2011 at 4:30 AM, Andrew Thomas a...@datavox.co.uk wrote:

  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.



--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-12 Thread Steve Edwards

On Tue, 12 Apr 2011, vip killa wrote:

i ended up modify app_voicemail.c to not run externnotify when someone 
checks their voicemail, it now only runs when a new message is left... 
then externnotify will send out the emails and other notifications...


I would suggest that enhancing mailcmd to include relevant channel 
variables (like VM_*) in the child environment or on the command line 
would be more useful than changing the behavior of externnotify.


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

--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-12 Thread Steve Edwards

On Tue, 12 Apr 2011, 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.


Even if it makes sense to everybody on the list, changes that conflict 
with documented and implemented behavior that other users may be depending 
on are unlikely to be accepted.


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

--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-12 Thread Jim Dickenson
If you want externnotify to not fire when someone checks then put in a new 
option in voicemail.conf to have it work that way. Then contribute that change 
and it might be accepted.

externnotify_on_check: yes|no

or some such thing.
-- 
Jim Dickenson
mailto:dicken...@cfmc.com

CfMC
http://www.cfmc.com/



On Apr 12, 2011, at 1:52 PM, Steve Edwards wrote:

 On Tue, 12 Apr 2011, 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.
 
 Even if it makes sense to everybody on the list, changes that conflict with 
 documented and implemented behavior that other users may be depending on are 
 unlikely to be accepted.
 
 -- 
 Thanks in advance,
 -
 Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
 Newline  Fax: +1-760-731-3000
 
 --
 _
 -- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread A J Stiles
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@localhost bob@localhost char...@some.place.else dave@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.

--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread Andrew Thomas
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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 wcse...@selbytech.com
wrote:

On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread vip killa
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 a...@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-boun...@lists.digium.com
 [mailto:asterisk-users-boun...@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 wcse...@selbytech.com
 wrote:

 On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@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

--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread Sherwood McGowan
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 wcse...@selbytech.com
 mailto:wcse...@selbytech.com wrote:

 On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@gmail.com
 mailto:vipki...@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.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread vip killa
Would be so much simpler if mailcmd acted just like externnotify or
externnotify only ran when a message was left but not when someone checks
their voicemail...


 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.


--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread Sherwood McGowan
On 4/11/2011 12:30 PM, vip killa wrote:
 Would be so much simpler if mailcmd acted just like externnotify
 or externnotify only ran when a message was left but not when
 someone checks their voicemail...
  

 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.


 --
 _
 -- 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

I think you're confused about how it works. When someone leaves a
voicemail, Asterisk sends a notification email, by piping an email to
the defined mailcmd (by default, again, 'sendmail -t')...which is
exactly what you're wishing it didmaybe you need to do some more
reading?

Why do you think it works in a different way?

-- 
Sherwood McGowan sherwood.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread vip killa
I'm not confused about this...
Everytime a voicemail is left, I need asterisk to run a script that will
query a database, and according to those results perform various actions.
These actions include calling a number and connecting it directly to
voicemailmain and/or sending out multiple emails... I'm able to accomplish
this using mailcmd, reading the STDIN, parsing out what i need such as the
mailbox but I'm not sure how stable this method is I'd rather use
externnotify because it is designed to a run script 

On Mon, Apr 11, 2011 at 1:34 PM, Sherwood McGowan 
sherwood.mcgo...@gmail.com wrote:

 On 4/11/2011 12:30 PM, vip killa wrote:
  Would be so much simpler if mailcmd acted just like externnotify
  or externnotify only ran when a message was left but not when
  someone checks their voicemail...
 
 
  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.
 
 
  --
  _
  -- 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

 I think you're confused about how it works. When someone leaves a
 voicemail, Asterisk sends a notification email, by piping an email to
 the defined mailcmd (by default, again, 'sendmail -t')...which is
 exactly what you're wishing it didmaybe you need to do some more
 reading?

 Why do you think it works in a different way?

 --
 Sherwood McGowan sherwood.mcgo...@gmail.com
 Carrier, ITSP, Call Center, and PBX Solutions Consultant


 --
 _
 -- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread vip killa
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-users

Re: [asterisk-users] send voicemail to multiple emails

2011-04-11 Thread Sherwood McGowan
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-users
Ah, 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.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-09 Thread vip killa
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 wcse...@selbytech.com wrote:

 On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@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

[asterisk-users] send voicemail to multiple emails

2011-04-08 Thread vip killa
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-users

Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Danny Nicholas
  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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.

--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Sherwood McGowan
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-users
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.



-- 
Sherwood McGowan sherwood.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Danny Nicholas


 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
 boun...@lists.digium.com] On Behalf Of Sherwood McGowan
 Sent: Friday, April 08, 2011 1:16 PM
 To: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] send voicemail to multiple emails
 
 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-users
 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.
 
 
 
 --
 Sherwood McGowan sherwood.mcgo...@gmail.com

[Danny Nicholas] 
That is a grand suggestion - as much as I like Asterisk, it is always easier
to let Linux do the grunt work when applicable.


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread vip killa
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.

--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Danny Nicholas
  _  

From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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
b...@example.com, send it to account...@example.com (set this up in
users.conf)

--
_
-- 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

Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Sherwood McGowan
On 4/8/2011 1:18 PM, vip killa wrote:
 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.


 --
 _
 -- 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

Easy for you and easiest to configure are two different things. Aliasing
email addresses to multiple addresses is not a problem for me, so I
shared what I know.

You could also just replace the mailcmd (usually sendmail -t) with a
script that you wrote (or even application, if you care to compile
something) that would take care of the functionality you wish.

If you don't think that's easy, just ignore my message, we're not here
to compare skill levels.

-- 
Sherwood McGowan sherwood.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Sherwood McGowan
On 4/8/2011 1:20 PM, Danny Nicholas wrote:

 -Original Message-
 From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-
 boun...@lists.digium.com] On Behalf Of Sherwood McGowan
 Sent: Friday, April 08, 2011 1:16 PM
 To: asterisk-users@lists.digium.com
 Subject: Re: [asterisk-users] send voicemail to multiple emails

 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-users
 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.



 --
 Sherwood McGowan sherwood.mcgo...@gmail.com
 [Danny Nicholas] 
 That is a grand suggestion - as much as I like Asterisk, it is always easier
 to let Linux do the grunt work when applicable.


 --
 _
 -- 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
Thanks Danny, it's the solution I've used many many times :)

-- 
Sherwood McGowan sherwood.mcgo...@gmail.com
Carrier, ITSP, Call Center, and PBX Solutions Consultant


--
_
-- 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


Re: [asterisk-users] send voicemail to multiple emails

2011-04-08 Thread Warren Selby
On Fri, Apr 8, 2011 at 1:18 PM, vip killa vipki...@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