Re: [asterisk-dev] Notification when no message left

2014-03-08 Thread Matthew Jordan
On Fri, Mar 7, 2014 at 4:27 PM, Ben RUBSON ben.rub...@gmail.com wrote:
 Hello,

 It could be useful to have an option to be notified by mail when the caller 
 does not leave a message on the voicemail.

 We could add two options :
 - notifynomsg=yes|no
 - emailbodynomsg=${VM_DATE}, ${VM_CIDNAME} - ${VM_CIDNUM} called but did not 
 leave a message

 I use Asterisk 1.8 on my Debian stable box (exact version is 
 1.8.13.1~dfsg1-3+deb7u3), could we think about a patch for it ?


A few things:

(1) In general, new features are typically written for Asterisk trunk.
Improvements and new features are generally not made in release
branches [1]. If someone did write such a new feature, they could of
course back port it to 1.8, but it would not be included in the
branch.

(2) As time has gone on, the philosophy in the Asterisk project has
moved away from providing monolithic applications with lots of levers
to control functionality to providing you the building blocks to build
your applications. This is evident not only in the interfaces Asterisk
has traditionally exposed, but also in the interfaces we've added
recently [2]. The goal is that you would be able to build your own
voicemail application with what customizations and features you want,
rather than requiring changes in the C modules themselves. Hence, the
emphasis on new feature development has moved away from tweaking the
existing dialplan applications to making sure that people have the
building blocks to build the things themselves.

More specifically to your proposal:

This is really already possible in the dialplan. The VoiceMail
application [3] returns a VMSTATUS of FAILED if a user leaves a
voicemail that does not meet the minimum duration requirements. When
the application exits, you could check the status of the variable and
- if the status is failed - use an AGI or a shell script to create the
e-mail and send it.

Matt

[1] 
https://wiki.asterisk.org/wiki/display/AST/Software+Configuration+Management+Policies
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ARI
[3] https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_VoiceMail

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com  http://asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


Re: [asterisk-dev] Notification when no message left

2014-03-08 Thread Ben RUBSON
Le 8 mars 2014 à 17:14, Matthew Jordan mjor...@digium.com a écrit :
 On Fri, Mar 7, 2014 at 4:27 PM, Ben RUBSON ben.rub...@gmail.com wrote:
 Hello,
 
 It could be useful to have an option to be notified by mail when the caller 
 does not leave a message on the voicemail.
 
 We could add two options :
 - notifynomsg=yes|no
 - emailbodynomsg=${VM_DATE}, ${VM_CIDNAME} - ${VM_CIDNUM} called but did not 
 leave a message
 
 I use Asterisk 1.8 on my Debian stable box (exact version is 
 1.8.13.1~dfsg1-3+deb7u3), could we think about a patch for it ?
 
 
 A few things:
 
 (1) In general, new features are typically written for Asterisk trunk.
 Improvements and new features are generally not made in release
 branches [1]. If someone did write such a new feature, they could of
 course back port it to 1.8, but it would not be included in the
 branch.
 
 (2) As time has gone on, the philosophy in the Asterisk project has
 moved away from providing monolithic applications with lots of levers
 to control functionality to providing you the building blocks to build
 your applications. This is evident not only in the interfaces Asterisk
 has traditionally exposed, but also in the interfaces we've added
 recently [2]. The goal is that you would be able to build your own
 voicemail application with what customizations and features you want,
 rather than requiring changes in the C modules themselves. Hence, the
 emphasis on new feature development has moved away from tweaking the
 existing dialplan applications to making sure that people have the
 building blocks to build the things themselves.

Hello Matt,

Thank you very much for your answer and this explanation :-)

 More specifically to your proposal:
 
 This is really already possible in the dialplan. The VoiceMail
 application [3] returns a VMSTATUS of FAILED if a user leaves a
 voicemail that does not meet the minimum duration requirements. When
 the application exits, you could check the status of the variable and
 - if the status is failed - use an AGI or a shell script to create the
 e-mail and send it.

Good to know that it is already possible, good news !

However I already tried to put System() in my dial plan just after VoiceMail(), 
but System() never runs :

[Support]
(…)
exten = s,4,VoiceMail(1@${CONTEXT},us)
exten = s,5,System(/bin/echo test | /usr/sbin/sendmail u...@mail.com)

Of course if I put System() just before VoiceMail(), it runs fine.

Am I doing something wrong ?

 Matt
 
 [1] 
 https://wiki.asterisk.org/wiki/display/AST/Software+Configuration+Management+Policies
 [2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+ARI
 [3] 
 https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_VoiceMail

Thank you very much for your help !

Best regards,

Ben


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


Re: [asterisk-dev] Notification when no message left

2014-03-08 Thread Jeremy Lainé
On 03/08/2014 06:12 PM, Ben RUBSON wrote:
 However I already tried to put System() in my dial plan just after 
 VoiceMail(), but System() never runs :

 [Support]
 (…)
 exten = s,4,VoiceMail(1@${CONTEXT},us)
 exten = s,5,System(/bin/echo test | /usr/sbin/sendmail u...@mail.com)

 Of course if I put System() just before VoiceMail(), it runs fine.

 Am I doing something wrong ?

Could it be that you hung up during the VoiceMail application? If so, it is is 
expected
behaviour that you never reach the next priority in the dialplan..

You might try using an h extension.

Jeremy

PS: if you want to try out a more modern asterisk on Debian/stable you can use 
the
backport of asterisk 11

https://packages.debian.org/wheezy-backports/asterisk







-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


Re: [asterisk-dev] Notification when no message left

2014-03-08 Thread Ben RUBSON
Le 8 mars 2014 à 20:22, Jeremy Lainé jeremy.la...@m4x.org a écrit :
 On 03/08/2014 06:12 PM, Ben RUBSON wrote:
 However I already tried to put System() in my dial plan just after 
 VoiceMail(), but System() never runs :
 
 [Support]
 (…)
 exten = s,4,VoiceMail(1@${CONTEXT},us)
 exten = s,5,System(/bin/echo test | /usr/sbin/sendmail u...@mail.com)
 
 Of course if I put System() just before VoiceMail(), it runs fine.
 
 Am I doing something wrong ?
 
 Could it be that you hung up during the VoiceMail application? If so, it is 
 is expected
 behaviour that you never reach the next priority in the dialplan..

Yes, this is the case.

 You might try using an h extension.

It did the trick !
Thank you very much Jeremy !

Here is how I did :

[Support]
(…)
exten = s,4,VoiceMail(1@${CONTEXT},us)
exten = h,1,System([[ ${VMSTATUS} != SUCCESS ]]  /bin/echo test | 
/usr/sbin/sendmail u...@mail.com)

Then a nice mail template and job will be done !

 Jeremy

Thank you again !

Benjamin

 PS: if you want to try out a more modern asterisk on Debian/stable you can 
 use the
 backport of asterisk 11
 
 https://packages.debian.org/wheezy-backports/asterisk


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


Re: [asterisk-dev] Notification when no message left

2014-03-08 Thread Ben RUBSON
Le 8 mars 2014 à 21:30, Ben RUBSON ben.rub...@gmail.com a écrit :
 Le 8 mars 2014 à 20:22, Jeremy Lainé jeremy.la...@m4x.org a écrit :
 On 03/08/2014 06:12 PM, Ben RUBSON wrote:
 However I already tried to put System() in my dial plan just after 
 VoiceMail(), but System() never runs :
 
 [Support]
 (…)
 exten = s,4,VoiceMail(1@${CONTEXT},us)
 exten = s,5,System(/bin/echo test | /usr/sbin/sendmail u...@mail.com)
 
 Of course if I put System() just before VoiceMail(), it runs fine.
 
 Am I doing something wrong ?
 
 Could it be that you hung up during the VoiceMail application? If so, it is 
 is expected
 behaviour that you never reach the next priority in the dialplan..
 
 Yes, this is the case.
 
 You might try using an h extension.
 
 It did the trick !
 Thank you very much Jeremy !
 
 Here is how I did :
 
 [Support]
 (…)
 exten = s,4,VoiceMail(1@${CONTEXT},us)
 exten = h,1,System([[ ${VMSTATUS} != SUCCESS ]]  /bin/echo test | 
 /usr/sbin/sendmail u...@mail.com)
 
 Then a nice mail template and job will be done !

Last question regarding this topic, is there any way in the dialplan to know 
the mail set to the mailbox ?

Let’s assume we have in voicemail.conf :
[Support]
1 = ,Voicemail Support,u...@mail.com,,delete=yes

And in extensions.conf :
[Support]
(...)
exten = s,4,VoiceMail(1@${CONTEXT},us)
exten = h,1,System([[ ${VMSTATUS} != SUCCESS ]]  /bin/echo test | 
/usr/sbin/sendmail u...@mail.com)

Can we avoid repeating u...@mail.com in extensions.conf, getting it from the 
voicemail configuration ?

Thank you again !

Best regards,

Ben


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev