Using Policy to Normalize SIP Headers

The Oracle Enterprise Communications Broker supports policy-based SIP Header Normalization, allowing the user to copy and change information in headers when their user parts are Tel-URIs or SIP URIs composed of numbers. The system writes header changes caused by policy after any inbound and before any outbound manipulation performed by header manipulation rules. These policies work for registered users and targets derived from the user database or LDAP. The user configures header normalization policies from the Oracle Enterprise Communications Broker's Policy icon and applies them to routes and/or the Registrar. Routes support multiple policies.

The header normalization policy works with the existing outbound translation policy. Each policy consists of one or more rules by which the system changes headers to messages that match the routes or registrar to which the policy is configured. Multiple rules can be defined for the same SIP header. The system evaluates and executes rules in the configured order and changes the header values with each rule that has a valid New value field.

Header normalization configuration fields include:

  • SIP header name—The name of the SIP header to be normalized. This field cannot be empty.
  • Dialing context—Name of dialing context that defines the dialing rules to be applied to the phone number in this SIP header. An empty value in this field indicates that no dialing rules need to be applied to the corresponding SIP header in the rule.
  • Result name—A temporary variable name to store the result of the dialing rules on the SIP header. This name has to be unique within this policy action. The value is saved between policy rule evaluation, but is not saved after the policy is fully evaluated.
  • New value—The Result name whose value will be used as the new value of the SIP header. If this field is left empty, the system does not change the value of the SIP header.

If a rule specifies a SIP header name that is absent in the SIP request and the New value field has a valid Result name, the system adds the SIP header and set it to the value of Result name.

ANI Masking

The Oracle Enterprise Communications Broker provides a means for ensuring that the automatic number identification (ANI) presented to a service provider be recognized as a valid screened telephone number (STN) and, therefore, is not dropped by that service provider. The user configures this function as a Header Normalization policy that rewrites the applicable header with a recognizable STN. Applicable headers are DIVERSION, P-ASSERTED-IDENTIFY or FROM, depending on the service provider's requirements.

ANI Masking Configurations

The following example shows a header normalization policy that ensures that the system presents an Automatic Number Identification (ANI) as a valid Screened Telephone Number (STN). The example assumes that you created a dialing context from which the system can determine an STN.

Policy

Name Description
ANI_Mask1 North American international dialing

Condition

The default condition, which requires no configuration, is to always apply the policy.

Actions

The following table shows an example configuration for the action named ANI_MaskforSP1, which is of the header-normalization-action element type with two actions. The first row in the table shows the SIP header name as "From," the dialing context, and the result name. The second row shows the SIP header name as "Diversion," the result name, and the new value.

Table 8-1 Example Configuration

SIP Header Dialing Context Result Name New Value
From find_Verizon_STN STN NA
Diversion NA original_diversion NA

The results of the actions in the preceding table follow.

  1. Use the value of the "from" header and run it through a dialing context called "find_Verizon_STN" and store the result in a variable called "stn". Because the new value field is empty the value of the "from" header is unaltered.
  2. Because the dialing context is empty, copy value of the "Diversion" header to the variable called "original_diversion". If the incoming SIP request did not have a "Diversion" header "original_diversion" will be set to an empty string. Copy the value of the variable "STN" into the "Diversion" header.

Route and Registrars

Configure either routes or registrars as triggers by setting their Policy fields to the ANI_Mask1 policy.

Results

The following table shows the results of this example configuration. The SIP Message Text column shows the SIP To and From addresses. The Mask Function column shows the dialing context used to create the new value. The Result SIP Message Text column shows the SIP To, From, and Diversion addresses.

SIP Message Text Mask Function Result SIP Message Text

To: sip:781.630.1111@oracle.com

From: sip:781.630.2222@oracle.com

Use Dialing context titled "find_Verizon_STN" to create new value titled "STN"

To: sip:781.630.1111@oracle.com

From: sip:781.630.2222@oracle.com

Diversion: sip:978.528.1234@oracle.com