Configure Translation Rules

You create translation rules in the translation-rules element.

  1. Access the translation-rules configuration element.
    ORACLE# configure terminal
    ORACLE(configure)# session-router
    ORACLE(session-router)# translation-rules
    ORACLE(translation-rules)# 
  2. id—Set the name of this translation rule.
    You'll use this name later when you group translation rules within the session-translation element.
  3. description—(Optional) Provide a description of what this translation rule does.
  4. input-header-type—Select the header type that the translation rule will apply to.
    The translation rule will check for the existence of this header, user part, or parameter. If a particular SIP message doesn't contain it, the rule won't modify that message.
  5. input-header-value—Enter the regex pattern to use when searching the input header.

    If the regex pattern does not match, no modification happens.

    If the regex pattern does match, the whole output header will be set to the value of output-header-value.

    When entering regex patterns on the ACLI, wrap the pattern in double quotes if it includes spaces.

  6. output-header-type—Enter the header whose value will be modified when the rule is executed.
  7. output-header-value—Enter the new value of the output header.

    If your input-header-value includes regex capture groups, use the $<group number> syntax to identify the captured content.

    When using capture groups that are followed by numbers, use the $0<group number> syntax for single-digit capture groups. For example, the ESBC will read $1781 as capture group 17 followed by the literal digits 81. The ESBC will read $01781 as capture group 1 followed by the literal digits 781. Capture groups that are followed by a letter, such as $3a, are not affected by this rule.

  8. Type done to save your work.
translation-rules
        id                                      prependPlusOne
        description                             
        input-header-type                       calling-address-or-number
        input-header-value                      ^(.*)$
        output-header-type                      calling-address-or-number
        output-header-value                     +1$1
translation-rules
        id                                      changeFromDomain
        description                             
        input-header-type                       calling-header
        input-header-value                      (.*)example.com(.*)
        output-header-type                      calling-header
        output-header-value                     $01example.com$02