|
||||||||||||||||||||||||||
ProxyServletOverviewThe SIP servlet that proxies an SIP message from a user agent (UA). ProxyServlet is an SIP servlet that implements the proxy server function defined in RFC3261 and uses the Proxy class defined by the SIP Servlet API. Note that the current version of this SIP proxy servlet does not fully conform to RFC3261 because the proxy server specification defined in it is so enormous.*1 ProxyServlet provides the followings as the main functions.
In addition, ProxyServlet provides the followings as the functions specific to this proxy. Forking Behavior The forking function provided by ProxyServlet uses the following addresses as forking destinations.
Collaboration with Web If the web-redirect parameter is specified, ProxyServlet changes an error response (4xx, 5xx, 6xx) that is the final response to one of the INVITE messages it proxied to a 302 response, and set its Contact header to the HTTP URL specified in the web-redirect parameter. The client which supports the HTTP URL contact information (such as OkiSoftphone) will automatically start a Web browser and access to the specified URL when receiving this response. The sip-demo application displays a Web page that asks a user if he/she records a voice mail or not at this HTTP URL. When the user selects Yes, RecorderServlet starts to record a voice mail. This Web collaboration function provided by ProxyServlet allows a user to select his /her action through Web-based functions. (This process had been performing only through voice-based functions.) Initialization ParametersThe following table lists the initialization parameters you can set in ProxyServlet.
proxy in the <proxy-policy> of the sipserver.xml takes precedence over the setting in the downstream parameter. Some initialization parameters described above (record-route, parallel, supervised, and recurse) conform to the Proxy class API defined by the SIP Servlet API. For more information about these flags, see SIP Servlet API Specification or JavaDoc. External InterfacesProxyServlet uses the following SPI:
Related FileThe ProxyServlet setting should be defined in the sip.xml. ExampleHere is an example of the sip.xml. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sip-app PUBLIC "-//Java Community Process//DTD SIP Application 1.0//EN" "http://www.jcp.org/dtd/sip-app_1_0.dtd"> <sip-app> <display-name>A Simple SIP Servlet Proxy Application</display-name> <servlet> <servlet-name>proxy</servlet-name> <servlet-class>com.oki.sip.apps.proxy.ProxyServlet</servlet-class> <init-param> <param-name>downstream</param-name> <param-value>sip:foo.com:5060;transport=udp</param-value> </init-param> <init-param> <param-name>record-route</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>parallel</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>supervised</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>recurse</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>sequential-timeout</param-name> <param-value>20</param-value> </init-param> <init-param> <param-name>web-redirect</param-name> <param-value>http://foo.com/bar</param-value> </init-param> <load-on-startup/> </servlet> <servlet-mapping> <servlet-name>proxy</servlet-name> <pattern> <or> <equal> <var>request.method</var> <value>MESSAGE</value> </equal> <equal> <var>request.method</var> <value>INVITE</value> </equal> <equal> <var>request.method</var> <value>ACK</value> </equal> </or> </pattern> </servlet-mapping> <session-config> <session-timeout>1</session-timeout> </session-config> </sip-app> ReferenceLast Modified:Tue Dec 28 14:12:32 JST 2004 |
||||||||||||||||||||||||||
|