You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Contents

The following topics provide information about HMR syntax and variables.

HMR Syntax

HMR Syntax is available in the following format:

Header_Value | Condition?Header_Value_1:Header_Value_2 | Condition?Header_Value_1

The Condition format can only contain accepted variables.

If Condition returns a non-blank value, the system will take Header_Value_1 as the header value. If the Condition value returns blank (no value), the system will take Header_Value_2.

When the Header_Value_2 is not configured, the system will not append the header to the outgoing SIP messages.

You can enter the Header_Value as a concatenation of Segments using the "+" sign.

segment + segment + segment + ...

Each Segment can be any of the values described in the following table.

Segments

SegmentDescription
Literal

A string literal that needs to be copied verbatim into the resulting header value. The string literal should be enclosed in single quotes.

Example: 'sip:'

Variable

One of the pre-defined variables. Variables extract a value from the received SIP message or the environment and place it into the value. Variables are preceded by a '$' sign. 

Example: $from.uri.user

User Variable

One of the pre-defined user variables. User variables extract a value from the client's URI in the client information and place it into the value. User variables are preceded by a '$' sign.

Example: $userinfo.contact.parameter[param_name]

Function

Functions operate on the variables and insert the result into the value.

Example: replace($diversion, '88', '408')

HMR Variables

The following table outlines the HMR variables.

HMR Variables

Header NameVariableDescription
From$from.dispnameDisplay name.
$from.uri.userUser name portion of the URI.
$from.uri.hostHost portion of the URI.
$from.uri.portPort from the URI.
$from.uri.parameter[user]Value of the URI Parameter 'user'.
$from.uri.header[h1]Value of the URI header 'h1'.
$from.parameterValue of the From parameter 'tag'.
ToSame as From.
ContactSame as From.
RouteSame as From.
Record-RouteSame as From.
P-Asserted-Identity (PAI)Same as From (use $pai instead of $from).
P-Preferred-Identity (PPF)Same as From (use $ppf instead of $from).
Via$via.ip.hostValue of sent-by.
$via.ip.portValue of sent-by port.
$via.parameter[branch]Value of parameter 'branch'.
Request URI$request.methodSIP method.
$request.uri.userRequest-URI user.
$request.uri.hostRequest-URI host.
$request.uri.portRequest-URI port.
Other Headers$diversion.textExtract the entire diversion header from the received message.

HMR User Variables

The following table outlines the HMR user variables.

HMR User Variables

User InformationVariableRemarks
Contact$userinfo.contact.userUser name portion from the client's URI.
$userinfo.contact.hostHost portion from the client's URI.
$userinfo.contact.portPort from the client's URI.
$userinfo.contact.parameter[user]

Value of the client's URI Parameter named 'user'. Note that none of the client's URI parameters will be copied if parameter name is not specified.


  • No labels