Lets work in a new HMR that will help to correct the Request Line to strip the leading “+1” of an INVITE message. To accomplish this we will use “built-in” variables defined in Oracle SBCs, please refer to “Header Manipulation Rules Guide” in Oracle documentation. In this specific case lets use ORIGINAL which refers to the original value of element.
First of all, lets have a clear understanding of what we want to change (using the default sip-message in the test-sip-manipulation):
Before HRM applied:
After HRM applied:
A new sip-manipulation is created with the name stripPlus1FromRURI:
Using now the test-sip-manipulation:
- Load the SIP INVITE with as shown previously:
2. Set the new HRM and execute:
One important thing to mention about this configuration is that it doesn’t matter the number of digits in the INVITE Request Line, it will suppress the +1 at the beginning no matter what.
Lets see another example, first loading a new sip message with +1123456789 in the Request URI line:
Now executing:
In the next entry a new HMR will be created with more complexity.