Sip Message Manipulation Syntax Reference Guide Ver 72
Sip Message Manipulation Syntax Reference Guide Ver 72
Version 7.2
Reference Guide Contents
Table of Contents
1 Introduction ......................................................................................................... 9
2 Field Syntax ....................................................................................................... 11
2.1 Message Type Field .............................................................................................11
2.1.1 Message Type Examples ........................................................................................11
2.2 Condition Field .....................................................................................................12
2.2.1 Condition Field Operands ........................................................................................12
2.2.2 Condition Field Examples ........................................................................................13
2.3 Action Subject Field ..............................................................................................14
2.3.1 Action Subject Field Examples ................................................................................14
2.4 Action Type Field ..................................................................................................14
2.5 Action Value Field ................................................................................................15
2.5.1 Action Value Field Examples ...................................................................................15
3 Detailed Syntax ................................................................................................. 17
3.1 Strings ..................................................................................................................17
3.1.1 String Examples .......................................................................................................18
3.2 Headers................................................................................................................19
3.2.1 Detailed Header Syntax ...........................................................................................19
3.2.2 Header Examples ....................................................................................................28
3.3 Body .....................................................................................................................30
3.3.1 Body Examples ........................................................................................................30
3.4 Parameters ...........................................................................................................31
3.4.1 Message Parameter Syntax ....................................................................................31
3.4.2 IP Groups Table Parameter Syntax .........................................................................34
3.4.3 Call Parameter Syntax .............................................................................................36
3.4.4 Payphone Parameter Syntax ...................................................................................37
3.4.5 Parameter Examples ...............................................................................................37
3.4.5.1 Example for IP Group Keep-Alive ............................................................40
4 Advanced Manipulation Features .................................................................... 41
4.1 Wildcards for Header Removal .............................................................................41
4.2 Random Characters .............................................................................................41
4.3 SDP Body Fields ..................................................................................................42
4.3.1 Source IP Address ...................................................................................................42
4.3.2 RTP Mode ................................................................................................................43
4.3.3 Origin Username......................................................................................................43
4.3.4 Origin IP Address .....................................................................................................43
4.3.5 Port ..........................................................................................................................43
4.3.6 IP Address ...............................................................................................................44
4.3.7 SDP Examples .........................................................................................................44
4.4 Regular Expressions (Regex) ...............................................................................46
4.4.1 Regex Basic Examples ............................................................................................47
4.4.2 Regex Detailed Examples .......................................................................................48
4.5 Variables for Copying Data between Messages ................................................... 51
4.5.1 Call Variables ...........................................................................................................51
4.5.2 Global Variable ........................................................................................................52
4.5.3 Session Variable ......................................................................................................53
4.5.4 Registered User Variable.........................................................................................53
4.6 Specifying Tone to Play Upon Call Connect ......................................................... 54
4.7 Functions..............................................................................................................55
4.8 ISUP Body Manipulation .......................................................................................57
4.8.1 Attaching ISUP Body ...............................................................................................62
4.8.2 Removing Elements from ISUP Body......................................................................63
4.8.3 ISUP Examples ........................................................................................................64
4.8.3.1 ISUP Deny Message Condition Rule .......................................................64
4.8.3.2 ISUP Message Manipulation Rules ..........................................................65
4.9 Special Actions using X-AC-Action SIP Header .................................................... 66
4.10 SIP Message Normalization .................................................................................68
4.11 Source and Destination Dial Plan Tags ................................................................ 71
4.12 ENUM Queries .....................................................................................................72
4.13 SIP URIs and LDAP Queries for Microsoft Skype Presence Feature .................... 74
4.14 HTTP POST and GET Requests .......................................................................... 75
5 Typical Examples .............................................................................................. 77
A Message Manipulation Syntax Reference ....................................................... 79
A.1 Action Type ..........................................................................................................79
A.2 Header Types .......................................................................................................79
A.2.1 Accept ......................................................................................................................79
A.2.2 Accept-Language .....................................................................................................80
A.2.3 Allow ........................................................................................................................80
A.2.4 Call-Id.......................................................................................................................81
A.2.5 Contact.....................................................................................................................81
A.2.6 Cseq.........................................................................................................................82
A.2.7 Diversion ..................................................................................................................82
A.2.8 Event ........................................................................................................................83
A.2.9 From.........................................................................................................................84
A.2.10 History-Info ..............................................................................................................84
A.2.11 Min-Se and Min-Expires ..........................................................................................85
A.2.12 P-Asserted-Identity ..................................................................................................86
A.2.13 P-Associated-Uri ......................................................................................................86
A.2.14 P-Called-Party-Id .....................................................................................................87
A.2.15 P-Charging-Vector ...................................................................................................88
A.2.16 P-Preferred-Identity .................................................................................................88
A.2.17 Privacy .....................................................................................................................89
A.2.18 Proxy-Require ..........................................................................................................89
A.2.19 Reason.....................................................................................................................90
A.2.20 Referred-By .............................................................................................................91
A.2.21 Refer-To ...................................................................................................................91
A.2.22 Remote-Party-Id ......................................................................................................92
A.2.23 Request-Uri ..............................................................................................................93
A.2.24 Require ....................................................................................................................94
A.2.25 Resource-Priority .....................................................................................................95
A.2.26 Retry-After ...............................................................................................................95
A.2.27 Server or User-Agent ...............................................................................................96
A.2.28 Service-Route ..........................................................................................................96
A.2.29 Session-Expires .......................................................................................................97
A.2.30 Subject .....................................................................................................................98
A.2.31 Supported ................................................................................................................98
A.2.32 To .............................................................................................................................99
A.2.33 Unsupported ............................................................................................................99
A.2.34 Via ..........................................................................................................................100
A.2.35 Warning..................................................................................................................101
A.2.36 Unknown Header ...................................................................................................101
A.3 Structure Definitions ........................................................................................... 103
List of Tables
Table 1-1: Configuration Tables and Relevant Fields ..............................................................................9
Table 2-1: Message Type Examples ......................................................................................................11
Table 2-2: Condition Operands ..............................................................................................................12
Table 2-3: Condition Examples ..............................................................................................................13
Table 2-4: Action Examples....................................................................................................................14
Table 2-5: Action Type Field Options .....................................................................................................14
Table 2-6: Action Examples....................................................................................................................15
Table 3-1: Configuration Tables and Relevant Fields for Strings...........................................................17
Table 3-2: Examples of Using Strings ....................................................................................................18
Table 3-3: Syntax for Manipulating SIP Headers ...................................................................................19
Table 3-4: Header Field Syntax Examples .............................................................................................28
Notice
Information contained in this document is believed to be accurate and reliable at the time of
printing. However, due to ongoing product improvements and revisions, AudioCodes cannot
guarantee accuracy of printed material after the Date Published nor can it accept responsibility
for errors or omissions. Updates to this document can be downloaded from
https://www.audiocodes.com/library/technical-documents.
This document is subject to change without notice.
Date Published: November-15-2020
WEEE EU Directive
Pursuant to the WEEE EU Directive, electronic and electrical waste must not be disposed of
with unsorted waste. Please contact your local recycling authority for disposal of this product.
Customer Support
Customer technical support and services are provided by AudioCodes or by an authorized
AudioCodes Service Partner. For more information on how to buy technical support for
AudioCodes products and for contact information, please visit our website at
https://www.audiocodes.com/services-support/maintenance-and-support.
LTRT Description
LTRT Description
Documentation Feedback
AudioCodes continually strives to produce high quality documentation. If you have any
comments (suggestions or errors) regarding this document, please fill out the Documentation
Feedback form on our website at https://online.audiocodes.com/documentation-feedback.
1 Introduction
This document describes SIP message syntax that is used for the following configuration
tables.
Table 1-1: Configuration Tables and Relevant Fields
Table Fields
2 Field Syntax
2.1 Message Type Field
The 'Message Type' field defines the type of SIP message that you want to apply the
manipulation or condition rule.
Syntax:
<SIP-method/any>.<request/response/any>.<response-type>
where:
<SIP-method/any> specifies the SIP method used with the option to specify requests
of all method types.
<request/response/any> specifies the SIP request or SIP response type with the
option to specify any request or response type.
<response-type> specifies the SIP response type. You can also use the 'x' wildcard
to denote multiple response types:
• To denote all SIP 18x responses (e.g., 180, 181, 182 and 183), use the following
syntax: 18x
• To denote all response types belonging to a specific response group (i.e., 1xx for
provisional, 2xx for successful, 3xx for redirection, 4xx for client failure, 5xx for
server failure, and 6xx for global failure responses), use two 'x' wildcards instead
of the last two digits of the response: <first digit of response
group>xx (e.g., 1xx)
For more information, see Section A.7.1 on page 123.
Syntax
<subject> <operand> <value>
where:
<subject> specifies the subject of the condition using the following format:
header/body/parameter
<operand> specifies the operand of the condition using the following format:
condition-operand
<value> specifies the value of the condition using the following format:
string/header/body/parameter/random/variable/regex
For more information, see Section A.7.2 on page 123.
Condition Description
header.expires.time < '88888' Returns true if expires time is less than '88888'.
header.user-agent contains Returns true if the user agent is 'Android-VMAS'
'Android-VMAS' or 'MP252'.
--OR--
header.user-agent contains 'MP252'
param.message.sdp.address == Returns true if the "c=" line contains the given IP
'10.132.10.101' address.
header.request- Returns true if the message method type is '415'.
uri.methodtype=='415'
header.diversion.0 regex Returns true if the REGEX engine matches
(<.*)(;urlparam=[a-z]*)(.*>) urlparam=<specific value>.
ldap.attr.msRTCSIP-Line contains LDAP Attribute contains three values, which are
'tel:'+param.call.dst.user+':ext=' separated by the "+" operator.
header.from.url.host insubnet Returns true if the subnet of the IPv4 host in the
'10.8.0.0/8' From header is in the given subnet.
header.from.url.host !insubnet Returns true if the IPv6 subnet of the host in the
'ffff:a08:705:0:0::/32' From header is not in the given subnet.
3 Detailed Syntax
This section describes the detailed syntax usage of the fields in the Message Manipulations
table. The following syntax is described:
Strings – see Section 3.1 on page 17
Headers – see Section 3.2 on page 19
Body – see Section 3.3 on page 30
Parameters – see Section 3.4 on page 31
3.1 Strings
The string type is a series of characters and the most basic of all syntax types.
Syntax
String enclosed by a single apostrophe:
'string'
To concatenate strings, use the plus "+" operator:
'string' + 'string'
To indicate carriage returns (new lines), use the double-backslash (\\):
'string\\string'
Table Fields
3.2 Headers
This section describes the syntax used for SIP headers in the Message Manipulations table.
Syntax:
header.<header-name>.<header-index>.<sub-type>
where:
<header-name> specifies the header name as it arrives in the message. For example:
From, To, Contact (not case sensitive).
<header-index> refers to a specific header, in the event where more than one header
of the same type is present in the message (multiple header fields). The index starts at
0, therefore in order to refer to the first header in the list, the header-index value
should be 0. For example, header.contact.2 would refer to the third header in the list.
If <header-index> is not specified; however, a <sub-type> exists, then the sub-type
would reference the first header in the list, i.e. header.contact.url.user is identical to
header.contact.0.url.user.
If both <header-index> and <sub-type> are not specified, then the subject would refer
to all headers of this type. For example, to remove or modify all headers of a specific
type, refer to the header as header.contact.
<sub-type> specifies a specific part of the message. For example, url.user, url.host
etc.
Specific ID header.call-id.id
Expires header.contact.expires
Name header.contact.name
Parameter header.contact.param
Type header.content-disposition.type
Handling header.content-disposition.handling
Param header.content-type.param
Boundary header.content-type.boundary
Type header.cseq.type
Name header.diversion.name
Parameter header.diversion.param
Name header.from.name
Remove header.from.quotecontrol
quotation marks The 'Action Value' field must be set to '0'.
surrounding
display name
Parameter header.from.param header.from.para
m.p1
Tag header.from.tag
Value header.max-forwards.val
Parameter header.min-expires.param
Time header.min-expires.time
Parameter header.p-associated-uri.param
Counter header.remote-party-id.counter
Name header.remote-party-id.name
Parameter header.remote-party-id.param
Method header.request-uri.method
RPriority header.resource-priority.rpriority
Time header.retry-after.time
Subject header.subject.subject
tag header.to.tag
User-to-User header.user-to-user.user2user
Descriptor header.x-usertouser.user2user
Protocol header.user-to-user.pd
Descriptor (PD) header.x-usertouser.pd
Data Type header.user-to-user.datatype header.usertouse
(enum) header.x-usertouser.datatype r.datatype ==
'1'
Parameter header.user-to-user.param
header.x-usertouser.param
Via Header itself header.via
Alias header.via.alias
Branch header.via.branch
TrunkID header.x-channel.trunkid
BoardIP header.x-channel.boardip
HeaderType header.x-channel.headertype
Header Description
header.to Defines the top level of the To header.
header.to.url.user Defines the user part in the header SIP URL.
header.from.url.host Defines the host part in the From header.
header.from.name Defines the display name in the From header.
header.newheader Defines a header newheader.
header.contact.param.newparam Defines the parameter newparam of a Contact
header.
header.refer-to.url.host Defines the host part of the Refer-To header.
header.diversion.reason Defines the Reason parameter in the Diversion
header.
header.supported.capabilities.path Defines the supported headers capabilities path.
header.supported.capabilities.replaces Defines the supported headers capabilities replaces.
header.max-forwards.val Defines the value of the Max-Forwards header.
header.request-uri.methodtype Defines the method in the Request-URI.
Header Description
header.remote-party-id.0.partytype Defines the party type in the first Remote-Party-ID
header.
header.contact.3 Defines the third Contact header.
header.via.2.url.user Defines the user part of the second Via header.
3.3 Body
This section describes the syntax used for the SIP body in the Message Manipulations table.
Syntax:
body.<body-name>
where:
<body-name> specified the body name as it arrives in the message. For example,
'application/sdp' (case-insensitive).
Subject Description
body.application/x-nt-mcdn-frag-hex Adds or removes this 'unknown' body type.
body.sdp Defines the SDP in the body.
The following table provides configuration examples of manipulation rules for the message
body.
Table 3-7: Message Body Manipulation Rules Examples
3.4 Parameters
This section describes the syntax used for the following SIP parameter types in the Message
Manipulations table:
Message Parameters
IP Group Parameters
Call Parameters
Subject Description
param.message.sdp.address Specifies the address in the SDP.
Note: The parameter can be used for read-write
operations in all message-syntax based tables.
param.message.sdp.rtpmode Specifies the RTP mode in the SDP.
Note: The parameter can be used for read-write
operations in all message-syntax based tables.
param.message.sdp.originaddress Specifies the origin address in the SDP.
Note: The parameter can be used for read-write
operations in all message-syntax based tables.
param.message.sdp.port Specifies the port in the SDP.
Note: The parameter can be used for read-write
operations in all message-syntax based tables.
message.incoming.remote-port Specifies the remote (peer) port for the source of
the message, as a string.
Note:
The parameter replaces the old
"param.message.address.src.port" parameter.
The parameter can only be used for read-only
operations in the message-syntax based
tables.
message.outgoing.remote-port Specifies the remote (peer) port for the
destination of the message, as a string.
Note:
The parameter replaces the old
"param.message.address.dst.port" parameter.
The parameter can only be used for read-only
operations in the message-syntax based
tables.
message.incoming.local-port Specifies the local port for the source of the
message, as a string (port on which the message
is received).
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
message.outgoing.local-port Specifies the local port for the destination of the
message, as a string (port from which the
message is sent).
Note:
Subject Description
The parameter can be used for write
operations in the Call Setup Rules table and
read-only operations in the other message-
syntax based tables.
It has a non-zero value for the relevant
message only after being modified by Call
Setup Rules for that message.
param.message.address.src.ip Specifies the IP address as a string for the
source of the message. The IP address is
returned as is.
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
param.message.address.dst.ip Specifies the IP address as a string for the
destination of the message. The IP address is
returned as is.
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
param.message.address.src.ip-for-url Specifies the IP address as a string for the
source of the message. IPv6 addresses are
enclosed in square brackets while IPv4
addresses appear without.
An example of a returned IPv6 address is
[2620:0:2ef0:7070:250:60ff:fe03:32b7]. This is
useful for creating a SIP URI, which would look
like
"sip:6000@[2620:0:2ef0:7070:250:60ff:fe03:32b7
]:5060;transport=tcp"
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
param.message.address.dst.ip-for-url Specifies the IP address as a string for the
destination of the message. IPv6 addresses are
enclosed in square brackets while IPv4
addresses appear without.
An example of a returned IPv6 address is
[2620:0:2ef0:7070:250:60ff:fe03:32b7]. This is
useful for creating a SIP URI, which would look
like
"sip:6000@[2620:0:2ef0:7070:250:60ff:fe03:32b7
]:5060;transport=tcp"
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
param.message.address.src.<transporttype> Specifies the transport type as a string for the
source of the message, where <transporttype>
can be one of the following:
UDP
TCP
TLS
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
Subject Description
param.message.address.dst.<transporttype> Specifies the transport type as a string for the
destination of the message, where
<transporttype> can be one of the following:
UDP
TCP
TLS
Note: The parameter can only be used for read-
only operations in the message-syntax based
tables.
param.message.address.src.sipinterface Specifies the SIP Interface ID on which the
message is received (source).
Note: The parameter can only be used for read-
only operations ('Action Value' and 'Condition'
fields only) in the message-syntax based tables..
param.message.address.dst.sipinterface Specifies the SIP Interface ID on which the
message is sent (destination).
Note: The parameter can only be used for read-
only operations ('Action Value' and 'Condition'
fields only) in the message-syntax based tables.
Syntax
param.ipg.src|dst|<ID>|<Name>.host|id|is-alive|name|tags|type|
user|user-defined
Where:
src defines the source IP Group
dst defines the destination IP Group
<ID> defines the IP Group by table row index
<Name> defines the IP Group by name
Note:
• To use the syntax ipg.src/dst, the device must know the source IP Group, which is
through the Classification process. To use the syntax ipg.dst, the device must
know the destination IP Group, which is through the Routing process. Therefore:
√ Message Manipulations table: You can use the syntax ipg.src/dst and
ipg.<Name>/<ID>, as these rules are typically run after both Classification and
Routing completes. However, for rules of a Manipulation Set assigned in the
SIP Interfaces table using the 'Pre Classification Man Set' parameter, use only
the syntax ipg.<Name>/<ID>.
√ Message Conditions table: Use only the syntax ipg.<Name >/<ID>, as
message conditions are run before Classification completes (Classification
table) or before Routing completes (IP-to-IP Routing table).
√ Call Setup Rules table: It is recommended to use only the syntax
ipg.<NAME>/<ID> (and not ipg.src/dst). This is because in most scenarios,
these rules are run before the Routing process completes and therefore, the
destination IP Group is still unknown. The source IP Group may also be
unknown at the time these rules are run, for example, when they are run from
the SIP Interface (configured by the SIPInterface_CallSetupRulesSetId
parameter).
• When using the syntax param.ipg.<Name>, the IP Group name is case-sensitive
and cannot contain spaces or dots (.).
Subject Description
param.call.<src/dst>.user Specifies the source or destination username during
run-time.
param.call.<src/dst>.nat Enables manipulation of a SIP message depending
on whether (=='true') or not (=='false') the source or
destination of the message is located behind NAT.
The keywords can be used in the 'Condition' or
'Action Value' parameters in the Message
Manipulations table. Message Manipulation rules
using the keywords are applicable only to message
manipulation on the outbound leg (i.e., the rules can
only be assigned to the 'Outbound Message
Manipulation Set' parameter in the IP Group table.
Syntax:
param.payphone==<'1' or '0'>
For example:
Table 3-11: Payphone Parameter Example
Syntax:
rand.string.<n>.a.z
where:
<n> is the number of random letter characters you wish to specify in the range a to z.
The following syntax shows how to specify random letter and/or numeric characters in the
range 0 to z in the Message Manipulations table.
Syntax:
Rand.string.<n>.0.z
where:
<n> is the number of random letter and/or numeric characters you wish to specify in
the range 0 to z.
The following syntax shows how to specify random numbers between n and m in the
Message Manipulations table.
Syntax
Rand.number.<n>.<m>
where:
<n> specifies the start value of the range of the random numbers that you wish to
specify.
<m> specifies the end value of the range of the random numbers that you wish to
specify.
The following table provides configuration examples for using random letters and numeric
characters in the Message Manipulations table.
Table 4-1: Examples using Random Letters and Numeric Characters
Syntax
Specific IP address:
param.message.sdp.ip
For example:
param.message.sdp.ip=='10.33.37.78’
IP address suffix:
param.message.sdp.ip suffix
For example:
param.message.sdp.ip suffix '10.10'
IP address prefix:
param.message.sdp.ip prefix
For example:
param.message.sdp.ip prefix '10.132'
Syntax
param.message.sdp.rtpmode
Possible values include the following:
sendonly
sendrecv
inactive
For example:
param.message.sdp.rtpmode=='sendrecv'
Syntax
param.message.sdp.originusername
Syntax
param.message.sdp.originaddress
Possible values include any IP address.
4.3.5 Port
You can use the first audio active media port number (i.e., port number greater than 0) in the
"m=" field of the SDP body for message manipulation.
Syntax
sdp.port
4.3.6 IP Address
You can use the IP address of the first active media (port greater than 0) for message
manipulation. The IP address is taken from the media "c=" field (the "c=" field below the "m="
field) of the SDP body. Note that if the "m=" field doesn't contain a "c=" field, the IP address
is taken from the global "c=" field (the "c=" field at the top of the SDP).
Syntax
sdp.address
Action
Message Type Condition Action Subject Action Value Description
Type
invite.request header.custom- Add param.message.sdp.i Copies the port and IP
rtp-address p address in the SDP
invite.request header.custom- Add param.message.sdp. body to a customized
rtp-port port SIP header (e.g.,
Custom-RTP-
Address/Port) in the
outgoing INVITE
message.
reinvite. param.message.sd param.message.sd Modify 'sendonly' Changes the RTP mode
request p.ip == p.rtpmode to sendonly if the SDP
'0.0.0.0'
"c=" field's address is
0.0.0.0.
param.message.sd Modify param.message.sdp.o Changes the SDP "c="
p.ip riginaddress field to the same
address as the "o="
field.
invite param.message.sd var.call.src.0 Modify '1' Uses the RTP mode as
p.rtpmode=='send a condition.
recv'
invite. var.call.dst.0== param.message.sd Modify 'sendonly'
response.200 '1' p.rtpmode
invite param.message.sd header.diversion Add <sip:[email protected] Adds a Diversion
p.ip=='10.33.37. om>;reason=no- header ("Diversion:
78' answer
<sip:[email protected]
invite param.message.sd header.diversion Add <sip:[email protected] >;reason=no-answer")
p.ip prefix om>;reason=no- to incoming INVITE
'10.33' answer messages if the SDP
contains the IP address
10.33.37.78 or the
prefix of this IP address
(10.33). The IP address
is contained in the "c="
field of the SDP (e.g.,
"c=IN IP4 10.33.37.75").
invite.request body.sdp exists Header.SDP- Add param.message.sdp.o Adds a customized
Origin-UserName riginusername header “SDP-Origin-
UserName”, where the
Action
Message Type Condition Action Subject Action Value Description
Type
username is obtained
from the “o=” field in the
SDP body, if the INVITE
message contains an
SDP body.
invite.request body.sdp exists param.message.sd Modify 'myname' Changes the username
p.originusername in the “o=” field in the
SDP body to "myname",
if the INVITE message
contains an SDP body:
Table Fields
Syntax:
<$n>
where: <$n> is used to reference a resulting sub-expression after executing a regex in a
condition; where n is an integer referencing the sub-expression.
Note:
The regex pattern ".*" for multi-line match is supported.
To concatenate, use the + operator, e.g., $1 + ‘some text’ + $3
Rand function can be used in the 'Replace-With' field (as a sub-value), for example,
$1 + rand.number.1.10.
Double backslash \\ can be used to state a new line (in 'Replace-With' field), for
example, to replace a pattern with multi-line text.
• Explanation: These rules are slightly complex as both the To and From headers
are inspected. This rule executes
♦ If the dialed number is prefixed with a number 6-8 (inclusive)
Note: This configuration isolates the last three digits in the dialed number and prefixes
them with '3'. The variable now is set to '3146'. The second rule does not use sub-
expressions. It simply searches for 2001 in the From header and if there is a match the
user part of the To header is manipulated using the standard manipulation syntax.
• Explanation: This rule matches everything up to the a=ptime in the SDP body as
$1, and stores as $3 everything after the 0 in the ptime attribute line. This is used
as the closing \r\n in the SDP body. The modify action then refers to the sub-
expressions $1 and $3, but does not make use of $2, instead replacing it with
a=ptime:10.
• Explanation: The dollar "$" values represent each condition that is enclosed by
parentheses:
♦ (.*) = $1
♦ (m=audio) = $2
♦ (.*) = $3
♦ (m=audio) = $4
♦ (.*) = $5
The 'Value' field means keep $1, $2, and $3 (and remove $4 and $5). The lines in
the SDP represented by each $ is shown below:
Original SDP (color-coded to denote $ values):
v=0
o=mv 1980150132 244692855 IN IP6
2600:1f16:c96:aa00:951f:f946:4ebf:ef8c
s=-
c=IN IP6 2600:1f16:c96:aa00:951f:f946:4ebf:ef8c
t=0 0
a=group:ANAT 1 2
m=audio 11090 RTP/AVP 0 8 101
c=IN IP6 ::
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=mid:1
m=audio 11090 RTP/AVP 0 8 101
c=IN IP4 0.0.0.0
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=mid:2
SDP after Manipulation:
v=0
o=mv 1980150132 244692855 IN IP6
2600:1f16:c96:aa00:951f:f946:4ebf:ef8c
s=-
c=IN IP6 2600:1f16:c96:aa00:951f:f946:4ebf:ef8c
t=0 0
a=group:ANAT 1 2
m=audio 11090 RTP/AVP 0 8 101
c=IN IP6 ::
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=mid:1
Note:
• All variable types described in this section support up to 10 variables per entity.
For each variable type per entity, the 10 variables can together have up to 690
characters.
• Variable names can include alphanumeric and hyphens (-).
• Variable values can be any string.
Note:
• The var.call.src and var.call.dst depends on the context in which they are used –
incoming or outgoing leg. The var.call.dst is obtained from the current leg;
var.call.src is obtained from the peer leg. Therefore, if var.call.src is used for the
incoming leg (IP Group's Inbound Message Manipulation Set parameter), the
variable is from the outgoing leg, which is the peer of the current leg. If var.call.src
is used for the outgoing leg (IP Group's Outbound Message Manipulation Set
parameter), the variable is from the incoming leg (source), which is the peer of the
current leg.
• Call variables in Message Manipulation rules can work together with SBC CDR
format customization, where the customized CDR field obtains its value from the
variable. The call variables are in the syntax var.call.src.userdefinedN, where N
can be 1 through 5. For more information, refer to the section on the SBC CDR
Format table in the User's Manual.
For example:
1. Store a value in a call variable: Stores the subject URI parameter from the To header:
MessageManipulations 0 = 0, Invite.Request, , var.call.dst.My-
Call, 2, header.to.url.param.subject, 0;
2. Use the stored value: Allocates a Subject header for the 200 OK response for the same
call and assigns it the stored value:
MessageManipulations 0 = 0, Invite.response.200, ,
header.subject, 0, var.call.dst.My-Call, 0;
The following table provides additional configuration examples of using call variables in
Message Manipulation rules.
Table 4-6: Examples of Call Variables
The following table provides additional configuration examples of using variables in Message
Manipulation rules.
Table 4-7: Example of Global Variables
Note:
• The user variable cannot be used in Outbound Manipulation for operations that
are terminated before Classification, Manipulation and Routing (responses for
REGISTER termination, Reply internal action, CMR failure).
• When a registered user expires and the device generates and sends an un-
REGISTER to the proxy, you can configure outbound manipulation for the Server-
type IP Group (i.e., proxy) using the param.ipg.src|dst.<x> syntax. For this stage,
you can also use the var.peer-user variable.
The following table provides a configuration example of using the play-tone call variable in
Message Manipulation rules. The rule instructs the device to play the tone at Index #105 in
the PRT file, to the destination call party.
Table 4-10: Example of Call Variable for Specifying Tone to Play
For more information on this feature, refer to the device's User's Manual.
4.7 Functions
You can use pre-defined functions in message manipulations for special operations such as
changing a returned value from lower case to upper case (see example below).
The functions can be used in fields where manipulation terms are read-only:
Message Manipulations table: 'Condition' and 'Action Value' fields
Pre-Parsing Message Manipulation Set table: "Replace-With" manipulation term
Call Setup Rules table: 'Request Key', 'Condition', and 'Action Value' fields
Newly Supported
Action
Functions
Examples:
The following Message Manipulation rule adds the header "My-Host" to the outgoing
SIP message, whose value is set to the source host, which is converted into upper
case letters, using the function To-Upper:
If the above rule is used and the host part in the From header of the SIP message is
"JohnB":
From: <SIP:1000@JohnB>; tag-1c1000228485
After manipulation, the following header with the host value in upper case ("JOHNB")
is added to the outgoing message:
From: <SIP:1000@JohnB>; tag-1c1000228485
My-Host: JOHNB
The following Call Setup rule performs an ENUM query on an ENUM server for the
source user and if found, it returns a string from the URL that is defined by regex (the
string after "us-ascii,"), and then converts encoded characters in the string and adds it
as the name in the From header.
Request Type Request Key Condition Action Subject Action Action Value
Type
Enum Param.Call.Src Enum.Foun Header.From.Name Modify Func.URL-
.User d Exists Decode($1)
AND
Enum.Resu
lt.Url
regex
'us-
ascii,(.*
)'
If the above rule is used and the returned URL from the ENUM query is:
: pstndata:cnam/7039532959;;charset=us-ascii,John%20Bow
The rule then extracts and decodes " John%20Bow" to "John Bow" and adds it to the
From header:
From: "John Bow"
<sip:[email protected]>;tag=1c1474248679
Note: For certain ISUP call actions, see also Section 4.9 on page 66.
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
INVITE IAM Called party Number Plan (see body.isup.iam.called_n
number Section A.5.4) um.plan
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
Number Type (see body.isup.iam.generic_
Section A.5.5) num.type
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
Forward call National/international call body.isup.iam.fci.Inte
indicator (see indicator rationalInd
Q.763 3.23)
End-to-end method body.isup.iam.fci.End2
indicator EndMethod
Transmission body.isup.iam.tmr
medium
requirement (see
Section A.5.16)
Calling party's body.isup.iam.cpc
category (see
Section A.5.19)
Hop Counter (1 to body.isup.iam.hop_coun
31) ter
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
Called party's category body.isup.acm.bci.cpc
indicator (see Section
A.5.19)
End-to-end method body.isup.acm.bci.End2
indicator (see Q.763.3.5) EndMethod
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
End-to-end information body.isup.cpg.bci.End2
indicator (see Q.763.3.5) EndInformation
ISUP
SIP
Messag Parameter Field Syntax
Method
e Type
ISDN user part indicator body.isup.con.bci.isdn
(see Q.763.3.5) userpartindicator
2. Assign the Message Condition rule to the Classification rule associated with the source
of the INVITE:
For example:
• To header before normalization:
To: <sip:100;phone-
[email protected];user=phone;UnknownUrlParam>;UnknownHea
derlParam
• To header after SIP normalization (user parameter, unknown URL parameter,
and unknown header parameter are removed):
To: <sip:[email protected];user=phone>
SDP Body: Removes unnecessary SDP fields (except v=, o=, s=, c=, t=, and r=) and
unknown media with all its attributes. For example, the bolded text is removed before
sending the message:
v=0
o=SMG 791285 795617 IN IP4 10.33.2.17
s=Phone-Call
i=A Seminar on the session description protocol
u=http://www.example.com/seminars/sdp.pdf
[email protected] (Jane Doe)
c=IN IP4 10.33.2.26
t=0 0
m=unknown 6000 RTP/AVP 8
a=unknown
a=sendrecv
a=ptime:20
m=audio 6000 RTP/AVP 8
a=rtpmap:8 pcma/8000
a=sendrecv
a=unknown
a=ptime:20
Message: Normalization of the entire message. Headers and bodies not listed below
are removed while those listed are retained and normalized (if necessary and if listed
as supported for normalization, as previously mentioned) :
• Headers:
♦ Request-URI
♦ Via
♦ Max-Forwards
♦ From
♦ To
♦ Call-ID
♦ Cseq
♦ Contact
♦ Record-Route
♦ Route
♦ Supported
♦ Allow
♦ P-Preferred-Identity
♦ Privacy
♦ Diversion
♦ Rack
♦ Required
♦ RSeq
♦ Authorization
♦ Proxy-Authorization
♦ WWW-Authenticate
♦ Proxy-Authenticate
♦ Event
♦ Refer-To
♦ Referred-By
♦ Replaces
♦ User-Agent
♦ P-Asserted-ID
♦ History-Info
♦ Priority
♦ Resource-Priority
♦ Unsupported
♦ Expires
♦ Session-Expires
♦ Min-SE
♦ Min-Expires
• Bodies:
♦ SDP
♦ DTMF
Configuration Examples:
Table 4-14: Normalization Examples
Syntax
Source Tag:
srctags
srctags.<tag name>
Destination Tag:
dsttags
dsttags.<tag name>
Applicable Fields
Condition
Action Value
Syntax
Result (i.e., URI) of the ENUM query:
enum.result.url.<x>
Where x is optional and can be any of the following:
• type
• host
• mhost
• userphone
• looseroute
• bnce
• cause
• user
• transport-type
• ac-int
• param
If ENUM query succeeded or not:
enum.found exists
enum.found !exists
Applicable Tables
Call Setup Rules table
Applicable Fields
Condition
Action Subject (only enum.result.url)
Action Value (only enum.result.url)
Example
Table 4-16: ENUM Query Example
Action Actio
Request Request Action
Condition Subject n Description
Type Key Type
Value
ENUM param.call enum.found header.requ Modify enum Performs an
.dst.user exists est-uri.url .res ENUM query
ult. using the called
url number and if
Action Actio
Request Request Action
Condition Subject n Description
Type Key Type
Value
successful,
replaces the
entire SIP
Request-URI
with the retrieved
URI.
ENUM param.call enum.found header.requ Modify enum Performs an
.dst.user exists est- .res ENUM query
uri.url.use ult. using the called
r url. number and if
user successful,
replaces SIP
Request-URI
user part with
the retrieved URI
user part
Syntax
Source SIP URI:
presence.src
Destination SIP URI:
presence.dst
For example, to search for a called mobile number, the searched LDAP Attribute is "mobile"
set to the value of the destination number ('mobile=+' + param.call.dst.user). If the entry
exists, the query searches for the Attribute userPrincipalName where the SIP URI is defined
for the corresponding mobile user. If found, the query returns the Attribute value (i.e., URI)
to the device (instructed using the special 'Condition' string "presence.dst" or "presence.src").
Table 4-17: Source and Destination SIP URIs for Skype for Business Presence
Reque
Attributes To Action Action
st Request Key Condition Action Value
Get Subject Type
Type
LDAP 'mobile=+' userPrincipal ldap.att presenc Add ldap.attr.userPrincipalNa
+ Name r.mobile e.dst me
param.call. exists
dst.user
LDAP 'mobile=+' userPrincipal ldap.att presenc Add ldap.attr.userPrincipalNa
+ Name r.mobile e.src me
param.call. exists
src.user
Syntax
To refer to an HTTP response code received from the HTTP server:
Http.Response.Status
This syntax is used in the 'Condition' field.
To refer to the body in the HTTP response (string after the HTTP headers):
Http.Response.Body
This syntax can be used in the following fields:
• 'Request Key'
• 'Condition'
• 'Action Value'
To refer to a condition if an HTTP response exists:
Http.Found
This syntax is used in the 'Condition' field.
To refer to the body in the sent HTTP POST request:
Http.Request.Body
This syntax can be used in the following fields:
• 'Condition'
• 'Action Subject' (with 'Action Type' configured to Modify for changing the body
value entirely, or Add for appending and concatenating the new body value to the
existing body)
• 'Action Value'
To refer to the Content-Type header in the sent HTTP request:
Http.Request.Content-Type
This syntax can be used in the following fields:
• 'Condition'
• 'Action Subject' (with 'Action Type' configured to Modify)
• 'Action Value'
For POST requests, the header is omitted by default; for GET requests, it is set to
"html/text". Commonly used Content-Type values include "application/json",
"application/octet-stream", "message/http", "html/text", and "application/x-www-form-
urlencoded".
The HTTP server is configured as a Remote Web Service in the Remote Web Services table
with the 'Type' parameter configured to General. The 'Request Type' parameter in the Call
Setup Rules table must be configured to HTTP GET, HTTP POST Query, or HTTP POST
Notification and the 'Request Target' to the name of the Remote Web Service (case-
sensitive).
Note:
• When the Call Setup Rule doesn't need to do any action after the HTTP request is
sent (e.g., for HTTP POST notification requests), you can use the value None in
the 'Action Type' field.
• Unlike HTTP GET requests which include all required data in the URL, HTTP
POST requests typically include a URL and a message body.
5 Typical Examples
The following table provides a summary of typical examples of Message Manipulation rules.
Table 5-1: Message Manipulation Examples
Action Value
Add 0
Remove 1
Modify 2
Add Prefix 3
Add Suffix 4
Remove Suffix 5
Remove Prefix 6
Action
Type
Rule: If the supported header does not contain 'mm,100rel,timer,replaces', then in all INVITE
messages add an Accept header:
MessageManipulations 8 = 1, invite, header.supported !=
'mm,100rel,timer,replaces', header.accept, 0, ' application/x-
private ', 0;
Result: Accept: application/x-private
A.2.2 Accept-Language
An example of the header is shown below:
Accept-Language: da, en-gb;q=0.8, en;q=0.7
The header properties are shown in the table below:
A.2.3 Allow
An example of the header is shown below:
Allow:
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUB
SCRIBE
The header properties are shown in the table below:
A.2.4 Call-Id
An example of the header is shown below:
Call-ID: [email protected]
The header properties are shown in the table below:
Operations Supported No No No NA
A.2.5 Contact
An example of the header is shown below:
Contact: <sip:[email protected]:5080>
Multiple header fields support: Yes
The header properties are shown in the table below:
Operations Supported No No No 3
A.2.6 Cseq
An example of the header is shown below:
CSeq: 1 INVITE
The header properties are shown in the table below:
A.2.7 Diversion
An example of the header is shown below:
Diversion: <sip:654@IPG2Host;user=phone>;reason=user-
busy;screen=no;privacy=off;counter=1
The header properties are shown in the table below:
A.2.8 Event
An example of the header is shown below:
Event: foo; id=1234
The header properties are shown in the table below:
A.2.9 From
An example of the header is shown below:
From: <sip:[email protected];user=phone>;tag=YQLQHCAAYBWKKRVIMWEQ
The header properties are shown in the table below:
Example Rule: Add a new parameter to the From header called p1 and set its value to
2 myParameter:
MessageManipulations 1 = 1, Invite.request,
,header.from.param.p1, 0, 'myParameter', 0;
Result: From:
<sip:fred@IPG2Host;user=phone>;p1=myParameter;tag=1c5891
Example Rule: Modify the URL in the From header:
3 MessageManipulations 0 = 1, any, , header.from.url, 2,
'sip:[email protected];tusunami=0', 0;
Result: From:
<sip:[email protected];user=phone;tusunami=0>;tag=1c23750
A.2.10 History-Info
An example of the header is shown below:
History-Info: <sip:[email protected];index=1>
History-Info: <sip:[email protected];index=2>
The header properties are shown in the table below:
Example 2 Rule: Modify a Min-Expires header with the min-expires value and add an
additional 0:
A.2.12 P-Asserted-Identity
An example of the header is shown below:
P-Asserted-Identity: Jane Doe <sip:[email protected]>
The header properties are shown in the table below:
Example 2 Rule: Modify the P-Asserted-Identity host name to be the same as the host name
in the To header:
MessageManipulations 2 = 1, invite, , header.p-
asserted-identity.URL.host, 2, header.to.url.host, 0;
Result: P-Asserted-Identity: <sip:[email protected]>
A.2.13 P-Associated-Uri
An example of the header is shown below:
P-Associated-URI: <sip:[email protected]>
The header properties are shown in the table below:
Example 2 Rule: Modify the user portion of the URL in the header to 'alice':
MessageManipulations 5 = 1, register.response,
,header.P-Associated-URI.url.user, 2, 'alice', 0;
Result: P-Associated-URI:<sip:[email protected]>
A.2.14 P-Called-Party-Id
An example of the header is shown below:
P-Called-Party-ID: <sip:[email protected]>
The header properties are shown in the table below:
A.2.15 P-Charging-Vector
An example of the header is shown below:
P-Charging-Vector: icid-value=1234bc9876e; icid-generated-
at=192.0.6.8; orig-ioi=home1.net
The header properties are shown in the table below:
A.2.16 P-Preferred-Identity
An example of the header is shown below:
P-Preferred-Identity: "Cullen Jennings" <sip:[email protected]>
The header properties are shown in the table below:
A.2.17 Privacy
An example of the header is shown below:
Privacy: none
The header properties are shown in the table below:
A.2.18 Proxy-Require
An example of the header is shown below:
Proxy-Require: sec-agree
The header properties are shown in the table below:
Example 3 Rule: Set the privacy options tag in the Proxy-Require header:
MessageManipulations 0 = 0, invite, , header.Proxy-
Require.capabilities.privacy, 0, 1 , 0;
Result: Proxy-Require: itsp.com, privacy
A.2.19 Reason
An example of the header is shown below:
Reason: SIP ;cause=200 ;text="Call completed elsewhere"
The header properties are shown in the table below:
Note: The protocol (SIP or Q.850) is controlled by setting the cause number to be greater
than 0. If the cause is 0, then the text string (see Example 3) is generated from the reason
number.
A.2.20 Referred-By
An example of the header is shown below:
Referred-By: <sip:[email protected]>;
The header properties are shown in the table below:
A.2.21 Refer-To
An example of the header is shown below:
Refer-To: sip:[email protected]
Refer-To:
<sips:[email protected]?Replaces=12345601%40atlanta.ex
ample.com%3bfrom-tag%3d314159%3bto-tag%3d1234567>
The header properties are shown in the table below:
A.2.22 Remote-Party-Id
An example of the header is shown below:
Remote-Party-ID: "John Smith"
<sip:[email protected]>;party=calling; privacy=full;screen=yes
The header properties are shown in the table below:
Result: Remote-Party-ID:
<sip:[email protected]>;party=calling;npi=0;ton=0
Example 2 Rule: Create a Remote-Party-Id header using the url in the From header using
the + operator to concatenate strings:
MessageManipulations 0 = 1, Invite, ,header.REMOTE-
PARTY-ID, 0, '<'+header.from.url +'>' +
';party=calling', 0;
Result: Remote-Party-ID:
<sip:[email protected];user=phone>;party=calling;npi
=0;ton=0
Example 3 Rule: Modify the number plan to 1 (ISDN):
MessageManipulations 1 = 1, invite, , header.Remote-
Party-ID.numberplan, 2, '1', 0;
Result: Remote-Party-ID:
<sip:[email protected];user=phone>;party=calling;npi
=1;ton=0
Example 4 Rule: Modify the Remote-Party-Id header to set the privacy parameter to 1
(Full):
MessageManipulations 1 = 1, invite, , header.Remote-
Party-ID.privacy, 2, '1', 0;
Result: Remote-Party-ID:
<sip:[email protected];user=phone>;party=calling;pri
vacy=full;npi=0;ton=0
A.2.23 Request-Uri
An example of the header is shown below:
sip:alice:[email protected];transport=tcp
SIP/2.0 486 Busy Here
The header properties are shown in the table below:
A.2.24 Require
An example of the header is shown below:
Require: 100rel
The header properties are shown in the table below:
Example 4 Rule: Set the privacy options tag in the Require header:
MessageManipulations 0 = 0, invite, ,
header.require.capabilities.privacy, 0, 1 , 0;
Result: Require: em,replaces,early-session, privacy
A.2.25 Resource-Priority
An example of the header is shown below:
Resource-Priority: wps.3
The header properties are shown in the table below:
A.2.26 Retry-After
An example of the header is shown below:
Retry-After: 18000
The header properties are shown in the table below:
A.2.28 Service-Route
An example of the header is shown below:
Service-Route: <sip:P2.HOME.EXAMPLE.COM;lr>,
<sip:HSP.HOME.EXAMPLE.COM;lr>
The header properties are shown in the table below:
A.2.29 Session-Expires
An example of the header is shown below:
Session-Expires: 480
The header properties are shown in the table below:
A.2.30 Subject
An example of the header is shown below:
Subject: A tornado is heading our way!
The header properties are shown in the table below:
A.2.31 Supported
An example of the header is shown below:
Supported: early-session
The header properties are shown in the table below:
A.2.32 To
An example of the header is shown below:
To: <sip:[email protected];user=phone>
The header properties are shown in the table below:
Operations Supported No No No NA
A.2.33 Unsupported
An example of the header is shown below:
Unsupported: 100rel
The header properties are shown in the table below:
Example 3 Rule: Set the path in the Unsupported headers options tag:
MessageManipulations 0 = 0, invite, ,
header.unsupported.capabilities.path, 0, true, 0;
Result: Unsupported: replaces, path
A.2.34 Via
An example of the header is shown below:
Via: SIP/2.0/UDP 10.132.10.128;branch=z9hG4bKUGOKMQPAVFKTAVYDQPTB
The header properties are shown in the table below:
Operations Supported No No No 10
Rule: Check the transport type in the first Via header and if it's set to UDP, then modify the
From header's URL:
MessageManipulations 0 = 1, Invite.request,
header.VIA.0.transporttype == '0', header.from.url, 2,
'sip:[email protected];tusunami=0', 0;
Result: From: <sip:[email protected];user=phone;tusunami=0>;tag=1c7874
A.2.35 Warning
An example of the header is shown below:
Warning: 307 isi.edu "Session parameter 'foo' not understood"
Warning: 301 isi.edu "Incompatible network address type 'E.164'"
The header properties are shown in the table below:
Example 2 Rule: Create a new header called "media", whose value is a concatenation of the
time in the Session-Expires header, followed by "000", followed by
A.3.2 Host
The host structure is applicable to the URL structure (see 'URL' on page 105) and the Via
header (see 'Via' on page 100).
Table A-3: Host Structure
Port Short
Name String
A.3.3 MLPP
This structure is applicable to the Reason header (see 'Reason' on page 90).
Table A-4: MLPP Structure
Type Enum MLPP Reason (see 'MLPP Reason Type' on page 108)
Cause Int
NONE Boolean
HEADER Boolean
SESSION Boolean
USER Boolean
CRITICAL Boolean
IDENTITY Boolean
HISTORY Boolean
A.3.6 SIPCapabilities
This structure is applicable to the following headers:
Supported (see 'Supported' on page 98)
Require (see 'Require' on page 94)
Proxy-Require (see 'Proxy-Require' on page 89)
Unsupported (see 'Unsupported' on page 99)
Table A-7: SIPCapabilities Structure
EarlyMedia Boolean
ReliableResponse Boolean
Timer Boolean
EarlySession Boolean
Privacy Boolean
Replaces Boolean
History Boolean
Unknown Boolean
GRUU Boolean
ResourcePriority Boolean
TargetDialog Boolean
SdpAnat Boolean
A.3.7 URL
This structure is applicable to the following headers:
Contact (see 'Contact' on page 81)
Diversion (see 'Diversion' on page 82)
From (see 'From' on page 84)
P-Asserted-Identity (see 'P-Asserted-Identity' on page 86)
P-Associated-Uri (see 'P-Associated-Uri' on page 86)
P-Called-Party-Id (see 'P-Called-Party-Id' on page 87)
P-Preferred-Identity (see 'P-Preferred-Identity' on page 88)
Referred-By (see 'Referred-By' on page 91)
Refer-To (see 'Refer-To' on page 91)
Remote-Party-Id (see 'Remote-Party-Id' on page 92)
Request-Uri (see 'Request-Uri' on page 93)
To (see 'To' on page 99)
Table A-8: URL Structure
AgentRole Value
Client 1
Server 2
Package Value
TELEPHONY 1
REFER 2
REFRESH 3
LINE_STATUS 4
MESSAGE_SUMMARY 5
RTCPXR 6
SOFT_SYNC 7
CHECK_SYNC 8
PSTN 9
DIALOG_PACKAGE 10
REGISTRATION 11
START_CWT 12
STOP_CWT 13
UA_PROFILE 14
LINE_SEIZE 15
Type Value
PreEmption Reason 0
MLPP Reason 1
Plan Value
ISDN 1
Data 3
Telex 4
National 8
Private 9
Reserved 15
A.5.6 Privacy
These ENUMs are applicable to the Remote-Party-Id (see 'Remote-Party-Id' on page 92)
and Diversion (see 'Diversion' on page 82) headers.
Table A-14: Enum Privacy
Full 1
Off 2
Reason Value
Busy 1
No Answer 2
Unconditional 3
Deflection 4
Unavailable 5
No Reason 6
Out of service 7
Reason Value
INVITE 5
REINVITE 6
BYE 7
OPTIONS 8
ACK 9
CANCEL 10
REGISTER 11
INFO 12
MESSAGE 13
NOTIFY 14
REFER 15
Reason Value
SUBSCRIBE 16
PRACK 17
UPDATE 18
PUBLISH 19
LAST_REQUEST 20
TRYING_100 100
RINGING_180 180
CALL_FORWARD_181 181
QUEUED_182 182
SESSION_PROGRESS_183 183
OK_200 200
ACCEPTED_202 202
MULTIPLE_CHOICE_300 300
MOVED_PERMANENTLY_301 301
MOVED_TEMPORARILY_302 302
SEE_OTHER_303 303
USE_PROXY_305 305
ALTERNATIVE_SERVICE_380 380
BAD_REQUEST_400 400
UNAUTHORIZED_401 401
PAYMENT_REQUIRED_402 402
FORBIDDEN_403 403
NOT_FOUND_404 404
METHOD_NOT_ALLOWED_405 405
NOT_ACCEPTABLE_406 406
AUTHENTICATION_REQUIRED_407 407
REQUEST_TIMEOUT_408 408
CONFLICT_409 409
GONE_410 410
LENGTH_REQUIRED_411 411
CONDITIONAL_REQUEST_FAILED_412 412
REQUEST_TOO_LARGE_413 413
REQUEST_URI_TOO_LONG_414 414
UNSUPPORTED_MEDIA_415 415
UNSUPPORTED_URI_SCHEME_416 416
UNKNOWN_RESOURCE_PRIORITY_417 417
BAD_EXTENSION_420 420
Reason Value
EXTENSION_REQUIRED_421 421
SESSION_INTERVAL_TOO_SMALL_422 422
SESSION_INTERVAL_TOO_SMALL_423 423
ANONYMITY_DISALLOWED_433 433
UNAVAILABLE_480 480
TRANSACTION_NOT_EXIST_481 481
LOOP_DETECTED_482 482
TOO_MANY_HOPS_483 483
ADDRESS_INCOMPLETE_484 484
AMBIGUOUS_485 485
BUSY_486 486
REQUEST_TERMINATED_487
NOT_ACCEPTABLE_HERE_488 488
BAD_EVENT_489 489
REQUEST_PENDING_491 491
UNDECIPHERABLE_493 493
SECURITY_AGREEMENT_NEEDED_494 494
SERVER_INTERNAL_ERROR_500 500
NOT_IMPLEMENTED_501 501
BAD_GATEWAY_502 502
SERVICE_UNAVAILABLE_503 503
SERVER_TIME_OUT_504 504
VERSION_NOT_SUPPORTED_505 505
MESSAGE_TOO_LARGE_513 513
PRECONDITION_FAILURE_580 580
BUSY_EVERYWHERE_600 600
DECLINE_603 603
DOES_NOT_EXIST_ANYWHERE_604 604
NOT_ACCEPTABLE_606 606
Reason Value
Busy 1
Immediate 2
No Answer 3
A.5.10 Refresher
These ENUMs are used in the Session-Expires header (see 'Session-Expires' on page 97).
Table A-18: Enum Refresher
UAC 1
UAS 2
A.5.11 Screen
These ENUMs are applicable to the Remote-Party-Id (see 'Remote-Party-Id' on page 92)
and Diversion (see 'Diversion' on page 82) headers.
Table A-19: Enum Screen
Screen Value
Yes 1
No 2
A.5.12 ScreenInd
These ENUMs are applicable to the Remote-Party-Id header (see 'Remote-Party-Id' on page
92).
Table A-20: Enum ScreenInd
Screen Value
User Provided 0
User Passed 1
User Failed 2
Network Provided 3
A.5.13 TransportType
These ENUMs are applicable to the URL Structure (see 'URL' on page 105) and the Via
header (see 'Via' on page 100).
Table A-21: Enum TransportType
TransportType Value
UDP 0
TCP 1
TLS 2
SCTP 3
A.5.14 Type
These ENUMs are applicable to the URL Structure (see 'URL' on page 105).
Table A-22: Enum Type
Type Value
SIP 1
Tel 2
Fax 3
SIPS 4
Presentation Value
Allowed 0
Restricted 1
Speech 0
64 kbits/s unrestricted 2
No indication 0
No charge 1
Charge 2
No indication 0
Subscriber free 1
Ordinary subscriber 0
Test call 40
Priority 41
Payphone 70
No indication 71
No INFORMATION 0
ALERTING 1
PROGRESS 2
In-band information 3
Cause Value
Unallocated number 1
No route to specified transit network 2
No route to destination 3
Send special information tone 4
Misdialled trunk prefix 5
Channel unacceptable 6
Call awarded and being delivered in an established 7
channel
Preemption 8
Preemption – circuit reserved for reuse 9
Normal call clearing 16
User busy 17
No user responding 18
No answer from user (user alerted) 19
Subscriber absent 20
Call rejected 21
Number changed 22
Redirection to new destination 23
Exchange routing error 25
Non-selected user clearing 26
Destination out of order 27
Invalid number format (address incomplete) 28
Facility rejected 29
Response to STATUS ENQUIRY 30
Normal, unspecified 31
No circuit/channel available 34
Network out of order 38
Permanent frame mode connection out of service 39
Cause Value
Cause Value
Location Value
user (U) 0
Busy 1
No reply 2
Deflection 4
Deflection Immediate 5
Mobile subscriber not reachable 6
Unconditional 15
!contains String Returns true if the header does not contain the
string.
exists Returns true if the header exists.
!exists Returns true if the header does not exist.
Action Modify String Replaces the entire header with the new value.
*Header
Remove Removes the header from the message, if the
header is part of a list only that header will be
removed.
Parameter Match == String Returns true if the header’s list equals to the
-List Parameter- string.
list
!= String Returns true if the header’s list not equals to
Parameter- the string.
list
contains String Returns true if the header’s list contains the
string.
!contains String Returns true if the header’s list does not
contain the string.
String Match == String Returns true if the string element equals to the
value.
!= String Returns true if the string element not equals to
the value.
contains String Returns true if the value is found in the string
element.
!contains String Returns true if the value is not found in the
string element.
> String Performs a character by character compare.
Returns true if the ASCII value of the character
is greater than that in the value
>= String Performs a character by character compare.
Returns true if the ASCII value of the character
is greater than or equal to that in the value
< String Performs a character by character compare.
Returns true if the ASCII value of the character
is less than that in the value
<= String Performs a character by character compare.
Returns true if the ASCII value of the character
is less than or equal to that in the value
Action Modify String Sets the string element to the value.
Add prefix String Adds the value to the beginning of the string
element.
Remove String Removes the value from the beginning of the
prefix string element.
Add suffix String Adds the value to the end of the string element.
Remove String Removes the value from the end of the string
suffix element.
Boolean Match == Boolean Returns true if the Boolean element equals to
the value.
Boolean – can be either 0 or 1.
A.7 Syntax
This section describes the fields of the message manipulation tables:
A.7.2 Condition
Description: Matching criteria for the rule
Syntax: (Action Subject / param) SWS match-type [SWS Action Value] * [ SWS logical-
expression SWS Condition ]
Examples:
header.from.user == '100'
header.contact.header-param.expires > '3600'
header.to.host contains 'itsp'
param.call.dst.user != '100'
header.john exists
AudioCodes Inc.
200 Cottontail Lane,
Suite A101E,
Somerset, NJ 08873
Tel: +1-732-469-0880
Fax: +1-732-469-2298
©2020 AudioCodes Ltd. All rights reserved. AudioCodes, AC, HD VoIP, HD VoIP Sounds Better, IPmedia, Mediant,
MediaPack, What’s Inside Matters, OSN, SmartTAP, User Management Pack, VMAS, VoIPerfect, VoIPerfectHD, Your
Gateway To VoIP, 3GX, VocaNom, AudioCodes One Voice, AudioCodes Meeting Insights, AudioCodes Room
Experience and CloudBond are trademarks or registered trademarks of AudioCodes Limited. All other products or
trademarks are property of their respective owners. Product specifications are subject to change without notice.
Document #: LTRT-29050