In this section:
Overview
SIP Adaptor Profile
The SIP adaptor profile object is the main construct for SIP Message Manipulation (SMM) functionality. Using SMM criteria and actions, you define SMM rules within a SIP adaptor profile. The SBC applies the profile to SIP messages in order to modify their headers and/or parameters. When a message comes into or out of the SBC and a SIP adaptor profile applies, the message is evaluated based on the set of criteria in the profile. If the message meets the criteria, it is modified according to actions defined in the profile. You can assign SMM profiles at the global, address context, zone, and SIP trunk group levels. You have the option to define profiles at any or all of these levels. Refer to SIP Message Manipulation for more information on SMM. The SBC supports up to 1024 SIP Adaptor Profiles.
The number of rules in a profile is limited to 10,000 and the number of actions across profiles in a system is limited to 50,000.
Ensure the above conditions are met before LSWU.
Flexible Policy Adaptor Profile
The SIP adaptor 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:
- SIP header value
- Presence or absence of a header
- String in a message body
- Parameter value
- Presence or absence of a parameter
The following CLI objects are used in supporting flexible policy and routing.
The
profileType
parameter is used to specify whether a SIP adaptor 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.
Command Syntax
Use following CLI syntax to configure SIP adaptor profiles.
SIP Adaptor Profile High Level
% set profiles signaling sipAdaptorProfile <profile_name> advancedSMM <disabled | enabled> profileType <flexiblePolicy | messageManipulation> rule <index> (see 'rule' syntax below) state <disabled | enabled>
Rule Parameters
% 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
Rule Action Parameters
% set profiles signaling sipAdaptorProfile <profile name> rule <index> action <index> from type <globalVariable | header | isupParameter | messageBody | parameter | sdpContent | token | value | variable | flexVariable> from flexVariableValue <flexvar1 | flexvar2 | flexvar3 | flexvar4 | flexvar5 | flexvar6 | flexvar7 | flexvar8 | flexvar9 | flexvar10 | flexvar11 | flexvar12 | flexvar13 | flexvar14 | flexvar15 | flexvar16> 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>
Configuration Example
set profiles signaling sipAdaptorProfile AddCallinfo rule 1 action 1 from type flexVariable set profiles signaling sipAdaptorProfile AddCallinfo rule 1 action 1 from flexVariableValue flexvar1 commit
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}"
Rule Criterion Switch Parameters
- The SBCsupports up to 128 switch values.
- These switch semantics are applicable only to the variables: global variables, headers, parameters, and tokens. They are not applicable for
message body
andisup
parameters.
% set profiles signaling sipAdaptorProfile <name> rule <index> criterion <index> switch <index> switchAction <1-128> switchValue <value> switchRegexpString <regular expression>
Rule Criterion Type Parameters
% 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 operation statusCode statusRange messageBody condition messageBodyType regexp parameter sdpContent codecNames condition streamInstanceId streamType token condition regexp tokenType value variable condition otherVariableID regexp value variableID
SDP Content Parameters
% set profiles signaling sipAdaptorProfile <profile name> rule <index> criterion <index> type sdpContent codecNames <string, max: 256 chars>[] condition streamInstanceId streamType
Operation Parameters
Type Parameters
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. |
Command Examples
View SIP Adaptor Profile
% 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; } } } }
Perform SIP header manipulation
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
Configure SMM rule using SMM switch criteria
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:
- Action 7 will be performed if parameter icid-generated-at matches with value someproxy.sipart.com
- Action 9 will be performed if parameter icid-generated-at matches with value abc.sipart.com or regular expression abc.*.com
- Action 1 will be performed for all the other values. This is because, "others" is a keyword used to match all other values.
Generally others is given as the last switch value. If it is not required to match the all other values, it can be ignored.
Teardown Message
% set profiles signaling sipAdaptorProfile Test6 rule 1 action 1 type message operation teardown message teardown responseCode 488