[Asterisk-Dev] Want to add a VM delete event - wherein app_voicemail.c?

Leif Madsen asterisk.leif.madsen at gmail.com
Sat Oct 1 06:24:37 MST 2005


On 10/1/05, Olle E. Johansson <oej at edvina.net> wrote:
> >>Would it be better to create a vmdelete= option in voicemail.conf so
> >>that you can customize what happens when a voicemail is deleted? (Just
> >>thinking it might be more useful for others if you're already going to
> >>edit the code, and I'd think it'd work similar to the vmnotify=
> >>code... so that might give some ideas of how to go about it).
> >
> ..or a generic notify for all changes done to a mailbox repository.
> There's no sense in making a notification for every action. It might
> even be more clever to make this a manager event and have the action
> hooks in the astmanproxy, to take the burden away from Asterisk.

If you were to implement it as an option to trigger a script (like
vmnotify=), and taking Olle's suggestion of making a generic option,
why not make something like "vmevent=", and depending on the type of
event happening in voicemail, have it pass it as an argument to the
script, which you can grab as a standard argument, and perform an
option based on the type of event.  Types of events might include:

- notify   (this would replace externnoify= in voicemail.conf)
- delete   (this of course would be the new functionality you want)
- passchange  (this would replace externpass= in voicemail.conf)
etc...

What do you think?
--
Leif Madsen - http://www.leifmadsen.com
Astricon 2005, Anaheim, CA, October 12-14
http://www.astricon.net
http://www.oreilly.com/catalog/asterisk



More information about the asterisk-dev mailing list