|
The following sections describe how to use the Oracle Communications Converged Application Server WlssSipServletMessage interface and configuration parameters to control SIP message header formats:
Applications that operate on wireless networks may want to limit the size of SIP headers to reduce the size of messages and conserve bandwidth. JSR 116 provides the SipServletMessage.setHeader method, which enables application developers to set a given header to a specific string value, such as the compact (1-letter) format.
Oracle Communications Converged Application Server extends the SipServletMessage interface with WlssSipServletMessage. One feature of the WlssSipServletMessage API is the ability to set long or compact header formats for the entire SIP message using the setUseHeaderForm method.
In addition to WlssSipServletMessage, Oracle Communications Converged Application Server provides a container-wide configuration parameter that can control SIP header formats for all system-generated headers. This system-wide parameter can be used along with WlssSipServletMessage.setUseHeaderForm and SipServletMessage.setHeader to further customize header formats.
Table 4-1 defines the compact header abbreviations described in the SIP specification ( RFC3261). Specifications that introduce additional headers may also include compact header abbreviations.
All instances of SipServletRequest, SipServletResponse, and WlssSipServletResponse can be cast to WlssSipServletMessage in order to use the extended API. A pair of getter/setter methods, setUseHeaderForm and getUseHeaderForm, are used to assign or retrieve the header formats used in the message. These methods assign or return a HeaderForm object, which is a simple Enumeration that describes the header format:
COMPACT—Forces all headers in the message to use compact format. This behavior is similar to the container-wide configuration value of “force compact,” as described in use-compact-form in the Configuration Reference Manual.LONG—Forces all headers in the message to use long format. This behavior is similar to the container-wide configuration value of “force long,” as described in use-compact-form in the Configuration Reference Manual.DEFAULT—Defers the header format to the container-wide configuration value set in use-compact-form.
WlssSipServletResponse.setUseHeaderForm can be used in combination with SipServletMessage.setHeader and the container-level configuration parameter, use-compact-form. Summary of API and Configuration Behavior.
Header formats can be specified at the header, message, and SIP Servlet container levels. Table 4-2 shows the header format that results when adding a new header with SipServletMessage.setHeader, given different container configurations and message-level settings with WlssSipServletResponse.setUseHeaderForm.
SIP Servlet Container Header Configuration (
use-compact-form Setting)
|
|||
Table 4-3 shows the system header format that results when setting the header format with WlssSipServletResponse.setUseHeaderForm given different container configuration values.
SIP Servlet Container Header Configuration (
use-compact-form Setting)
|
||
|