Example 11 Use of Remote and Local Port Information

The following example shows the configuration for remote and local port information. The goals of this configuration are to:

  • Add LOCAL_PORT as a header parameter to the From header
  • Add REMOTE_PORT as a header parameter to the From header
    sip-manipulation
            name                           addOrigIp
            description
            header-rule
                    name                           addIpParam
                    header-name                    From
                    action                         manipulate
                    comparison-type                case-sensitive
                    match-value
                    msg-type                       request
                    new-value
                    methods                        INVITE
                    element-rule
                            name                           addIpParam
                            parameter-name                 newParam
                            type                           header-param
                            action                         add
                            match-val-type                 any
                            comparison-type                case-sensitive
                            match-value
                            new-value                      $LOCAL_IP
                    element-rule
                            name                           addLocalPort
                            parameter-name                 lport
                            type                           header-param
                            action                         add
                            match-val-type                 any
                            comparison-type                case-sensitive
                            match-value
                            new-value                      $LOCAL_PORT
                    element-rule
                            name                           addRemotePort
                            parameter-name                 rport
                            type                           header-param
                            action                         add
                            match-val-type                 any
                            comparison-type                case-sensitive
                            match-value
                            new-value                      $REMOTE_PORT