Creates a new instance of a channel object
the AGI socket connection
Account code of the origin channel
Gets the value of the close on hangup setting
Gets the value of the close on hangup setting
The caller ID number (or “unknown”)
The caller ID name (or “unknown”)
The number which is defined in ANI2 see Asterisk Detailed Variable List (only for PRI Channels)
The presentation for the callerid in a ZAP channel
An optional 4-digit number (Transit Network Selector) used in PRI Channels see Asterisk Detailed Variable List
The type of number used in PRI Channels see Asterisk Detailed Variable List
The originating channel (your phone)
Origin context in extensions.conf
The dialed number id (or “unknown”)
The flag value is 1.0 if started as an EAGI script, 0.0 otherwise
The called number
The language code (e.g. “en”)
Whether this AGI request is over the network
The network path included in the AGI request e.g. agi://127.0.0.1:3000/test This value would return 'test'
Headers that have been set for outgoing requests
The priority it was executed as in the dial plan
The referring DNIS number (or “unknown”)
Gets the IP address of the Asterisk Server that initiated the channel
The filename of your script ie. agi
Thread ID of the AGI script
The originating channel type (e.g. “SIP” or “ZAP”)
A unique ID for the call
The version of Asterisk
Adds a header to the outgoing request
Answers channel if not already in answer state.
Interrupts expected flow of Async AGI commands and returns control to previous source (typically, the PBX dialplan).
Indicates busy to the calling channel
Optional
timeout: numberif specified, the calling channel will be hung up after the specified number of seconds. Otherwise, this application will wait until the calling channel hangs up
Indicates congestion to the calling channel
Optional
timeout: numberif specified, the calling channel will be hung up after the specified number of seconds. Otherwise, this application will wait until the calling channel hangs up
Sends audio file on channel and allows the listener to control the stream.
Optional
skipms: numberOptional
fastForwardCharacter: stringOptional
rewindCharacter: stringOptional
pauseCharacter: stringDeletes an entry in the Asterisk database for a given family and key.
Deletes a family or specific keytree within a family in the Asterisk database.
Optional
keyTree: stringRetrieves an entry in the Asterisk database for a given family and key.
Adds or updates an entry in the Asterisk database for a given family, key, and value.
Attempts to establish a new outgoing connection on a channel, and then link it to the calling input channel.
Executes application with given options
Evaluates a channel expression Understands complex variable names and builtin variables, unlike GET VARIABLE.
Optional
channel: stringEvaluates a channel expression Understands complex variable names and builtin variables, unlike GET VARIABLE.
Optional
channel: stringAttempts to retrieve the inbound header specified from the channel
Note: This method can only read headers on the incoming request. It can not read headers set on an outbound SIP request.
Stream file, prompt for DTMF, with timeout. Behaves similar to STREAM FILE but used with a timeout option.
Gets a channel variable.
whether to force the key to uppercase
Cause the channel to execute the specified dialplan subroutine.
Optional
argument: stringHangs up the specified channel. If no channel name is given, hangs up the current channel
Optional
channel: stringDoes nothing
Event that is emitted when the underlying socket encounters an error
Event that is emitted when the underlying socket is closed
Event that emitted when the underlying socket times out
Event that is emitted when the channel is ready
Event that is emitted when a response is received from the Asterisk server
Event that emitted when the channel is hung up
Event that emitted when the response from the Asterisk server is processed into a structured response
Event that is emitted when data is sent to the Asterisk server
Requests that in-band progress information be provided to the calling channel
Receives one character from channels supporting it.
Receives text from channels supporting it.
Records to a given file.
Optional
beep: booleanOptional
silence: numberOptional
offsetSamples: numberAllows you to remove a header from the outgoing request as long as you
have added it via the addHeader()
method.
Requests that the channel indicate a ringing tone to the user
Says a given character string.
Says a given date.
Says a given digit string.
Says a given number.
Says a given character string with phonetics.
Says a given time.
Sends images to channels supporting it.
Sends text to channels supporting it.
Autohangup channel in some time.
Sets callerid for the current channel.
Optional
callerName: stringSets channel context.
Changes channel extension.
Enable/Disable Music on hold generator
Optional
musicClass: stringSet channel dialplan priority.
Set channel dialplan priority.
Toggles TDD mode (for the deaf).
Logs a message to the asterisk verbose log.
Optional
level: numberWaits for a digit to be pressed.
Represents an AGI Channel