Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
ExternalIVR(/full/path/to/applcationapplication[(arguments)],options)

The arguments are optional, however if they exist they must be enclosed in parentheses. The external application will be executed in a child process, with its standard file handles connected to the Asterisk process as follows:

...

The specific ExternalIVR options, events and commands are detailed below.

Upon execution, if not specifically prevented by an option, the ExternalIVR application will answer the channel (if it's not already answered), create an audio generator, and start playing silence. When your application wants to send audio to the channel, it can send a command to add a file to the generator's playlist. The generator will then work its way through the list, playing each file in turn until it either runs out of files to play, the channel is hung up, or a command is received to clear the list and start with a new file. At any time, more files can be added to the list and the generator will play them in sequence.

While the generator is playing audio (or silence), any DTMF events received on the channel will be sent to the child process. Note that this can happen at any time, since the generator, the child process and the channel thread are all executing independently. It is very important that your external application be ready to receive events from Asterisk at all times (without blocking), or you could cause the channel to become non-responsive.

...

  • 0-9 - DTMF event for keys 0 through 9
  • A-D - DTMF event for keys A through D
  • * - DTMF event for key *
  • # - DTMF event for key #
  • H - The channel was hung up by the connected party
  • E - The script requested an exit
  • Z - The previous command was unable to be executed. There may be a data element if appropriate, see specific commands below for details
  • T - The play list was interrupted (see S command)
  • D - A file was dropped from the play list due to interruption (the data element will be the dropped file name) NOTE: this tag conflicts with the D DTMF event tag. The existence of the data element is used to differentiate between the two cases
  • F - A file has finished playing (the data element will be the file name)
  • P - A response to the P command
  • G - A response to the G command
  • I - An Inform message, meant to "inform" the client that something has occurred. (see Inform Messages below)

...