Version 6.6 441 MP-11x & MP-124
User's Manual 42. SIP Message Manipulation Syntax
Note that there must be no spaces in the syntax.
The following is a manipulation example using the length condition for the user part in a
Request-URI header:
Parameter Rule Index 1
Condition
header.request-uri.url.user len>'6'
Action Subject
header.diversion
Action Type
Add
Action Value
<sip:flora@p4.isp.com>;reason = time-of-day
42.8 Copying Information between Messages using
Variables
You can use variables in SIP message manipulation rules to copy specific information from
one message to another. Information from one message is copied to a variable and then
information from that variable is copied to any subsequent message. The device can store
information in local or global variables. Local variables are stored on a per call basis and
change when a new call is made. Up to two local variables can be used per call. Global
variables do not change as new calls are made. Up to 10 global variables can be used.
The syntax for using variables is as follows:
Var.call.<src || dst><local index>
where local index is an integer between 1 and 2 inclusive
Var.global.<global index>
where global index is an integer between 1 and 10 inclusive
To store data in a variable, add the name of the variable in the Action Subject field and set
the Action Type to Modify. To retrieve data from a variable, add it in the Action Value field
and it can be used in any manipulation where a ManStringElement is valid as an Action
Subject.
Below are examples of manipulation rules using variables:
Example 1:
• Store a value in a call variable: Stores the subject URI parameter from the To
header:
Message Type Condition Action Subject
Action
Type
Action Value
invite.request
var.call.dst.1 Modify header.to.url.param.subject
• Use the stored value: Allocates a Subject header for the 200 OK response for the
same call and assigns it the stored value:
Message Type Condition Action Subject
Action
Type
Action Value
invite.response.200
header.subject Add var.call.dst.1
Example 2:
• Store a value in a global variable: Stores the Priority header of the INVITE with
‘company’ in the host part of the From header: