SIP Header Manipulation provides the flexibility to add, remove, or modify any attribute in a SIP message on the Acme Packet SBC. The most common reason for doing this is to fix an incompatibility problem between two SIP endpoints. This could range from anything such as Softswitch/PSTN incompatibility or an issue between two different IP PBX platforms in a multi-site Enterprise where calls between them fail due to issues in the SIP messaging.
In the past there was no straight forward way to test SIP Header Manipulation Rules other than performing save/activate and manually placing test calls to see if the HMR worked.
The example below is a case where an HMR needed to be written to route calls based on the Charge Number in the SIP Invite rather than routing on the Request-URI, TO, or FROM numbers. Because BroadWorks R14 uses a proprietary charge number header it is required to have one rule that looks at the number in the charge number header and stores that value using a store-action, then through the use of a second rule pastes the number as cn=4804563000 into the Request-URI then use a local-policy to route the call based on the cn= value.
The original SIP Invite from BroadWorks looks like this.
INVITE sip:+firstname.lastname@example.org:5060;user=phone SIP/2.0
The goal is to Route based on the Charge Number not the Request URI, To, or From numbers. An HMR on the Session Director must be created to extract 4804563000 from the Charge Number header and insert it in the Request URI as a cn=4804563000.
Here is the HMR for copying the number from the Charge Number header and inserting it as a cn= parameter in the Request URI. Note this is one sip-manipulation that contains two rules.
The HMR may be tested directly within the ACLI by pasting in ASCII text that contains the original message of which the SD will manipulate.
The next step is set debugging enabled (from within test-sip-manipulation), show the sip-manipulation you are about to test (always good for verification), and then execute the test.
The SD shows the debug output of the original SIP Invite that was pasted in ASCII.
The SD now presents the newly manipulated SIP Invite.
Now that the Charge Number has been inserted as part of the Request URI using the cn= parameter a Local Policy’s Policy Attribute may be configured with lrt:RouteLRT;key=cn
The value key=cn tells the policy attribute to route based on the value within the cn parameter which in this case is cn=4804563000