HMRs are important as they provide great flexibility to modify headers, SDP, XML, etc, changes that can actually modify the routing of the sessions.
In this entry let’s create a more complex HMR making changes only if an specific contact information is validated, this can be seen that in a graphic representation:
![](https://whereismyvoicepacket.com/wp-content/uploads/2022/10/image-220.png)
And in a sip message:
![](https://whereismyvoicepacket.com/wp-content/uploads/2022/10/image-221.png)
Hands on, lets create the HMR AddHeaderIfURIUsersipp, this SIP manipulation element is divided into 2 sections:
![](https://whereismyvoicepacket.com/wp-content/uploads/2022/10/image-222.png)
Now lets execute 2 tests (reference to the Testing HMRs entry for manipulation in the test-sip-manipulation):
- Matching Contact from sipp in Contact header
![](https://whereismyvoicepacket.com/wp-content/uploads/2022/10/image-223.png)
2. No match in Contact header
![](https://whereismyvoicepacket.com/wp-content/uploads/2022/10/image-224.png)