|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.asteriskjava.fastagi.internal.AgiRequestImpl
public class AgiRequestImpl
Default implementation of the AGIRequest interface.
| Method Summary | |
|---|---|
java.lang.String |
getAccountCode()
Returns the account code set for the call. |
java.lang.String[] |
getArguments()
Returns the array of arguments passed from the AGI dialplan command. |
java.lang.String |
getCallerId()
Returns the Caller*ID number, for example "1234". |
java.lang.String |
getCallerIdName()
Returns the the Caller*ID Name, for example "John Doe". |
java.lang.String |
getCallerIdNumber()
Returns the Caller*ID number, for example "1234". |
java.lang.Integer |
getCallingAni2()
Returns the Callerid ANI 2 (Info digits). |
java.lang.Integer |
getCallingPres()
Returns the Callerid presentation/screening. |
java.lang.Integer |
getCallingTns()
Returns the Callerid Transit Network Select. |
java.lang.Integer |
getCallingTon()
Returns the Callerid Type of Number. |
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). |
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 set for the current channel, 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<java.lang.String,java.lang.String[]> |
getParameterMap()
Returns a 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 an empty array if the parameter does not exist. |
java.lang.Integer |
getPriority()
Returns the priority of the dial plan entry the AGI script was called from. |
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). |
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<java.lang.String,java.lang.String> |
getRequest()
Returns a Map containing the raw request name/value pairs. |
java.lang.String |
getRequestURL()
Returns the full URL of the request in the form agi://host[:port][/script]. |
java.lang.String |
getScript()
Returns the name of the script to execute. |
java.lang.String |
getType()
Returns the type of the channel, for example "SIP". |
java.lang.String |
getUniqueId()
Returns the unqiue id of the channel. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.util.Map<java.lang.String,java.lang.String> getRequest()
AgiRequest
getRequest in interface AgiRequestpublic java.lang.String getScript()
getScript in interface AgiRequestpublic java.lang.String getRequestURL()
getRequestURL in interface AgiRequestpublic java.lang.String getChannel()
getChannel in interface AgiRequestpublic java.lang.String getUniqueId()
getUniqueId in interface AgiRequestpublic java.lang.String getType()
AgiRequest
getType in interface AgiRequestpublic java.lang.String getLanguage()
AgiRequest
getLanguage in interface AgiRequestpublic java.lang.String getCallerId()
AgiRequestNote: even with Asterisk 1.0 is contains only the numerical part of the Caller ID.
getCallerId in interface AgiRequestnull is returned.public java.lang.String getCallerIdNumber()
AgiRequestNote: even with Asterisk 1.0 is contains only the numerical part of the Caller ID.
getCallerIdNumber in interface AgiRequestnull is returned.public java.lang.String getCallerIdName()
AgiRequest
getCallerIdName in interface AgiRequestnull is returned.public java.lang.String getDnid()
AgiRequest
getDnid in interface AgiRequestnull is returned.public java.lang.String getRdnis()
AgiRequestThis is usally only only available on PRI.
getRdnis in interface AgiRequestnull is returned.public java.lang.String getContext()
AgiRequest
getContext in interface AgiRequestpublic java.lang.String getExtension()
AgiRequest
getExtension in interface AgiRequestpublic java.lang.Integer getPriority()
AgiRequest
getPriority in interface AgiRequestpublic java.lang.Boolean getEnhanced()
AgiRequestEnhanced AGI is currently not supported on FastAGI.
getEnhanced in interface AgiRequestpublic java.lang.String getAccountCode()
AgiRequest
getAccountCode in interface AgiRequestpublic java.lang.Integer getCallingAni2()
AgiRequestAvailable since Asterisk 1.2.
getCallingAni2 in interface AgiRequestpublic java.lang.Integer getCallingPres()
AgiRequestAvailable since Asterisk 1.2.
getCallingPres in interface AgiRequestpublic java.lang.Integer getCallingTns()
AgiRequestAvailable since Asterisk 1.2.
getCallingTns in interface AgiRequestpublic java.lang.Integer getCallingTon()
AgiRequestAvailable since Asterisk 1.2.
getCallingTon in interface AgiRequestpublic java.lang.String getParameter(java.lang.String name)
AgiRequestnull 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
AgiRequest.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.
getParameter in interface AgiRequestname - a String containing the name of the parameter whose value is
requested.
AgiRequest.getParameterValues(String)public java.lang.String[] getParameterValues(java.lang.String name)
AgiRequestIf the parameter has a single value, the array has a length of 1.
getParameterValues in interface AgiRequestname - a String containing the name of the parameter whose value is requested.
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
AgiRequest
getParameterMap in interface AgiRequestpublic java.lang.String[] getArguments()
AgiRequest
Example: AGI(agi://localhost/HelloWorld,value1,,value2) results in
getArguments()[0] = "value1", getArguments()[1] = null
and getArguments()[2] = "value2".
Available since Asterisk 1.6
getArguments in interface AgiRequestnull.public java.net.InetAddress getLocalAddress()
AgiRequest
getLocalAddress in interface AgiRequestpublic int getLocalPort()
AgiRequest
getLocalPort in interface AgiRequestpublic java.net.InetAddress getRemoteAddress()
AgiRequest
getRemoteAddress in interface AgiRequestpublic int getRemotePort()
AgiRequest
getRemotePort in interface AgiRequestpublic java.lang.String toString()
toString in class java.lang.Object
|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||