dialplan_add_rule
Add a new translation rule to an OpenSIPS dialplan table. Define match pattern, substitution, replacement, priority, and optional time-based conditions to control SIP message transformations.
Instructions
Add a dialplan translation rule.
Parameters
dpid: Dialplan id (translation table id, referenced from script). match_op: Match operator — 0 = equal, 1 = regex (default), 2 = fnmatch. match_exp: Pattern to match against the input. subst_exp: Substitution regex (for match_op=1). repl_exp: Replacement string. pr: Priority — lower matches first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpid | Yes | ||
| match_exp | Yes | ||
| subst_exp | Yes | ||
| repl_exp | Yes | ||
| match_op | No | ||
| pr | No | ||
| match_flags | No | ||
| timerec | No | ||
| disabled | No | ||
| attrs | No | ||
| reload | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||