[asterisk-users] Custom App

Steve Edwards asterisk.org at sedwards.com
Sat Mar 6 17:54:18 CST 2010


On Sat, 6 Mar 2010, Sascha Ferley wrote:

> Trying for figure out how to write a custom app for asterisk, without 
> neccisarrily having to utilize the AGI interface. I want to accomplish 
> this in the dial plan if possible. What I am trying to do is to write a 
> application which is like the directory but runs through all the 
> extensions. My thought for this was to utilize the voicemail.conf 
> [default] context, as any of the voicemail users will have the 
> ³greet.wav² message set and could use this file to play. However I don¹t 
> know how to do a ³for² loop in the asterisk context.
>
> Here is the algorithm I am trying to follow:
>
> For i in [default];   <-- default context of the voicemail.conf file
>    check if exist (/var/spool/asterisk/voicemail/device/$i/greet.wav);
>    do Playback(/var/spool/asterisk/voicemail/device/$i/greet.wav);
>    Wait(1)
>    Playback(extension)
>    SayDigits($i);
> Done
>
> Can anyone give me any suggestion on how I may implement this?

Use AGI. Parsing a text file and checking for file existence will be ugly 
in dialplan.

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


More information about the asterisk-users mailing list