[asterisk-dev] Voicemail redisign

Tzafrir Cohen tzafrir.cohen at xorcom.com
Wed Nov 1 12:39:32 MST 2006


On Wed, Nov 01, 2006 at 01:37:04PM -0500, Kristian Kielhofner wrote:
> Matt O'Gorman wrote:
> >I think you would want just a controlled playback, we want as much as
> >possible to be scriptable I would think.  as for the #include that
> >was my exact thought, except for the default make it work like call
> >parking does and just "work", but for anyone implementing their own
> >they would  probably just have an include to the huge dialplan
> >script. As for it affecting voicemail.conf, I think some options
> >would be removed and it would mostly just be configuration space for
> >the users.
> >
> >mog
> 
> mog,
> 
> 	I don't know if making it work like call parking would be best...
> 
> 	I liked the idea of an "apps" folder, with the thought that in the 
> future apps could be developed (and migrated) here, then shared by the 
> community (after any potential disclaimers and such, obviously).  How 
> cool would it be to be able to download some AEL/dialplan snippet, drop 
> it in /etc/asterisk/apps, #include it where you want, and go.

Or simply: #include apps/*.app

> 
> 	Or, even better...
> 
> 	What about this (format "inspired" by RPM):
> 
> /etc/asterisk/apps/voicemail.app:
> 
> ; Some kind of format
> %DESCRIPTION% Asterisk VoiceMail Application
> %OPTIONS% u - play unavailable greeting
> %OPTIONS% b - play busy greeting
> %REQUIRES% ControlPlayback, VMAuthenticate
> %FORMAT% extensions
> ;%FORMAT: AEL2 ; <-- for ael apps

Hmmm... this requires an external parser. If you want to make it
convinient for an external parser, use somthing like the lsb init
scripts comments:

;;;; Start Asterisk apps header
;; Description: Asterisk VoiceMail Application
;; Option: u - play unavailable greeting
;; Option: b - play busy greeting
;; Requires: ControlPlayback, VMAuthenticate
;; Format: extensions
;;;; End Asterisk apps header

> 
> ; Start dialplan code here
> [macro-voicemail]
> exten => s,1,BlahBlah
> 
> 
> 	There should then be some res_dialplan_apps or something to load all 
> 	of these and parse the %% headers and load them accordingly.  One could 
> then do something like
> 
> asterisk-CLI> "show dialplan apps"
> 
> 	And then get the help, etc, stuff from the header of the various 
> 	.app files in /etc/asterisk/apps, not unlike "show application Voicemail" / 
> "show applications" now.
> 
> 	These various apps would then be loaded automatically (with a reload 
> 	or whatever) and made available to the user.
> 
> 	Obviously this bares some slight resemblance to AGI, but I think it 
> 	is still worthwhile because:
> 
> 1) AGI apps are harder to write (to some people) that equivalent 
> dialplan code
> 
> 2) AGI performance issues
> 
> and so on
> 
> 	What do you think?  Is this too "pie in the sky"?

I like it. Except I don't like having a separate independent format. If
it is part of the dialplan it should be loaded and reloaded with the
dialplan.

So another dream: make it possible for every macro to describe itself
that way?

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:tzafrir at jabber.org
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com       
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir


More information about the asterisk-dev mailing list