Example 7 Accessing Data from Multiple Headers of the Same Type

For this manipulation rule, the Oracle® Enterprise Session Border Controller stores the user name from the Params header. It then adds the URI parameter c1 with the value stored from the first Params header. Finally, it adds the URI parameter c2 with the value stored from the second Params header.

This is a sample of the configuration:

sip-manipulation
        name                           Params
        header-rule
                name                           storeParams
                header-name                    Params
                action                         store
                comparison-type                case-sensitive
                match-value
                msg-type                       request
                new-value
                methods                        INVITE
                element-rule
                        name                           storeUserName
                        parameter-name                 user
                        type                           uri-user
                        action                         store
                        match-val-type                 any
                        comparison-type                case-sensitive
                        match-value
                        new-value
header-rule
                name                           modEdit
                header-name                    Edit
                action                         manipulate
                comparison-type                pattern-rule
                match-value
                msg-type                       request
                new-value
methods                        INVITE
                element-rule
                        name                           addParam1
                        parameter-name                 c1
                        type                           uri-param
                        action                         add
                        match-val-type                 any
                        comparison-type                case-sensitive
                        match-value
                        new-value                      $storeParams[0].$storeUserName.$0
                element-rule
                        name                           addParam2
                        parameter-name                 c2
                        type                           uri-param
                        action                         add
                        match-val-type                 any
                        comparison-type                case-sensitive
                        match-value
                        new-value                      $storeParams[1].$storeUserName.$0

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=z9hG4bK9g855p30cos08acgs6o0.1
        From: sipp <sip:sipp@192.168.1.60:5060>;tag=SD99ri601-1
        To: sut <sip:service@192.168.1.61:5060>
        Call-ID: SD99ri601-6f5691f6461356f607b0737e4039caec-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;c1=sipp1;c2=sipp2>
        Max-Forwards: 69
        Subject: Performance Test
        Content-Type: application/sdp
        Content-Length: 140