I’ve read up a bit on generating calls from an external script - essentially generating an audio file and then placing a call file in the queue. The idea is a command-line script that takes an extension (or external number) and a string of text as arguments, passes the text through text-to-speech (flite) and then calls the specified extension and plays back the recording.
However, I have two questions about generating calls from a script (let’s be non-specific. It’s just a script that’s being run externally. For those who are interested, it will be called from Nagios monitoring to deliver alerts via VoIP).
I need this script to generate a call to multiple extensions. Any ideas? I need two variants, A) one that calls all extensions and plays back the recording to everyone when they pickup (does not go to voicemail, but can tell if any of the extensions didn’t answer). B) calls all extensions, just plays message to the first one that picks up.
Any thoughts on how to get a script-generated call to hook into an IVR that then returns data to the script? Should I just look into transferring the call to an existing AGI IVR script, or is there a better way? Essentially, I want the user to be prompted for a user ID and PIN, then allow the user to select from some pre-defined options and have the script act on them (probably using a socket connection to another server or updating a MySQL database).
The bottom line of what I need is a set of scripts that can call one or multiple extensions (internal or external via Zaptel/X-100P) and:
- Playback a message, passed as a string of text, to the first extn that answers. If nobody does, don’t go to voicemail, but returns whether someone answered and, if so, who it was.
- Playback a message to a list of extensions, playing back to every extension that answers, and return a list of who answered and who didn’t (to be acted upon after the calls).
- The above two, with the addition of an IVR that will ask for some information and then do something with it (something that asterisk can’t do, like communicating over an SSL’d socket with a remote server).
Thanks for any suggestions,