In this section:
The SIP Adaptor Profile object is the main construct for SIP Message Manipulation (SMM) functionality. A SIP Adaptor Profile is associated with a SIP Trunk Group or Zone in order to act upon SIP messages passing into or out of that group. A SIP Trunk Group can have two SIP Adaptor Profiles, an input adaptor profile for manipulation of inbound messages, and an output adaptor profile for manipulation of outbound messages. Similarly, a Zone can have two SIP Adaptor Profiles.
Refer to SIP Message Manipulation for additional SMM Details.
Flexible Policy is not supported on ERE and is intended for use with an external PSX only.
The SIP Adapter Profile can also be configured to support a flexible policy mechanism to facilitate dynamic routing and policy decisions based on any SIP message information element whereby routing and policy selection criteria are provisioned by the operator. An information element can be anything in the message, such as the following examples:
The following CLI objects are used in supporting flexible policy and routing.
The profileType
parameter is used to specify whether a SIP Adapter Profile is used for flexible policy or message manipulation (default).
The flexiblePolicyAdapterProfile
Zone object is used to assign a flexible policy-specific SIP Adaptor Profile to a specific zone.
The flexiblePolicyAdapterProfile
SIP Trunk Group object is used to assign a flexible policy-specific SIP Adaptor Profile to a specific trunk group.
For Flexible Policy and Routing feature implementation, refer to Flexible Policy and Routing Support.
For Flexible Policy and Routing best practices, refer to Configuring Dynamic Policies and Routing Using Flexible Policy and Routing Feature.
Use following CLI syntax to configure a SIP Adaptor Profile.
% set profiles signaling sipAdaptorProfile <profile_name> advancedSMM <disabled | enabled> profileType <flexiblePolicy | messageManipulation> rule (see 'rule' syntax below) state <disabled | enabled>
% set profiles signaling sipAdaptorProfile <profile name> rule <index> action (see 'Rule Action Syntax' below) applyMatchHdrRange <eight | five | four | last | nine | seven | six | ten | three | two | undefined> applyMatchHeader <all | eight | five | four | last | nine | one | seven | six | ten | three | two> criterion switch type
% set profiles signaling sipAdaptorProfile SS rule <index> action <index> from type <globalVariable | header | isupParameter | messageBody | parameter | sdpContent | token | value | variable> headerInfo <fieldValue | headerValue | undefined> headerPosition <first | last | undefined> operation (see 'operation' syntax below) paramType <generic | undefined | uri | userinfo> regexp matchInstance <all | five | four | last | one | three | two> string <sting> to type <cdrField | header | isupParameter | messageBody | parameter | sdpContent | token | variable> type <header | isupParameter | message | messageBody | parameter | sdpContent | token | undefined | variable>
Regular expressions are based on the following W3C regular expressions pattern which is defined as a pattern, or sub-pattern, containing any white space or none white space string for up to 128 characters. The pattern can occur zero or one time.
"(((([\s\S])){0,128})){0,1}"
message body
and isup
parameters.% set profiles signaling sipAdaptorProfile <name> rule <Index> criterion <Index> switch <Index> switchAction <1-128> switchValue <value> switchRegexpString <regular expression>
% set profiles signaling sipAdaptorProfile <profile name> rule <index> criterion <index> type globalVar condition globalVariableID regexp value header condition hdrInstance hdrRange name numberOfInstances regexp value isupParameter condition paramCode paramEmbeddedCode paramSubType paramValue message condition messageTypes methodTypes statusCode statusRange messageBody condition messageBodyType regexp parameter sdpContent codecNames condition streamInstanceId streamType token condition regexp tokenType value variable condition otherVariableID regexp value variableID
% set profiles signaling sipAdaptorProfile <profile name> rule <index> criterion <index> type codecNames <string, max: 256 chars>[] condition streamInstanceId streamType
paramDelimiter |
|
paramName | Specifies the name of the parameter appearing in the SDP line. This information is needed in the From operand when sdpContnentSubType is a "parameter". (range: 1-64 characters) |
p ayloadType |
For instance, if |
sdpLine | This value in the to operand represents the value of the leading string identifying the target SDP line. |
% show profiles signaling sipAdaptorProfile sipAdaptorProfile Test { state enabled; rule 1 { criterion 1 { type parameter; parameter { condition exist; paramType generic; name 1; value 1; } } action 1 { regexp { string 1; matchInstance all; } } } }
Use the following commands to perform the message manipulation on Egress INVITE Request-URI user name part. After the manipulation, +1 is prefixed to user name part of Request-URI in Egress INVITE.
% set profiles signaling sipAdaptorProfile SMM_01 % set profiles signaling sipAdaptorProfile SMM_01 rule 1 criterion 1 type message message condition exist messageTypes request methodTypes invite % set profiles signaling sipAdaptorProfile SMM_01 rule 1 criterion 2 type header header condition exist name request-line % set profiles signaling sipAdaptorProfile SMM_01 rule 1 criterion 2 type header header numberOfInstances number 1 qualifier equal % set profiles signaling sipAdaptorProfile SMM_01 rule 1 criterion 3 type token token condition exist tokenType uriusername % set profiles signaling sipAdaptorProfile SMM_01 rule 1 action 1 type token % set profiles signaling sipAdaptorProfile SMM_01 rule 1 action 1 operation regprepend % set profiles signaling sipAdaptorProfile SMM_01 rule 1 action 1 regexp string [^/d] % set profiles signaling sipAdaptorProfile SMM_01 rule 1 action 1 to token uriusername % set profiles signaling sipAdaptorProfile SMM_01 rule 1 action 1 from value +1 % set profiles signaling sipAdaptorProfile SMM_01 state enable
To view the configured profile:
% show profiles signaling sipAdaptorProfile SMM_01
After the Profile is created, configure it on Egress trunk group under outputAdapterprofile
:
set addressContext a1 zone EXTERNAL sipTrunkGroup BLR_EXT signaling messageManipulation outputAdapterProfile SMM_01
set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 1 type message message messageTypes request set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 1 type message message methodType subscribe set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 2 type header header condition exist set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 2 type header header name "p-charging-vector" set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 2 type header header numberOfInstances number 1 qualifier equal set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter paramType generic set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter name "icid-generated-at" set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter condition multi-has-value set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter switch 1 switchValue "someproxy.sipart.com" switchAction 7 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter switch 2 switchValue abc.sipart.com switchAction 9 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter switch 2 switchRegexpString abc.*.com switchAction 9 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 criterion 3 type parameter parameter switch 3 switchValue others switchAction 1 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 1 type message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 1 operation reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 1 message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 1 message reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 1 message reject responseCode 500 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 7 type message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 7 operation reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 7 message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 7 message reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 7 message reject responseCode 503 set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 9 type message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 9 operation reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 9 message set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 9 message reject set profiles signaling sipAdaptorProfile SMM_PROFILE_S150_OUT rule 1 action 9 message reject responseCode 400
In the SMM rule above:
Generally others is given as the last switch value. If it is not required to match the all other values, it can be ignored.