User's Manual
442
Document #: LTRT-65417
MP-11x & MP-124
Message Type
Condition
Action
Subject
Action
Type
Action Value
invite.request
header.from.url.host
== ‘company’
var.global.1
Modify
header.priority
•
Use the stored value: Assigns the same priority as the INVITE request to
SUBSCRIBE requests arriving with 'company' in the host part of the From
header:
Message Type
Condition
Action
Subject
Action
Type
Action Value
subscribe.request
header.from.url.host
== ‘company’
header.priority
Add
var.global.1
42.9 Using Regular Expressions (Regex)
You can configure SIP header manipulation rules using regular expressions (regex). Regex
is a special text string pattern matching engine which is used to define the condition that
must exist in order to use a specific manipulation rule. If the SIP header matches the regex
pattern, then the "action" of the manipulation rule is applied to the SIP message. Executing
a regex pattern also creates sub-expressions. The sub-expressions are referenced using
the
$n
syntax, where
n
is a digit in the range of 1 to 13 (e.g., $3).
Note that spaces within a regular expression must be enclosed by parenthesis, as shown
in the first example below:
body.sdp regex (AVP 8)
body.sdp regex avp
This feature provides the following main benefits:
The device does not need to know the SIP header name or structure.
The sub-expressions can be used in the manipulation action. All that is required is to
set the action (for example, add, modify, etc.) and then reference the sub-expression
you want to use as the value.
Below are a few examples using regex for SIP message manipulation:
Example 1 - Number range matching and manipulation:
•
Required manipulation: When the source number has prefix 30 to 40 and a digit
(e.g., 3122), it needs to be changed to 2312. The last digit of the original phone
number is removed (i.e., 2, leaving the number as 312) and the result is prefixed
with 2.
♦
Old header:
To: <sip:[email protected];user=phone
♦
New header:
To: sip:[email protected]
•
Manipulation rule:
Table
42-9: Regex-based Message Manipulation Rules - Example 1
Index
Condition
Action Subject
Action
Type
Action Value
1
header.to regex (<.*)(
[3-
4]
[0-
9])(.*)(\d)@(.*>)
header.to
Modify
$1+'2'+$2+$3+'@'+$5
Содержание MediaPack MP-112
Страница 2: ......
Страница 14: ...User s Manual 14 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 21: ...Part I Getting Started with Initial Connectivity ...
Страница 22: ......
Страница 30: ...User s Manual 30 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 31: ...Part II Management Tools ...
Страница 32: ......
Страница 34: ...User s Manual 34 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 78: ...User s Manual 78 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 84: ...User s Manual 84 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 86: ...User s Manual 86 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 91: ...Part III General System Settings ...
Страница 92: ......
Страница 102: ...User s Manual 102 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 103: ...Part IV General VoIP Configuration ...
Страница 104: ......
Страница 162: ...User s Manual 162 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 172: ...User s Manual 172 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 199: ...Part V Gateway Application ...
Страница 200: ......
Страница 202: ...User s Manual 202 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 240: ...User s Manual 240 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 286: ...User s Manual 286 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 287: ...Part VI Stand Alone Survivability Application ...
Страница 288: ......
Страница 296: ...User s Manual 296 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 319: ...Part VII Maintenance ...
Страница 320: ......
Страница 326: ...User s Manual 326 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 347: ...Part VIII Status Performance Monitoring and Reporting ...
Страница 348: ......
Страница 377: ...Part IX Diagnostics ...
Страница 378: ......
Страница 390: ...User s Manual 390 Document LTRT 65417 MP 11x MP 124 ...
Страница 392: ...User s Manual 392 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 403: ...Part X Appendix ...
Страница 404: ......
Страница 618: ...User s Manual 618 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Страница 622: ...User s Manual Ver 6 6 www audiocodes com ...