SIP Header Manipulation

SIP header manipulation allows you to add, delete, or modify SIP message attributes on the Oracle Enterprise Communications Broker (OECB). For example, SIP headers and SIP header elements.

The most common reason for manipulating SIP headers and SIP header elements is to fix an incompatibility problem between two SIP endpoints. For example, Softswitch - PSTN incompatibility or a SIP messaging problem between two different IP PBX platforms in a multi-site deployment where calls between the platforms are unsuccessful due to problems in the SIP messaging.

To enable the SIP header manipulation, create rule sets in which you specify header manipulation rules and, optionally, header element manipulation rules. SIP header elements are the sub-parts of the header, such as the header value, the header parameter, the URI parameter, and so on, excluding the header name. You can specify the actions that you want the system to perform for each header element.

After creating the header manipulation rule set, apply it to a session agent or SIP interface as "inbound" or "outbound."

Multi-Hop SIP Header Manipulation Rules

Oracle Enterprise Communications Broker (OECB) Header Manipulation Rule (HMR) support allows you to specify a manipulation type depending on an agent's location (hop) in a route. Applicable hops include the next and last hop of a route. Applying an HMR when an agent is the last hop in a route is referred to as "multi-hop" HMR. You do not need to make any changes to the HMR configuration for it operate as a multi-hop HMR.

The default setting makes the system apply the outbound HMR only when the agent is the next hop in the route's path.

If there are multiple HMRs that the OECB must apply for the route, it applies the HMR for the last hop first. If the same agent is both next and last hop for any given traffic, the OECB applies the HMR only once regardless of the Apply Outbound Manipulation On setting.

Set the Apply Outbound Manipulation On parameter on the agent to specify when the system applies the agent's outbound HMR. Default: Next Hop Only. Valid values: Next Hop Only | Last Hop Only | Next and Last Hop.

SIP Header Manipulation Configuration Dialogs

You configure Header Manipulation Rules (HMR) on the Oracle Enterprise Communications Broker (OECB) by way of the SIP Manipulation page. In the configuration, you use the HMR dialogs to assign HMRs to agents, which defines where the system uses the rule.

The first HMR page, located at Configuration tab, System Administration section, SIP Manipulation, is the SIP Manipulation list. This list shows all manually configured HMRs available on the system. The dialog includes controls to add new HMRs, to edit, copy, and delete existing rules, and to upload and download pre-configured HMRs in to the system. The following screen capture shows the SIP manipulation page which dislpays any existing manually configured HMRs.

This screen capture shows the SIP manipulation page which dislpays manually configured Header Manipulation Rules.

When you click the Add, the system displays the Add SIP Manipulation dialog where you create a new HMR. The following screen capture shows the Add SIP Manipulation page.

This screen capture shows the Add manipulation dialog where you manually add Header Manipulation Rules.

After naming and describing the HMR, scroll to the CfgRules section of the page, which displays the list of header or MIME rules that you can apply to this HMR. Note that header rule order of execution is critical when an HMR contains multiple rules. You can manage the order of HMR execution with the Move control in the menu that displays when you right-click a row in the table. The following screen capture shows the CfgRules drop-down list.

The following screen capture shows the cfgRules drop-down list.

When you click a Configuration Rule, the system dislpays the configuration the particular configuration page for the rule type. The following illustration shows the Add SIP Manipulation / Header Rule/ Element Rule page as an example of a configuration for a Configuration Rule. The following screen capture shows the SIP Manipulation / Header Rule / Element Rule page.

SIP Header Manipulation Rules Attributes and Values Reference

Refer to the following table for information about the attributes that you can configure for SIP header manipulation rules.

Attributes Values and Descriptions
Action
  • add—Adds a new header, if that header does not exist.
  • delete—Deletes the header, if it exists.
  • find-replace-all—Finds all matching headers and replaces with the header you specified for “Split” and "Join."
  • log—Logs the header.
  • manipulate—Manipulates the elements of this header to the element rules configured.
  • monitor—Monitors the header.
  • store—Stores the header.
  • none—(default) No action is taken.
  • reject—Rejects the header.
  • sip-manip—Manipulates the SIP elements of this header to the element rules configured.

Default: None.

Comparison type
  • boolean—Header is compared to header rule and must match exactly or it is rejected.
  • case-insensitive—Header is compared to header rule regardless of the case of the header.
  • case-sensitive—(default) Header is compared to the header rule and case must be exactly the same or it is rejected.
  • pattern-rule—Header is compared to the header rule and the pattern must be exactly the same or it is rejected.
  • refer-case-insensitive—Header is compared to the header rule regardless of the case in a REFER message.
  • refer-case-sensitive—Header is compared to the header rule and the case must be exactly the same as in the REFER message or it is rejected.

Default: Case-sensitive.

Format
  • ascii-string - A character-encoding scheme that represents text (128 ASCII codes, 7 bits).
  • binary-ascii - An encoding scheme where each byte of an ASCII character is used. Can use up to 256 bit patterns .
  • hex-ascii - An encoding scheme that uses a string of numbers (no spaces) to represent each ASCII character.
Header name The name of the header to which the rule applies. Case-sensitive.
Match value The value that you want to match against the element value for an action to be performed.
Match val type The type of value to match to the match-field entry for the action to be performed.
  • any—(default) Element value in the SIP message is compared with the match-value field entry. If the match-value field is empty, all values are considered a match.
  • fqdn—Element value in the SIP message must be a valid FQDN to be compared to the match-value field entry. If the match-value field is empty, any valid FQDN is considered a match. If the element value is not a valid FQDN, it is not considered a match.
  • ip—Element value in the SIP message must be a valid IP address to be compared to the match-value field entry. If the match-value field is empty, any valid IP address is considered a match. If the element value is not a valid IP address, it is not considered a match.
Media type (SDP descriptor for SDP media rule)
  • m—Media name and transport address
  • i—Media title
  • c—Connection information (optional when configured at the session level)
  • b—Zero or more bandwidth information lines
  • k—Encryption key
  • a—Zero or more media attribute lines
  • t—The session time is active
  • r—Zero or more repeat times
Methods SIP method names to which you want to apply the header rule. For example, INVITE, ACK, BYE. When this field is empty, the system applies the MIME rule to all methods. Default: Blank.
Mime header The parameter name to which the rule applies. The parameter name depends on the element name you entered. For uri-param, uri-user-param, and header-param it is the parameter name to be added, replaced, or deleted. For all other types, it serves to identify the element rule and any name can be used. Alpha-numeric characters. Default: blank.
Msg type
  • any—(default) Requests, replies, and out-of-dialog messages
  • out-of-dialog—Out of dialog messages only.
  • reply—Reply messages only
  • request—Request messages only

Default: Any.

Name The name you want to use for the rule. Default: Blank.
New value The value for a new element or replacement value for an existing element. You can enter an expression that includes a combination of absolute values, pre-defined parameters, and operators.
  • Absolute values—Use double quotes for clarity. You must escape all double quotes and back slashes that are part of an absolute value, and enclose the absolute value in double quotes.
  • Pre-defined values.—Pre-defined parameters always start with a $. For valid values, see the Pre-defined Parameters table.
  • Operators parameters—For valid values, see the Operators table.
The following table describes the pre-defined parameters.
Pre-defined Parameter Description
$ORIGINAL Original value of the element is used.
$LOCAL_IP IP address of the SIP interface on which the message was received for inbound manipulation; or sent on for outbound manipulation.
$REMOTE_IP IP address the message was received from for inbound manipulation; or being sent to for outbound manipulation.
$REMOTE_VIA_HOST Host from the top Via header of the message is used.
$TRUNK_GROUP Trunk group is used.
$TRUNK_GROUP_CONTEXT Trunk group context is used.
The following table describes the Operators.
Operator Description
+ Append the value to the end. For example:

acme”+”packet

generates acmepacket

+^ Prepends the value. For example:

acme”+^”packet

generates packetacme

- Subtract at the end. For example:

112311”-”11

generates 1123

-^ Subtract at the beginning. For example:

112311”-^”11

generates 2311

Parameter name The parameter name to which the rule applies. The parameter name depends on the element name you entered. For uri-param, uri-user-param, and header-param it is the parameter name to be added, replaced, or deleted. For all other types, it serves to identify the element rule and any name can be used. Alpha-numeric characters. Default: Blank.
Type The type of element on which to perform the action. Default: Blank.
  • header-param—Perform the action on the parameter portion of the header.
  • header-param-name—Perform the action on the header parameter name.
  • header-value—Perform the action on the header value.
  • mime—Perform the action on Multipurpose Internet Mail Extensions (MIME).
  • reason-phrase—Perform the action on reason phrases.
  • status-code—Perform the action on status codes.
  • teluri-param—Perform the action on a SIP telephone Uniform Resource Identifier (URI).
  • uri-display—Perform the action on the display of the SIP URI.
  • uri-header—Perform the action on a header included in a request constructed from the URI.
  • uri-header-name—Perform the action on a SIP URI header name.
  • uri-host—Perform the action on a Host portion of the SIP URI.
  • uri-param—Perform the action on the parameter included in the SIP URI.
  • uri-param-name—Perform the action on the name parameter of the SIP URI.
  • uri-phone-number-only—Perform the action on a SIP URI phone number only.
  • uri-port—Perform the action on the port number portion of the SIP URI.
  • uri-user—Perform the action on the user portion of the SIP URI.
  • uri-user-only—Perform the action on the user portion only of the SIP URI.
  • uri-user-param—Perform the action on the user parameter of the SIP URI.
Type (SDP descriptor for SDP line rule)
  • v—Protocol version
  • o—Originator and session identifier
  • s—Session name
  • i—Session information
  • u—URI of description
  • e—Email address
  • p—Phone number
  • c—Connection information (not required when included in all media)
  • b—Zero or more bandwidth information lines or one or more time descriptions("t=" and "r=" lines)
  • z—Time zone adjustments
  • k—Encryption key
  • a—Zero or more session attribute lines or zero or more media descriptions
  • t—Time the session is active
  • r—Zero or more repeat times

SIP Header Manipulation Configuration

Configuring SIP manipulations from the Web GUI is a multi-faceted process performed through a series of nested dialogs that differ depending on the particular header and header element that you want to manipulate. It is not practical to document the entire SIP manipulations configuration process in one procedure. The documentation begins with the "Configure SIP Manipulation", topic where you can set the global parameters, if that is all you need. The documentation continues with procedures for each particular header and header element that you can manipulate. Each of those topics includes the global settings, so you can set or modify them there, as well.

header and header element that you can manipulate include the following:
  • Configure MIME Rule—includes the mime-header-rule element.
  • Configure MIME ISUP Rule—includes the mime-header-rule and isup-param-rule elements.
  • Configure MIME SDP Rule—includes the mime-header-rule, sdp-session-rule, and the sdp-media-rule.

When you finish configuring SIP manipulations, apply the rules to a session agent or SIP interface as "inbound" or "outbound."

Configure SIP Manipulation

Descriptions of the applicable Oracle Enterprise Communications Broker configuration fields are provided below:

  1. Access the SIP Manipulation configuration object.
    Configuration tab, System Administration section, SIP Manipulation.
  2. On the SIP Manipulation page, do the following:

    Table 15-1 SIP Manipulation

    Fields Description
    Name Enter the unique identifier for this SIP Manipulation. Use this name when applying this SIP manipulation. Default: Blank.
    Description Enter a text description for this SIP Manipulation.
    Split Header Enter a comma separated list of headers that the system separates prior to executing the manipulation. Example values: Allow,P-Asserted-Identity | Diversion,Allow.
    Join Header Enter a comma separated list of headers that the system joins together after the manipulation execution is complete. Example values: Allow,P-Asserted-Identity | Diversion,Allow.
  3. (Optional) Configure header rules and element rules. See "Configure a Header Rule" and "Configure an Element Rule."

Configure a SIP Manipulation Header Rule

You can configure SIP header rules and element rules on the Oracle Enterprise Communications Broker (OECB) from the "CfgRules" section of the "SIP Manipulations" page.

In the following procedure, you set the SIP Header Manipulation, Header Rule, and Element Rule parameters.

  1. Access the SIP Manipulation configuration object.
    Configuration tab, System Administration section, SIP Manipulation.
  2. On the SIP Manipulation configuration page, do one of the following:
    1. Select and existing SIP manipulation configuration from the table, right-click, and click Edit. (Subsequent SIP manipulation pages use "Modify" in the title.)
    2. Click the Add icon. (Subsequent SIP manipulation pages use "Add" in the title.)
  3. On the Add or Modify SIP Manipulation page, do one of the following.
    1. If you chose Add, you must enter a name for this SIP Manipulation. (You can optionally complete the Description, Split Headers, and Join Headers parameters, at this time. See "Configure SIP Manipulation.") Proceed to the next step.
    2. If you chose to edit an existing configuration, proceed to the next step.
  4. On the Add or Modify SIP Manipulation page under Cgf Rules, click the Add button and select header-rule.
  5. On the Add SIP Manipulation / Header Rule page, do the following.
  6. Click OK.
  7. Click OK.
  8. Save the configuration.

Configure a MIME Rule

You can configure Multi-Purpose Internet Mail Extensions (MIME) header rules and element rules on the Oracle Enterprise Communications Broker (OECB) from the "CfgRules" section of the "SIP Manipulations" page.

In the following procedure, you set the SIP Header Manipulation, MIME Rule, and MIME Header Rule parameters.

  1. Access the SIP Manipulation configuration object.
    Configuration tab, System Administration section, SIP Manipulation.
  2. On the SIP Manipulation configuration page, do one of the following:
    1. Select and existing SIP manipulation configuration from the table, right-click, and click Edit. (Subsequent SIP manipulation pages use "Modify" in the title.)
    2. Click the Add icon. (Subsequent SIP manipulation pages use "Add" in the title.)
  3. On the Add or Modify SIP Manipulation page, do one of the following.
    1. If you chose Add, you must enter a name for this SIP Manipulation. (You can optionally complete the Description, Split Headers, and Join Headers parameters, at this time. See "Configure SIP Manipulation.") Proceed to the next step.
    2. If you chose to edit an existing configuration, proceed to the next step.
  4. On the Add or Modify SIP Manipulation page under Cfg Rules, click the Add button and select mime-rule.
  5. On the Add or Modify SIP Manipulation / Mime Rule page, do the following.
  6. Click OK.
  7. Click OK.
  8. Save the configuration.

Configure a MIME ISUP Rule

You can configure Multi-Purpose Internet Mail Extensions (MIME) header rules and element rules on the Oracle Enterprise Communications Broker (OECB) from the "CfgRules" section of the "SIP Manipulations" page.

In the following procedure, you set the SIP Header Manipulation, MIME ISUP Rule, MIME Header Rule, and ISUP Param Rule parameters.

  1. Access the SIP Manipulation configuration object.
    Configuration tab, System Administration section, SIP Manipulation.
  2. On the SIP Manipulation configuration page, do one of the following:
    1. Select and existing SIP manipulation configuration from the table, right-click, and click Edit. (Subsequent SIP manipulation pages use "Modify" in the title.)
    2. Click the Add icon. (Subsequent SIP manipulation pages use "Add" in the title.)
  3. On the Add or Modify SIP Manipulation page, do one of the following.
    1. If you chose Add, you must enter a name for this SIP Manipulation. (You can optionally complete the Description, Split Headers, and Join Headers parameters, at this time. See "Configure SIP Manipulation.") Proceed to the next step.
    2. If you chose to edit an existing configuration, proceed to the next step.
  4. On the Add or Modify SIP Manipulation page under Cfg Rules, click the Add button and select mime-header-rule.
  5. On the Add or Modify SIP Manipulation / Mime ISUP Rule page, do the following.
  6. Click OK.
  7. Click OK.
  8. Save the configuration.

Configure a MIME SDP Rule

You can configure Multi-Purpose Internet Mail Extensions (MIME) header rules and element rules on the Oracle Enterprise Communications Broker (OECB) from the "CfgRules" section of the "SIP Manipulations" page.

In the following procedure, you set the SIP Header Manipulation, MIME SDP Rule, MIME Header Rule, SDP Session Rule, and SDP Media Rule parameters.

  1. Access the SIP Manipulation configuration object.
    Configuration tab, System Administration section, SIP Manipulation.
  2. On the SIP Manipulation configuration page, do one of the following:
    1. Select and existing SIP manipulation configuration from the table, right-click, and click Edit. (Subsequent SIP manipulation pages use "Modify" in the title.)
    2. Click the Add icon. (Subsequent SIP manipulation pages use "Add" in the title.)
  3. On the Add or Modify SIP Manipulation page, do one of the following.
    1. If you chose Add, you must enter a name for this SIP Manipulation. (You can optionally complete the Description, Split Headers, and Join Headers parameters, at this time. See "Configure SIP Manipulation.") Proceed to the next step.
    2. If you chose to edit an existing configuration, proceed to the next step.
  4. On the Add or Modify SIP Manipulation page under Cfg Rules, click the Add button and select mime-sdp-rule.
  5. In the Add or Modify SIP Manipulation / MIME SDP Rule page, do the following.
  6. Click OK.
  7. Click OK.
  8. Save the configuration.