net.sf.asterisk.fastagi
Interface AGIRequest

All Known Implementing Classes:
AGIRequestImpl

public interface AGIRequest

Defines an object to provide client request information to an AGIScript.
This includes information about the channel the script is invoked on and parameters passed from the dialplan.

Version:
$Id: AGIRequest.java,v 1.10 2005/11/27 16:08:17 srt Exp $
Author:
srt

Method Summary
 java.lang.String getAccountCode()
          Returns the account code set for the call.
 java.lang.String getCallerId()
          Returns the Caller*ID, for example "1234".
 java.lang.String getCallerIdName()
          Returns the the Caller*ID Name, for example "John Doe".
 java.lang.Integer getCallingAni2()
          Returns the Callerid ANI 2 (Info digits).
Available since Asterisk 1.2.
 java.lang.Integer getCallingPres()
          Returns the Callerid presentation/screening.
Available since Asterisk 1.2.
 java.lang.Integer getCallingTns()
          Returns the Callerid Transit Network Select.
Available since Asterisk 1.2.
 java.lang.Integer getCallingTon()
          Returns the Callerid Type of Number.
Available since Asterisk 1.2.
 java.lang.String getChannel()
          Returns the name of the channel.
 java.lang.String getContext()
          Returns the context in the dial plan from which the AGI script was called.
 java.lang.String getDnid()
          Returns the number, that has been dialed by the user.
 java.lang.Boolean getEnhanced()
          Returns wheather this agi is passed audio (EAGI - Enhanced AGI).
Enhanced AGI is currently not supported on FastAGI.
 java.lang.String getExtension()
          Returns the extension in the dial plan from which the AGI script was called.
 java.lang.String getLanguage()
          Returns the language, for example "en".
 java.net.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.
 java.lang.String getParameter(java.lang.String name)
          Returns the value of a request parameter as a String, or null if the parameter does not exist.
 java.util.Map getParameterMap()
          Returns a java.util.Map of the parameters of this request.
 java.lang.String[] getParameterValues(java.lang.String name)
          Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
If the parameter has a single value, the array has a length of 1.
 java.lang.Integer getPriority()
          Returns the priority in the dial plan from which the AGI script was called.
 java.lang.String getRdnis()
          If this call has been forwared, the number of the person doing the redirect is returned (Redirected dialed number identification service).
This is usally only only available on PRI.
 java.net.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.
 java.util.Map getRequest()
          Returns a Map containing the raw request name/value pairs.
 java.lang.String getRequestURL()
          Returns the full URL of the requestURL in the form agi://host[:port][/script][?param1=value1¶m2=value2].
 java.lang.String getScript()
          Returns the name of the script to execute including its full path.
This corresponds to the request url with protocol, host, port and parameters stripped off.
 java.lang.String getType()
          Returns the type of the channel, for example "SIP".
 java.lang.String getUniqueId()
          Returns the unqiue id of the channel.
 

Method Detail

getRequest

java.util.Map getRequest()
Returns a Map containing the raw request name/value pairs.

Returns:
Map contain raw request name/value pairs.

getScript

java.lang.String getScript()
Returns the name of the script to execute including its full path.
This corresponds to the request url with protocol, host, port and parameters stripped off.

Returns:
the name of the script to execute.

getRequestURL

java.lang.String getRequestURL()
Returns the full URL of the requestURL in the form agi://host[:port][/script][?param1=value1¶m2=value2].

Returns:
the full URL of the requestURL in the form agi://host[:port][/script][?param1=value1¶m2=value2].

getChannel

java.lang.String getChannel()
Returns the name of the channel.

Returns:
the name of the channel.

getUniqueId

java.lang.String getUniqueId()
Returns the unqiue id of the channel.

Returns:
the unqiue id of the channel.

getType

java.lang.String getType()
Returns the type of the channel, for example "SIP".

Returns:
the type of the channel, for example "SIP".

getLanguage

java.lang.String getLanguage()
Returns the language, for example "en".

Returns:
the language, for example "en".

getCallerId

java.lang.String getCallerId()
Returns the Caller*ID, for example "1234".

Returns:
the Caller*ID, for example "1234", if no Caller*ID is set or it is "unknown" null is returned.

getCallerIdName

java.lang.String getCallerIdName()
Returns the the Caller*ID Name, for example "John Doe".

Returns:
the the Caller*ID Name, for example "John Doe", if no Caller*ID Name is set or it is "unknown" null is returned.

getDnid

java.lang.String getDnid()
Returns the number, that has been dialed by the user.

Returns:
the dialed number, if no DNID is available or it is "unknown" null is returned.

getRdnis

java.lang.String getRdnis()
If this call has been forwared, the number of the person doing the redirect is returned (Redirected dialed number identification service).
This is usally only only available on PRI.

Returns:
the number of the person doing the redirect, , if no RDNIS is available or it is "unknown" null is returned.

getContext

java.lang.String getContext()
Returns the context in the dial plan from which the AGI script was called.

Returns:
the context in the dial plan from which the AGI script was called.

getExtension

java.lang.String getExtension()
Returns the extension in the dial plan from which the AGI script was called.

Returns:
the extension in the dial plan from which the AGI script was called.

getPriority

java.lang.Integer getPriority()
Returns the priority in the dial plan from which the AGI script was called.

Returns:
the priority in the dial plan from which the AGI script was called.

getEnhanced

java.lang.Boolean getEnhanced()
Returns wheather this agi is passed audio (EAGI - Enhanced AGI).
Enhanced AGI is currently not supported on FastAGI.

Returns:
Boolean.TRUE if this agi is passed audio, Boolean.FALSE otherwise.

getAccountCode

java.lang.String getAccountCode()
Returns the account code set for the call.

Returns:
the account code set for the call.

getCallingPres

java.lang.Integer getCallingPres()
Returns the Callerid presentation/screening.
Available since Asterisk 1.2.

Returns:
the Callerid presentation/screening.
Since:
0.2

getCallingAni2

java.lang.Integer getCallingAni2()
Returns the Callerid ANI 2 (Info digits).
Available since Asterisk 1.2.

Returns:
the Callerid ANI 2 (Info digits).
Since:
0.2

getCallingTon

java.lang.Integer getCallingTon()
Returns the Callerid Type of Number.
Available since Asterisk 1.2.

Returns:
the Callerid Type of Number.
Since:
0.2

getCallingTns

java.lang.Integer getCallingTns()
Returns the Callerid Transit Network Select.
Available since Asterisk 1.2.

Returns:
the Callerid Transit Network Select.
Since:
0.2

getParameter

java.lang.String getParameter(java.lang.String name)
Returns the value of a request parameter as a String, or 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.

Parameters:
name - a String containing the name of the parameter whose value is requested.
Returns:
a String representing the single value of the parameter.
See Also:
getParameterValues(String)

getParameterValues

java.lang.String[] getParameterValues(java.lang.String name)
Returns an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
If the parameter has a single value, the array has a length of 1.

Parameters:
name - a String containing the name of the parameter whose value is requested.
Returns:
an array of String objects containing the parameter's values.

getParameterMap

java.util.Map getParameterMap()
Returns a java.util.Map of the parameters of this request.

Returns:
a java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

getLocalAddress

java.net.InetAddress getLocalAddress()
Returns the local address this channel, that is the IP address of the AGI server.

Returns:
the local address this channel.
Since:
0.2

getLocalPort

int getLocalPort()
Returns the local port of this channel, that is the port the AGI server is listening on.

Returns:
the local port of this socket channel.
Since:
0.2

getRemoteAddress

java.net.InetAddress getRemoteAddress()
Returns the remote address of this channel, that is the IP address of the Asterisk server.

Returns:
the remote address of this channel.
Since:
0.2

getRemotePort

int getRemotePort()
Returns the remote port of this channel, that is the client port the Asterisk server is using for the AGI connection.

Returns:
the remote port of this channel.
Since:
0.2


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.