On Mon, 13 Apr 2009, Eric Fort wrote: > I have an application that needs to vary the menu choices available > based upon the availability of an external resource at a given time. > What I have in mind is a system that can uplink a user to one of many > different satellites. Due to the nature of orbital mechanics a > satellite may be out of range at any given time. I only want to present > a menu of available satellites. I can query an external program for a > list of available satellites, but how can I use that list to present > menu options for selection? What's the best way of doing this? Does > anyone know of similar examples?
If availability is defined purely by time, Asterisk has an IFTIME function available in the dialplan. If availability is defined by a "ping," write a daemon to ping the birds that should be in view and update that status in a database. When a call is processed, call an AGI that queries the database. Depending on what your needs are, either have the AGI set a series of channel variables to be processed by the dialplan or have the AGI present the options and accept the caller's choice. I've done both. My current project is a third party verification system. Dozens of channel variables (STEP-x-PROMPT, STEP-x-RETRY-PROMPT, STEP-x-MAX-LENGTH, etc.) are set in an AGI based on the DNIS. The channel variables then control processing in an AEL "while" loop. 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 -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
