public interface AgiRequest
AgiScript.This includes information about the channel the script is invoked on and parameters passed from the dialplan.
| Modifier and Type | Method and Description |
|---|---|
String |
getAccountCode()
Returns the account code set for the call.
|
String[] |
getArguments()
Returns the array of arguments passed from the AGI dialplan command.
|
AsteriskVersion |
getAsteriskVersion() |
String |
getCallerId()
Deprecated.
as of 0.3, use
getCallerIdNumber() instead. |
String |
getCallerIdName()
Returns the the Caller*ID Name, for example "John Doe".
|
String |
getCallerIdNumber()
Returns the Caller*ID number, for example "1234".
|
Integer |
getCallingAni2()
Returns the Callerid ANI 2 (Info digits).
|
Integer |
getCallingPres()
Returns the Callerid presentation/screening.
|
Integer |
getCallingTns()
Returns the Callerid Transit Network Select.
|
Integer |
getCallingTon()
Returns the Callerid Type of Number.
|
String |
getChannel()
Returns the name of the channel.
|
String |
getContext()
Returns the context in the dial plan from which the AGI script was
called.
|
String |
getDnid()
Returns the number, that has been dialed by the user.
|
Boolean |
getEnhanced()
Returns wheather this agi is passed audio (EAGI - Enhanced AGI).
|
String |
getExtension()
Returns the extension in the dial plan from which the AGI script was
called.
|
String |
getLanguage()
Returns the language set for the current channel, for example "en".
|
InetAddress |
getLocalAddress()
Returns the local address this channel, that is the IP address of the AGI
server.
|
int |
getLocalPort()
Returns the local port of this channel, that is the port the AGI server
is listening on.
|
String |
getParameter(String name)
Returns the value of a request parameter as a String, or
null if the parameter does not exist. |
Map<String,String[]> |
getParameterMap()
Returns a Map of the parameters of this request.
|
String[] |
getParameterValues(String name)
Returns an array of String objects containing all of the values the given
request parameter has, or
an empty array if the parameter does not exist.
|
Integer |
getPriority()
Returns the priority of the dial plan entry the AGI script was
called from.
|
String |
getRdnis()
If this call has been forwared, the number of the person doing the
redirect is returned (Redirected dialed number identification service).
|
InetAddress |
getRemoteAddress()
Returns the remote address of this channel, that is the IP address of the
Asterisk server.
|
int |
getRemotePort()
Returns the remote port of this channel, that is the client port the
Asterisk server is using for the AGI connection.
|
Map<String,String> |
getRequest()
Returns a Map containing the raw request name/value pairs.
|
String |
getRequestURL()
Returns the full URL of the requestURL in the form
agi://host[:port][/script][?param1=value1¶m2=value2]. |
String |
getScript()
Returns the name of the script to execute including its full path.
|
String |
getType()
Returns the type of the channel, for example "SIP".
|
String |
getUniqueId()
Returns the unqiue id of the channel.
|
Map<String,String> getRequest()
String getScript()
This corresponds to the request url with protocol, host, port and parameters stripped off.
As Async AGI does not yet pass a script parameter this property will
be null for requests received through Async AGI.
String getRequestURL()
agi://host[:port][/script][?param1=value1¶m2=value2].agi://host[:port][/script][?param1=value1¶m2=value2].String getChannel()
String getUniqueId()
String getType()
String getLanguage()
@Deprecated String getCallerId()
getCallerIdNumber() instead.Note: even with Asterisk 1.0 is contains only the numerical part of the Caller ID.
null is returned.String getCallerIdNumber()
Note: even with Asterisk 1.0 is contains only the numerical part of the Caller ID.
null is returned.String getCallerIdName()
null is returned.String getDnid()
null is returned.String getRdnis()
This is usally only only available on PRI.
null is returned.String getContext()
String getExtension()
Integer getPriority()
Boolean getEnhanced()
Enhanced AGI is currently not supported on FastAGI.
String getAccountCode()
Integer getCallingPres()
Available since Asterisk 1.2.
Integer getCallingAni2()
Available since Asterisk 1.2.
Integer getCallingTon()
Available since Asterisk 1.2.
Integer getCallingTns()
Available since Asterisk 1.2.
String getParameter(String name)
null if the parameter does not exist. You should only use
this method when you are sure the parameter has only one value.
If the parameter might have more than one value, use
getParameterValues(String).
If you use this method with a multivalued parameter, the value returned
is equal to the first value in the array returned by
getParameterValues.
name - a String containing the name of the parameter whose value is
requested.getParameterValues(String)String[] getParameterValues(String name)
If the parameter has a single value, the array has a length of 1.
name - a String containing the name of the parameter whose value is requested.Map<String,String[]> getParameterMap()
String[] getArguments()
Example: AGI(agi://localhost/HelloWorld,value1,,value2) results in
getArguments()[0] = "value1", getArguments()[1] = null
and getArguments()[2] = "value2".
Available since Asterisk 1.6
null.InetAddress getLocalAddress()
int getLocalPort()
InetAddress getRemoteAddress()
int getRemotePort()
AsteriskVersion getAsteriskVersion()
Copyright © 2004–2021. All rights reserved.