sip-manipulation > header-rules > sip-element-rules

The sip-element-rules sub-element is used to define a list of actions to perform on a given SIP header.

Parameters

name
Enter the name of the element to which this rule applies. The name parameter does not apply for the following element types: header-value, uri-user, uri-host, uri-port, uri-header. You still need to enter a dummy value here for tracking purposes.
type
Select the type of element on which to perform the action
  • Default: none
  • Values:
    • header-value—Full value of the header
    • header-param-name—Header parameter name
    • header-param—Parameter portion of the header
    • uri-display—Display of the SIP URI
    • uri-user—User portion of the SIP URI
    • uri-host—Host portion of the SIP URI
    • uri-port—Port number portion of the SIP URI
    • uri-param-name—Name of the SIP URI param
    • uri-param—Parameter included in the SIP URI
    • uri-header-name—SIP URI header name
    • uri-header—Header included in a request constructed from the URI
    • uri-user-param—User parameter of the SIP URI
    • status-code—Status code of the SIP URI
    • reason-phrase—Reason phrase of the SIP URI
    • uri-user-only—URI username without the URI user parameters
    • uri-phone-number-only—User part of the SIP/TEL URI without the user parameters when the user qualifies for specific BNF
action
Select the action to take to the element specified in the name parameter, if there is a match value
  • Default: none
  • Values:
    • none—No action taken
    • add —Add a new element, if it does not already exist
    • store — Store the element
    • sip-manip — Specify the sip-manipulation for element
    • replace — Replace the elements
    • find-replace-all - Find and replace all elements with a a new value
    • delete-element — Delete the specified element, if it exists
    • delete-header — Delete the specified header, if it exists
    • log — Log the action if element criteria are met
    • reject — Reject the element if element criteria matches with match-val-type parameter.
match-val-type
Select the type of value that needs to be matched for the action to be performed
  • Default: ANY
  • Values:
    • ANY— Both IP or FQDN values
    • IP—IP value
    • FQDN—FQDN value
match-value
Enter the value to match against the element value for a manipulation action to be performed
new-value
Enter the explicit value for a new element or replacement value for an existing element. You can enter an expression that includes a combination of absolute values, pre-defined parameters, and operators.
  • Use double quotes around string values
  • Pre-defined parameters always start with a $. Valid pre-defined parameters are:
    • $ORIGINAL—Original value of the element is used.
    • $LOCAL_IP—Local IP address is used when you receive an inbound address.
    • $REMOTE_IP—Remote IP address is used.
    • $REMOTE_VIA_HOST—Remote VIA host part is used.
    • $TRUNK_GROUP—Trunk group is used.
    • $TRUNK_GROUP_CONTEXT—Trunk group context is used.
  • Operators are:

    Table 5-1 Operators

    Operator Description
    +

    Append the value to the end. For example:

    "acme"+"packet"

    generates "acmepacket"

    +^

    Prepends the value. For example:

    "acme"+^"packet"

    generates "packetacme"

    -

    Subtract at the end. For example:

    "112311"-"11"

    generates "1123"

    -^

    Subtract at the beginning. For example:

    "112311"-^"11"

    generates "2311"

parameter-name
Enter the element parameter name for which the rules need to be applied
comparison-type
Select the type of comparison to be used for the match-value
  • Default: case-sensitive
  • Values: case-insensitive | case-sensitive | pattern-rule | refer-case-sensitive | refer-case-insensitive | boolean

The full path from the topmost ACLI prompt is: configure terminal , and then session-router , and then sip-manipulation , and then header-rules , and then element-rules.

Path

element-rules is a sub-subelement under the header-rules subelement under the sip-manipulation configuration element, under the session-router path.