Class AGI

Description
Direct descendents
Class Description
 class AGI_1 Asterisk Manager class
Variable Summary
 mixed $audio
 array $config
 mixed $in
 mixed $out
 array $request
 mixed $socket
Method Summary
 AGI AGI ([string $config = NULL], [array $optconfig = array()], [mixed $socket = NULL])
 array, answer ()
 array, channel_status ([string $channel = ''])
 void conlog (string $str, [integer $vbl = 1])
 array, database_del (string $family, string $key)
 array, database_deltree (string $family, [string $keytree = ''])
 array, database_get (string $family, string $key)
 array, database_put (string $family, string $key, string $value)
 array evaluate (string $command)
 array, exec (string $application, mixed $options)
 array, exec_absolutetimeout ($seconds $seconds)
 array, exec_agi (string $command, string $args)
 array, exec_dial (string $type, string $identifier, [integer $timeout = NULL], [string $options = NULL], [string $url = NULL])
 array, exec_enumlookup ($exten $exten)
 array, exec_goto (string $a, [mixed $b = NULL], [mixed $c = NULL], string $b;, string $c;)
 array, exec_setaccountcode (string $accountcode)
 array, exec_setlanguage ([string $language = 'en'])
 array, fastpass_get_data (string &$buffer, string $filename, [integer $timeout = NULL], [integer $max_digits = NULL])
 array, fastpass_say_digits (string &$buffer, integer $digits, [string $escape_digits = ''])
 array, fastpass_say_number (string &$buffer, integer $number, [string $escape_digits = ''])
 array, fastpass_say_phonetic (string &$buffer, string $text, [string $escape_digits = ''])
 array, fastpass_say_punctuation (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000])
 array, fastpass_say_time (string &$buffer, [integer $time = NULL], [string $escape_digits = ''])
 array, fastpass_stream_file (string &$buffer, string $filename, [string $escape_digits = ''], integer $offset)
 array, fastpass_swift (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000], [mixed $voice = NULL])
 array, fastpass_text2wav (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000])
 array, get_data (string $filename, [integer $timeout = NULL], [integer $max_digits = NULL])
 array, get_variable (string $variable)
 void goto (string $context, [string $extension = 's'], [string $priority = 1])
 array, hangup ([string $channel = ''])
 void make_folder (string $folder, [integer $perms = 0755])
 mixed menu (array $choices, [mixed $timeout = 2000])
 array, noop ()
 array('Name'=>$name, parse_callerid ([string $callerid = NULL])
 array, receive_char ([integer $timeout = -1])
 array, record_file (string $file, string $format, [string $escape_digits = ''], [integer $timeout = -1], [integer $offset = NULL], [boolean $beep = false], [integer $silence = NULL])
 array, say_digits (integer $digits, [string $escape_digits = ''])
 array, say_number (integer $number, [string $escape_digits = ''])
 array, say_phonetic (string $text, [string $escape_digits = ''])
 array, say_punctuation (string $text, [string $escape_digits = ''], [integer $frequency = 8000])
 array, say_time ([integer $time = NULL], [string $escape_digits = ''])
 array, send_image (string $image)
 array, send_text ($text $text)
 array, set_autohangup (integer $time)
 array, set_callerid (string $cid)
 array, set_context (string $context)
 array, set_extension (string $extension)
 array, set_music ([boolean $enabled = true], [string $class = ''])
 array, set_priority (integer $priority)
 array, set_variable (string $variable, string $value)
 array, stream_file (string $filename, [string $escape_digits = ''], integer $offset)
 array, swift (string $text, [string $escape_digits = ''], [integer $frequency = 8000], [mixed $voice = NULL])
 array, tdd_mode (string $setting)
 array, text2wav (string $text, [string $escape_digits = ''], [integer $frequency = 8000])
 string text_input ([mixed $mode = 'NUMERIC'])
 array, verbose (string $message, [integer $level = 1])
 array, wait_for_digit ([integer $timeout = -1])
 string which (string $cmd, [string $checkpath = NULL])
Variables
AGI_AsteriskManager $asmanager (line 111)

Asterisk Manager

  • access: public
mixed $audio = NULL (line 139)

Audio Stream

  • access: public
array $config (line 103)

Config variables

  • access: public
mixed $in = NULL (line 118)

Input Stream

  • access: private
mixed $out = NULL (line 125)

Output Stream

  • access: private
array $request (line 95)

Request variables read in on initialization.

Often contains any/all of the following: agi_request - name of agi script agi_channel - current channel agi_language - current language agi_type - channel type (SIP, ZAP, IAX, ...) agi_uniqueid - unique id based on unix time agi_callerid - callerID string agi_dnid - dialed number id agi_rdnis - referring DNIS number agi_context - current context agi_extension - extension dialed agi_priority - current priority agi_enhanced - value is 1.0 if started as an EAGI script agi_accountcode - set by SetAccount in the dialplan agi_network - value is yes if this is a fastagi agi_network_script - name of the script to execute

NOTE: program arguments are still in $_SERVER['argv'].

  • access: public
mixed $socket = NULL (line 132)

FastAGI socket

  • access: private
Methods
Constructor AGI (line 147)

Constructor

AGI AGI ([string $config = NULL], [array $optconfig = array()], [mixed $socket = NULL])
  • string $config: is the name of the config file to parse
  • array $optconfig: is an array of configuration vars and vals, stuffed into $this->config['phpagi']
answer (line 233)

Answer channel if not already in answer state.

array, answer ()
channel_status (line 245)

Get the status of the specified channel. If no channel name is specified, return the status of the current channel.

array, channel_status ([string $channel = ''])
  • string $channel
conlog (line 1620)

Log to console if debug mode.

void conlog (string $str, [integer $vbl = 1])
  • string $str
  • integer $vbl: verbose level
database_del (line 274)

Deletes an entry in the Asterisk database for a given family and key.

array, database_del (string $family, string $key)
  • string $family
  • string $key
database_deltree (line 287)

Deletes a family or specific keytree within a family in the Asterisk database.

array, database_deltree (string $family, [string $keytree = ''])
  • string $family
  • string $keytree
database_get (line 302)

Retrieves an entry in the Asterisk database for a given family and key.

array, database_get (string $family, string $key)
  • string $family
  • string $key
database_put (line 315)

Adds or updates an entry in the Asterisk database for a given family, key, and value.

  • return: see evaluate for return information. ['result'] is 1 on sucess, 0 otherwise
array, database_put (string $family, string $key, string $value)
  • string $family
  • string $key
  • string $value
evaluate (line 1519)

Evaluate an AGI command.

  • return: ('code'=>$code, 'result'=>$result, 'data'=>$data)
  • access: private
array evaluate (string $command)
  • string $command
exec (line 330)

Executes the specified Asterisk application with given options.

array, exec (string $application, mixed $options)
  • string $application
  • mixed $options
exec_absolutetimeout (line 751)

Set absolute maximum time of call.

Note that the timeout is set from the current time forward, not counting the number of seconds the call has already been up. Each time you call AbsoluteTimeout(), all previous absolute timeouts are cancelled. Will return the call to the T extension so that you can playback an explanatory note to the calling party (the called party will not hear that)

array, exec_absolutetimeout ($seconds $seconds)
  • $seconds $seconds: allowed, 0 disables timeout
exec_agi (line 764)

Executes an AGI compliant application.

  • return: see evaluate for return information. ['result'] is -1 on hangup or if application requested hangup, or 0 on non-hangup exit.
array, exec_agi (string $command, string $args)
  • string $command
  • string $args
exec_dial (line 823)

Dial.

Dial takes input from ${VXML_URL} to send XML Url to Cisco 7960 Dial takes input from ${ALERT_INFO} to set ring cadence for Cisco phones Dial returns ${CAUSECODE}: If the dial failed, this is the errormessage. Dial returns ${DIALSTATUS}: Text code returning status of last dial attempt.

array, exec_dial (string $type, string $identifier, [integer $timeout = NULL], [string $options = NULL], [string $url = NULL])
  • string $type
  • string $identifier
  • integer $timeout
  • string $options
  • string $url
exec_enumlookup (line 802)

Do ENUM Lookup.

Note: to retrieve the result, use get_variable('ENUM');

  • return: see evaluate for return information.
array, exec_enumlookup ($exten $exten)
  • $exten $exten
exec_goto (line 839)

Goto.

This function takes three arguments: context,extension, and priority, but the leading arguments are optional, not the trailing arguments. Thuse goto($z) sets the priority to $z.

  • return: see evaluate for return information.
array, exec_goto (string $a, [mixed $b = NULL], [mixed $c = NULL], string $b;, string $c;)
  • string $a
  • string $b;
  • string $c;
exec_setaccountcode (line 777)

Set Account Code

Set the channel account code for billing purposes.

  • return: see evaluate for return information.
array, exec_setaccountcode (string $accountcode)
  • string $accountcode
exec_setlanguage (line 788)

Set Language.

  • return: see evaluate for return information.
array, exec_setlanguage ([string $language = 'en'])
  • string $language: code
fastpass_get_data (line 1120)

Plays the given file and receives DTMF data.

Return early if $buffer is adequate for request.

This is similar to STREAM FILE, but this command can accept and return many DTMF digits, while STREAM FILE returns immediately after the first DTMF digit is detected.

Asterisk looks for the file to play in /var/lib/asterisk/sounds by default.

If the user doesn't press any keys when the message plays, there is $timeout milliseconds of silence then the command ends.

The user has the opportunity to press a key at any time during the message or the post-message silence. If the user presses a key while the message is playing, the message stops playing. When the first key is pressed a timer starts counting for $timeout milliseconds. Every time the user presses another key the timer is restarted. The command ends when the counter goes to zero or the maximum number of digits is entered, whichever happens first.

If you don't specify a time out then a default timeout of 2000 is used following a pressed digit. If no digits are pressed then 6 seconds of silence follow the message.

If you don't specify $max_digits then the user can enter as many digits as they want.

Pressing the # key has the same effect as the timer running out: the command ends and any previously keyed digits are returned. A side effect of this is that there is no way to read a # key using this command.

  • return:

    see evaluate for return information. ['result'] holds the digits and ['data'] holds the timeout if present.

    This differs from other commands with return DTMF as numbers representing ASCII characters.

  • link: http://www.voip-info.org/wiki-get+data
array, fastpass_get_data (string &$buffer, string $filename, [integer $timeout = NULL], [integer $max_digits = NULL])
  • string $buffer
  • string $filename: file to play. Do not include file extension.
  • integer $timeout: milliseconds
  • integer $max_digits
fastpass_say_digits (line 860)

Say the given digit string, returning early if any of the given DTMF escape digits are received on the channel.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+digits
array, fastpass_say_digits (string &$buffer, integer $digits, [string $escape_digits = ''])
  • string $buffer
  • integer $digits
  • string $escape_digits
fastpass_say_number (line 889)

Say the given number, returning early if any of the given DTMF escape digits are received on the channel.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+number
array, fastpass_say_number (string &$buffer, integer $number, [string $escape_digits = ''])
  • string $buffer
  • integer $number
  • string $escape_digits
fastpass_say_phonetic (line 918)

Say the given character string, returning early if any of the given DTMF escape digits are received on the channel.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+phonetic
array, fastpass_say_phonetic (string &$buffer, string $text, [string $escape_digits = ''])
  • string $buffer
  • string $text
  • string $escape_digits
fastpass_say_punctuation (line 1065)

Say Puncutation in a string.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information.
array, fastpass_say_punctuation (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000])
  • string $buffer
  • string $text
  • string $escape_digits
  • integer $frequency
fastpass_say_time (line 947)

Say a given time, returning early if any of the given DTMF escape digits are received on the channel.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+time
array, fastpass_say_time (string &$buffer, [integer $time = NULL], [string $escape_digits = ''])
  • string $buffer
  • integer $time: number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
  • string $escape_digits
fastpass_stream_file (line 979)

Play the given audio file, allowing playback to be interrupted by a DTMF digit. This command is similar to the GET DATA command but this command returns after the first DTMF digit has been pressed while GET DATA can accumulated any number of digits before returning.

Return early if $buffer is adequate for request.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-stream+file
array, fastpass_stream_file (string &$buffer, string $filename, [string $escape_digits = ''], integer $offset)
  • string $buffer
  • string $filename: without extension, often in /var/lib/asterisk/sounds
  • string $escape_digits
  • integer $offset
fastpass_swift (line 1037)

Use Cepstral Swift to read text.

Return early if $buffer is adequate for request.

array, fastpass_swift (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000], [mixed $voice = NULL])
  • string $buffer
  • string $text
  • string $escape_digits
  • integer $frequency
fastpass_text2wav (line 1008)

Use festival to read text.

Return early if $buffer is adequate for request.

array, fastpass_text2wav (string &$buffer, string $text, [string $escape_digits = ''], [integer $frequency = 8000])
  • string $buffer
  • string $text
  • string $escape_digits
  • integer $frequency
get_data (line 373)

Plays the given file and receives DTMF data.

This is similar to STREAM FILE, but this command can accept and return many DTMF digits, while STREAM FILE returns immediately after the first DTMF digit is detected.

Asterisk looks for the file to play in /var/lib/asterisk/sounds by default.

If the user doesn't press any keys when the message plays, there is $timeout milliseconds of silence then the command ends.

The user has the opportunity to press a key at any time during the message or the post-message silence. If the user presses a key while the message is playing, the message stops playing. When the first key is pressed a timer starts counting for $timeout milliseconds. Every time the user presses another key the timer is restarted. The command ends when the counter goes to zero or the maximum number of digits is entered, whichever happens first.

If you don't specify a time out then a default timeout of 2000 is used following a pressed digit. If no digits are pressed then 6 seconds of silence follow the message.

If you don't specify $max_digits then the user can enter as many digits as they want.

Pressing the # key has the same effect as the timer running out: the command ends and any previously keyed digits are returned. A side effect of this is that there is no way to read a # key using this command.

  • return:

    see evaluate for return information. ['result'] holds the digits and ['data'] holds the timeout if present.

    This differs from other commands with return DTMF as numbers representing ASCII characters.

  • link: http://www.voip-info.org/wiki-get+data
  • example: Ping an IP address
array, get_data (string $filename, [integer $timeout = NULL], [integer $max_digits = NULL])
  • string $filename: file to play. Do not include file extension.
  • integer $timeout: milliseconds
  • integer $max_digits
get_variable (line 388)

Fetch the value of a variable.

Does not work with global variables. Does not work with some variables that are generated by modules.

array, get_variable (string $variable)
  • string $variable: name
goto (line 1205)

Goto - Set context, extension and priority.

void goto (string $context, [string $extension = 's'], [string $priority = 1])
  • string $context
  • string $extension
  • string $priority
hangup (line 407)

Hangup the specified channel. If no channel name is given, hang up the current channel.

With power comes responsibility. Hanging up channels other than your own isn't something that is done routinely. If you are not sure why you are doing so, then don't.

array, hangup ([string $channel = ''])
  • string $channel
make_folder (line 1668)

Make a folder recursively.

  • access: private
void make_folder (string $folder, [integer $perms = 0755])
  • string $folder
  • integer $perms
menu (line 1160)

Menu.

This function presents the user with a menu and reads the response

  • return: key pressed on sucess, -1 on failure
mixed menu (array $choices, [mixed $timeout = 2000])
  • array $choices: has the following structure: array('1'=>'*Press 1 for this', // festival reads if prompt starts with * '2'=>'some-gsm-without-extension', '*'=>'*Press star for help');
new_AsteriskManager (line 1499)

Create a new AGI_AsteriskManager.

void &new_AsteriskManager ()
noop (line 418)

Does nothing.

array, noop ()
parse_callerid (line 1223)

Parse caller id.

array('Name'=>$name, parse_callerid ([string $callerid = NULL])
  • string $callerid
receive_char (line 432)

Receive a character of text from a connected channel. Waits up to $timeout milliseconds for a character to arrive, or infinitely if $timeout is zero.

  • return: see evaluate for return information. ['result'] is 0 on timeout or not supported, -1 on failure. Otherwise it is the decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-receive+char
array, receive_char ([integer $timeout = -1])
  • integer $timeout: milliseconds
record_file (line 453)

Record sound to a file until an acceptable DTMF digit is received or a specified amount of time has passed. Optionally the file BEEP is played before recording begins.

  • return: see evaluate for return information. ['result'] is -1 on error, 0 on hangup, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-record+file
array, record_file (string $file, string $format, [string $escape_digits = ''], [integer $timeout = -1], [integer $offset = NULL], [boolean $beep = false], [integer $silence = NULL])
  • string $file: to record, without extension, often created in /var/lib/asterisk/sounds
  • string $format: of the file. GSM and WAV are commonly used formats. MP3 is read-only and thus cannot be used.
  • string $escape_digits
  • integer $timeout: is the maximum record time in milliseconds, or -1 for no timeout.
  • integer $offset: to seek to without exceeding the end of the file.
  • boolean $beep
  • integer $silence: number of seconds of silence allowed before the function returns despite the lack of dtmf digits or reaching timeout.
say_digits (line 470)

Say the given digit string, returning early if any of the given DTMF escape digits are received on the channel.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+digits
array, say_digits (integer $digits, [string $escape_digits = ''])
  • integer $digits
  • string $escape_digits
say_number (line 484)

Say the given number, returning early if any of the given DTMF escape digits are received on the channel.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+number
array, say_number (integer $number, [string $escape_digits = ''])
  • integer $number
  • string $escape_digits
say_phonetic (line 498)

Say the given character string, returning early if any of the given DTMF escape digits are received on the channel.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+phonetic
array, say_phonetic (string $text, [string $escape_digits = ''])
  • string $text
  • string $escape_digits
say_punctuation (line 1451)

Say Puncutation in a string.

  • return: see evaluate for return information.
array, say_punctuation (string $text, [string $escape_digits = ''], [integer $frequency = 8000])
  • string $text
  • string $escape_digits
  • integer $frequency
say_time (line 512)

Say a given time, returning early if any of the given DTMF escape digits are received on the channel.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if playback completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-say+time
array, say_time ([integer $time = NULL], [string $escape_digits = ''])
  • integer $time: number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
  • string $escape_digits
send_image (line 528)

Send the specified image on a channel.

Most channels do not support the transmission of images.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if the image is sent or channel does not support image transmission.
  • link: http://www.voip-info.org/wiki-send+image
array, send_image (string $image)
  • string $image: without extension, often in /var/lib/asterisk/images

Redefined in descendants as:
send_text (line 543)

Send the given text to the connected channel.

Most channels do not support transmission of text.

  • return: see evaluate for return information. ['result'] is -1 on hangup or error, 0 if the text is sent or channel does not support text transmission.
  • link: http://www.voip-info.org/wiki-send+text
array, send_text ($text $text)
  • $text $text

Redefined in descendants as:
set_autohangup (line 558)

Cause the channel to automatically hangup at $time seconds in the future.

If $time is 0 then the autohangup feature is disabled on this channel.

If the channel is hungup prior to $time seconds, this setting has no effect.

array, set_autohangup (integer $time)
  • integer $time: until automatic hangup
set_callerid (line 575)

Changes the caller ID of the current channel.

array, set_callerid (string $cid)
  • string $cid: example: "John Smith"<1234567> This command will let you take liberties with the <caller ID specification> but the format shown in the example above works well: the name enclosed in double quotes followed immediately by the number inside angle brackets. If there is no name then you can omit it. If the name contains no spaces you can omit the double quotes around it. The number must follow the name immediately; don't put a space between them. The angle brackets around the number are necessary; if you omit them the number will be considered to be part of the name.
set_context (line 593)

Sets the context for continuation upon exiting the application.

Setting the context does NOT automatically reset the extension and the priority; if you want to start at the top of the new context you should set extension and priority yourself.

If you specify a non-existent context you receive no error indication (['result'] is still 0) but you do get a warning message on the Asterisk console.

array, set_context (string $context)
  • string $context
set_extension (line 611)

Set the extension to be used for continuation upon exiting the application.

Setting the extension does NOT automatically reset the priority. If you want to start with the first priority of the extension you should set the priority yourself.

If you specify a non-existent extension you receive no error indication (['result'] is still 0) but you do get a warning message on the Asterisk console.

array, set_extension (string $extension)
  • string $extension
set_music (line 624)

Enable/Disable Music on hold generator.

array, set_music ([boolean $enabled = true], [string $class = ''])
  • boolean $enabled
  • string $class
set_priority (line 640)

Set the priority to be used for continuation upon exiting the application.

If you specify a non-existent priority you receive no error indication (['result'] is still 0) and no warning is issued on the Asterisk console.

array, set_priority (integer $priority)
  • integer $priority
set_variable (line 658)

Sets a variable to the specified value. The variables so created can later be used by later using ${<variablename>} in the dialplan.

These variables live in the channel Asterisk creates when you pickup a phone and as such they are both local and temporary. Variables created in one channel can not be accessed by another channel. When you hang up the phone, the channel is deleted and any variables in that channel are deleted as well.

array, set_variable (string $variable, string $value)
  • string $variable: is case sensitive
  • string $value
stream_file (line 678)

Play the given audio file, allowing playback to be interrupted by a DTMF digit. This command is similar to the GET DATA command but this command returns after the first DTMF digit has been pressed while GET DATA can accumulated any number of digits before returning.

array, stream_file (string $filename, [string $escape_digits = ''], integer $offset)
  • string $filename: without extension, often in /var/lib/asterisk/sounds
  • string $escape_digits
  • integer $offset
swift (line 1327)

Use Cepstral Swift to read text.

array, swift (string $text, [string $escape_digits = ''], [integer $frequency = 8000], [mixed $voice = NULL])
  • string $text
  • string $escape_digits
  • integer $frequency
tdd_mode (line 690)

Enable or disable TDD transmission/reception on the current channel.

array, tdd_mode (string $setting)
  • string $setting: can be on, off or mate
text2wav (line 1275)

Use festival to read text.

array, text2wav (string $text, [string $escape_digits = ''], [integer $frequency = 8000])
  • string $text
  • string $escape_digits
  • integer $frequency
text_input (line 1384)

Text Input.

Based on ideas found at http://www.voip-info.org/wiki-Asterisk+cmd+DTMFToText

Example: UC H LC i , SP h o w SP a r e SP y o u ? $string = '*8'.'44*'.'*5'.'444*'.'00*'.'0*'.'44*'.'666*'.'9*'.'0*'.'2*'.'777*'.'33*'.'0*'.'999*'.'666*'.'88*'.'0000*';

string text_input ([mixed $mode = 'NUMERIC'])
verbose (line 710)

Sends $message to the Asterisk console via the 'verbose' message system.

If the Asterisk verbosity level is $level or greater, send $message to the console.

The Asterisk verbosity system works as follows. The Asterisk user gets to set the desired verbosity at startup time or later using the console 'set verbose' command. Messages are displayed on the console if their verbose level is less than or equal to desired verbosity set by the user. More important messages should have a low verbose level; less important messages should have a high verbose level.

array, verbose (string $message, [integer $level = 1])
  • string $message
  • integer $level: from 1 to 4
wait_for_digit (line 728)

Waits up to $timeout milliseconds for channel to receive a DTMF digit.

  • return: see evaluate for return information. ['result'] is 0 if wait completes with no digit received, otherwise a decimal value of the DTMF tone. Use chr() to convert to ASCII.
  • link: http://www.voip-info.org/wiki-wait+for+digit
array, wait_for_digit ([integer $timeout = -1])
  • integer $timeout: in millisecons. Use -1 for the timeout value if you want the call to wait indefinitely.
which (line 1643)

Find an execuable in the path.

  • return: the path to the command
  • access: private
string which (string $cmd, [string $checkpath = NULL])
  • string $cmd: command to find
  • string $checkpath: path to check

Documentation generated on Wed, 16 Nov 2005 12:49:14 -0700 by phpDocumentor 1.3.0RC3