SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How do I add rules to a SIP header manipulation policy?

Objective

This article shows you how to build the rules inside a SIP header manipulation policy, adding a rule, giving it conditions that decide when it applies, and actions that transform the SIP message.

 

Product

Elastic SIP Trunking

 

Environment

Twilio Console

 

User Account Permission/Role(s) Required

Your role must include permission to read header manipulation policies to open the page, and permission to update them to save your rules.

 

Procedure

  1. In the Twilio Console, select Communications in the left sidebar.
  2. Select Voice, then Elastic SIP Trunking.
  3. Select the SIP header manipulations tab, then select the policy you want to edit.
  4. In the Request rules section, select Add a new rule and complete the panel:
    • Rule name — a unique, human-readable name, up to 64 characters.
    • Direction — Request or Response, depending on whether the rule applies to SIP requests or responses.
    • Execution type — whether the actions run if any, all, or none of the conditions are met. Select Add rule.
  5. On the new rule, select Add new condition and complete the panel:
    • SIP header field — the field to inspect, for example From user.
    • Operator — for example Equals.
    • Value — the value to compare against. Select Save condition.
  6. On the same rule, select Add new action and complete the panel:
    • SIP header field — the target field, for example From Number.
    • Action — the operation to apply, for example Add prefix.
    • Value — the value the action uses. Select Save action.
  7. Select Save rules to persist the whole ruleset. A Rules saved. confirmation appears.

 

Additional Information

  • Rules, conditions and actions are held locally until you select Save rules. The button is enabled only when there are unsaved changes, and leaving the page with unsaved edits prompts you to confirm.
  • Rule names must be unique within the policy. Reusing a name shows The name is already used by another rule in this policy. Choose a unique name.
  • A rule's direction is fixed once created; rules cannot move between the request and response lists.
  • Use Move up and Move down on a rule to change the order it is evaluated in, Edit properties to rename it or change its execution type, and Delete rule to remove it.
  • Response rules are built the same way, in the Response rules section, and their conditions use the fixed status-code and reason-phrase fields.
  • Sections that have nothing yet show No conditions, No actions, or a note that there are no rules for that direction.

 

 

This content was generated by AI and reviewed, edited, and verified by a human.

Have more questions? Submit a request
Powered by Zendesk