Example 3 Manipulating a Header
For this manipulation rule, the Oracle® Enterprise Session Border Controllerstores the pattern matches for the Custom header, and replaces the value of the Custom header with a combination of the stored matches and new content.
This is a sample of the configuration:
sip-manipulation name modCustomHdr header-rule name customSearch header-name Custom action store comparison-type pattern-rule match-value (This is my )(.+)( header) msg-type request new-value methods INVITE header-rule name customMod header-name Custom action manipulate comparison-type pattern-rule match-value $customSearch msg-type request new-value methods INVITE element-rule name hdrVal parameter-name hdrVal type header-value action replace match-val-type any comparison-type case-sensitive match-value new-value $customSearch.$1+edited+$customSearch.$3
This is a sample of the result:
Request-Line: INVITE sip:service@192.168.200.60:5060;tgid=123 SIP/2.0 Message Header Via: SIP/2.0/UDP 192.168.200.61:5060;branch=z9hG4bK20q2s820boghbacgs6o0.1 From: sipp <sip:sipp@192.168.1.60:5060>;tag=SDe1ra601-1 To: sut <sip:service@192.168.1.61:5060> Call-ID: SDe1ra601-4bb668e7ec9eeb92c783c78fd5b26586-06a3gu0 CSeq: 1 INVITE Contact: <sip:sipp@192.168.200.61:5060;transport=udp> Goodbye: Remove Me Custom: This is my edited header Display: sipp <sip:user@192.168.1.60:5060;up=abc>;hp=123 Params: sipp <sip:sipp1@192.168.1.60:5060> Params: sipp <sip:sipp2@192.168.1.60:5060> Edit: disp <sip:user@192.168.1.60:5060> Max-Forwards: 69 Subject: Performance Test Content-Type: application/sdp Content-Length: 140