Example 2 Manipulating the Request URI
For this manipulation rules, the Oracle® Enterprise Session Border Controller stores the URI parameter tgid in the Request URI. Then if the pattern rule matches, it adds a new header (x-customer-profile) with the a new header value tgid to the URI parameter in the request URI.
This is a sample of the configuration:
sip-manipulation name CustomerTgid header-rule name ruriRegex header-name request-uri action store comparison-type pattern-rule match-value msg-type request new-value methods INVITE element-rule name tgidParam parameter-name tgid type uri-param action store match-val-type any comparison-type pattern-rule match-value new-value header-rule name addCustomer header-name X-Customer-Profile action add comparison-type pattern-rule match-value $ruriRegex.$tgidParam msg-type request new-value $ruriRegex.$tgidParam.$0 methods INVITE header-rule name delTgid header-name request-uri action manipulate comparison-type pattern-rule match-value $ruriRegex.$tgidParam msg-type request new-value methods INVITE element-rule name tgidParam parameter-name tgid type uri-param action delete-element match-val-type any comparison-type case-sensitive match-value $ruriRegex.$tgidParam.$0 new-value
This is a sample of the result:
Request-Line: INVITE sip:service@192.168.200.60:5060 SIP/2.0 Message Header Via: SIP/2.0/UDP 192.168.200.61:5060;branch=z9hG4bK0g6plv3088h03acgh6c1.1 From: sipp <sip:sipp@192.168.1.60:5060>;tag=SDc1rg601-1 To: sut <sip:service@192.168.1.61:5060> Call-ID: SDc1rg601-f125d8b0ec7985c378b04cab9f91cc09-06a3gu0 CSeq: 1 INVITE Contact: <sip:sipp@192.168.200.61:5060;transport=udp> Goodbye: Remove Me Custom: This is my custom 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 X-Customer-Profile: 123