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:3122@10.132.10.100;user=phone
♦
New header:
To: sip:2312@company244.com
•
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
Summary of Contents for MediaPack MP-112
Page 2: ......
Page 14: ...User s Manual 14 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 21: ...Part I Getting Started with Initial Connectivity ...
Page 22: ......
Page 30: ...User s Manual 30 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 31: ...Part II Management Tools ...
Page 32: ......
Page 34: ...User s Manual 34 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 78: ...User s Manual 78 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 84: ...User s Manual 84 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 86: ...User s Manual 86 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 91: ...Part III General System Settings ...
Page 92: ......
Page 102: ...User s Manual 102 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 103: ...Part IV General VoIP Configuration ...
Page 104: ......
Page 162: ...User s Manual 162 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 172: ...User s Manual 172 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 199: ...Part V Gateway Application ...
Page 200: ......
Page 202: ...User s Manual 202 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 240: ...User s Manual 240 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 286: ...User s Manual 286 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 287: ...Part VI Stand Alone Survivability Application ...
Page 288: ......
Page 296: ...User s Manual 296 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 319: ...Part VII Maintenance ...
Page 320: ......
Page 326: ...User s Manual 326 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 347: ...Part VIII Status Performance Monitoring and Reporting ...
Page 348: ......
Page 377: ...Part IX Diagnostics ...
Page 378: ......
Page 390: ...User s Manual 390 Document LTRT 65417 MP 11x MP 124 ...
Page 392: ...User s Manual 392 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...
Page 403: ...Part X Appendix ...
Page 404: ......
Page 618: ...User s Manual 618 Document LTRT 65417 MP 11x MP 124 Reader s Notes ...