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 [email protected] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
