[asterisk-dev] Notification when no message left

Ben RUBSON ben.rubson at gmail.com
Sat Mar 8 15:07:04 CST 2014


Le 8 mars 2014 à 21:30, Ben RUBSON <ben.rubson at gmail.com> a écrit :
> Le 8 mars 2014 à 20:22, Jeremy Lainé <jeremy.laine at 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 user at 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 user at 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,user at 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 user at mail.com)

Can we avoid repeating "user at mail.com" in extensions.conf, getting it from the voicemail configuration ?

Thank you again !

Best regards,

Ben




More information about the asterisk-dev mailing list