Header Manipulation Rules (HMR) is one of the more fun topics in Oracle SBCs, it provides the ability to manipulate SIP through configuration letting add, delete, replace, copy, move, reject and log SIP headers, parameters, complete URIs, part of URIs, SIP MIME bodies (SDP, XML, ISUP) and more.
The reason to use HMR can be different but can be due to:
- Proprietary implementations of SIP
- Numerous “bugs” in SIP implementations
- Provide support with a flexible solution for interworking with any vendor without the need to upgrade SBC software version.
HMR is a good way to solve problems but its not always the BEST solution as it can impact performance! Before implementing an HMR try exploring all types of solution.
One important aspect of HMR is to have a good understanding of how rules are applied, the image below is simplified representation of the points where HMR can be applied:
As seen above:
- HMR applied as inbound can have a potential impact in routing.
- Outbound HMRs is performed after all other functions are complete.
Here are two rules when applying HMRs:
- HMR can be called from Session Agents, Realm or sip-interface
- Session Agent overrides HMR applied all others, realm overrides sip-interface
Be careful when applying HMRs and understand these rules!!!
Let’s create a basic HMR based in our more basic configuration; this HMR will add a new header called HMR with the text Hello World! applied as outbound on the Internal sip-interface, this is a graphic description of what we will test with this:
Let’s create the HRM which is translated to sip-manipulation element in configuration:
Next step is apply the configuration of the sip-manipulation created to the Internal real for outbound traffic:
With the configuration completed, is now time to test:
We will work in a few more examples and more complex in next entries.