In this section:
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. For SIP Adaptor Profile provisioning limits, refer to SBC Provisioning Limits.
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.
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:
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.
Use following CLI syntax to configure SIP Adaptor Profiles.
% set profiles signaling sipAdaptorProfile <profile_name> advancedSMM <disabled | enabled> profileType <flexiblePolicy | messageManipulation> rule <index> (see 'rule' syntax below) state <disabled | enabled>
Parameter | Length/Range | Description |
---|---|---|
advancedSMM | N/A | Enable this flag to apply advanced SMM logic, such as dialog stateful variables, to INVITE, REGISTER, SUBSCRIBE messaging. For an example SMM rule, refer to SMM (Advanced) Examples.
NOTE: Dialog stateful variables are not applied for the NOTIFY messages received prior to receiving 200 OK response to the egress SUBSCRIBE. |
profileType | N/A | When creating a SIP Adaptor Profile, use this parameter to specify whether a SIP Adaptor Profile is to be used for flexible policy or message manipulation.
|
| 1-10000 | Use this object to define a rule within the SIP Adaptor Profile. Specify an SMM rule index number, and then configure the rule parameters as listed in the Rule Parameters section below. |
| 1-23 characters | The name of the SIP Adaptor Profile. Up to 512 profiles are configurable. |
| N/A | The administrative state of this SIP PDU manipulation entry.
|
% 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
Parameter | Length/Range | Description |
---|---|---|
| 1-128 |
|
| N/A | This value specifies the matching header. The following are the valid set of values for this field:
|
| N/A | The range of the filtered header instances which are to be modified. The following is the valid set of values for this field:
|
| 1-20 | Identifies the index for the SIP PDU manipulation criterion. A criterion can then be either:
See Rule Criterion Switch Parameters and Rule Criterion Type Parameters tables below for details on specifying the criterion parameters for each class of criterion. |
| 1-10000 | The index number of the SMM rule within the SIP Adaptor Profile. |
% set profiles signaling sipAdaptorProfile <profile name> rule <index> action <index> from type <flexVariable | 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>
Parameter | Description |
---|---|
from type | Use to configure source message parameters.
|
headerInfo | The type of Header information: fieldValue | headerValue | undefined (default)
|
headerPosition | The header position of add header action: first | last | undefined (default) |
operation | The operation type of this SIP PDU manipulation action entry. (See Operation Parameters table below for details) |
paramType | Parameter type:
|
regexp | Specifies the regular expression string against which comparison is performed to find the matches.
Use the " |
to type | Use this object to configure destination message parameters. (See Type Parameters table below for details)
|
type | Use this field to specify an object type to take action against. (See Type Parameters table below for details).
|
set profiles signaling sipAdaptorProfile smm1 rule 1 action 1 from type flexVariable set profiles signaling sipAdaptorProfile smm1 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}"
message body
and isup
parameters.% set profiles signaling sipAdaptorProfile <name> rule <index> criterion <index> switch <index> switchAction <1-128> switchValue <value> switchRegexpString <regular expression>
Parameter | Length/Range | Description |
---|---|---|
switch | N/A | Use this object to define the SMM switch criterion. NOTE: Ensure actions configured under this parameter are also present in the list of created actions. |
switchAction | 1-128 | <Id> – Action identifier of this SIP PDU Manipulation action entry. |
switchRegexpString | reg. expression | <text> – The regular expression text of this switch criterion entry. |
switchValue | N/A |
NOTE: Use the keyword |
% 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
Parameter | Description |
---|---|
globalVar | Specifies for which value of the global variable the rule is applicable. The criteria must be present in global variable rules.
|
header | Specifies the header for which the rule is applicable.
|
isupParameter | Use this object to define ISUP parameter matching conditions.
|
message | Specifies whether the rule should apply for requests/responses/both, method name and if applicable response code/response code range. Options are:
|
messageBody | Specifies the message body for which the rule is applicable. This criteria must be present in the message body rules. Options are:
|
parameter | The parameter for which the rule is applicable. This criteria element must be present in Parameter rules.
|
sdpContent | SDP Content configuration objects. (See SDP Content Parameters table). |
token | Specifies the token type to act upon by the action.
|
| The ID of the internal variable to apply with this Action.
|
% set profiles signaling sipAdaptorProfile <profile name> rule <index> criterion <index> type sdpContent codecNames <string, max: 256 chars>[] condition streamInstanceId streamType
Parameter | Description |
---|---|
codecNames | Specifies codec name or a list of comma separated codec names. At most 25 comma separated codec names are supported. When specifies the codecNames for filterCodec operation, a * is used as a wildcard and only one wildcard is allowed. This wild card can appear in any position. (range: 1-128 characters). |
condition | The pattern-matching condition of this SDP Manipulation criterion entry.
|
streamInstanceId |
|
streamType |
|
sdpContentSubType | Use this primitive to further define additional SDP content type information during an action operation.
|
Parameter | Description |
---|---|
add | Add a header, parameter, token or messageBody using configured value. |
addDigits | Use this operation to either add or replace the digits within these parameters. NOTE: This operation only applies to parameters calling party number, called party number, called IN number, location number, redirection number, original called number, redirecting number, connected number of generic number. |
append | Append a configured value to a variable. |
asciiToBinaryAppend | Converts an ASCII string of hexadecimal digits into an array of hexadecimal binary bytes e.g. “1234” is converted to 0x12, 0x34 and appends to the SMM variable. |
| Converts an ASCII string of hexadecimal digits into an array of hexadecimal binary bytes e.g. “1234” is converted to 0x12, 0x34 and stores it to the SMM variable. |
binaryToAsciiAppend | Converts hexadecimal binary data into the equivalent ASCII string, e.g. the number 0x12, 0x34 into the string “1234” (0x31, 0x32, 0x33, 0x34) and appends it to the SMM variable. |
| Converts hexadecimal binary data into the equivalent ASCII string. e.g. the number 0x12, 0x34 into the string “1234” (0x31, 0x32, 0x33, 0x34) and stores it to the SMM variable. |
| Bitwise AND operation for SMM variable (hex value) |
bitNOT | Bitwise NOT operation for SMM variable (hex value) |
bitOR | Bitwise OR operation for SMM variable (hex value) |
bitXOR | Bitwise XOR operation for SMM variable (hex value) |
createuri message uriInfo | Create a SIP URI using following sub-parameters. The SIP URI is stored in the specified variable. The "to" type for this operation is a variable.
NOTE: Use " NOTE: SBC supports SIP URI messages containing up to 20 parameters in any SIP header. However, increasing the number of URI parameters impacts memory usage. For example, increasing the number of parameters from 10 to 20 will increase memory usage by approximately 10 percent. |
| Delete a header, parameter or a token. |
filterCodec | Filter/rearrange the codec in the media line according the specified patterns. The patterns contain up to 25 comma-separated codec names or the wildcard codec "*". There should be no more than one wildcard "*" codec appearing in the codec pattern. |
getCodecPosition | Obtain the corresponding position/order of a given codec as it appears in the media line. The position/order of the codec is stored in the variable as specified in the To operand. If the corresponding payload type of the specified codec is not found, “0” is stored in the variable as specified in the To operand. |
getDigits | Use this operation to use the value in the parameters to populate the SMM variable. This operation only applies to parameters calling party number, called party number, called IN number, location number, redirection number, original called number, redirecting number, connected number of generic number. |
getPayloadType | Obtain the corresponding payload type of a given codec if the payload type exists in the media line. The value of payload type is stored in the variable as specified in the To operand. If the corresponding payload type of the specified codec does not exist in the media line, this action is ignored. |
ignore | Drop a message silently on the inbound leg, and do not send on the outbound leg. |
modify | Modify header value, parameter, and token using configured value or regular expression-based text manipulation, or else modify messageBody content using regular expression based text manipulation only. |
nextRouteActionOnCrankBack | Invoke crankback functionality by assigning this operation to a predefined action value and using the options below to specify the next route action to take. the SMM rule is added so that "nextRouteActionOnCrankBack" is set to a predefined action value.
|
regappend | Insert configured value after the matching sub-string. |
regdel | Delete the matching sub-string. |
regpostdel | Delete the part after the matching sub-string. |
regpostsub | Replace the part after the matching sub-string using configured value. |
regpredel | Delete the part before the matching sub-string. |
regprepend | Insert configured value before the matching sub-string. |
regpresub | Replace the part before the matching sub-string using configured value. |
regstore | Store the matching sub-string to a variable or the regular expression sub-expression matches into a range of variables. |
regsub | Replace the matching sub-string using configured value. |
reject message | Reject a message by the value configured in the response code (applies to request messages only).
|
rename | Rename a header. |
store | Store a parameter, a variable or header value into a variable. |
storeIpTg | Use this operation command to allow the SBC to store a new IP trunk group based on the SIP Message Manipulation (SMM) configuration. |
storeProfileName | Stores the name of a sipParamBasedActionProfile to use in selecting a new ingress trunk group. |
storeSipParam | Extracts a specified value (header, parameter, token) from the incoming SIP message to compare to mapping defined in a sipParamBasedActionProfile in order to select a new ingress trunk group. |
undefined | Default value. |
writeCdr | Write CDR to a field specified in ' |
Parameter | Description |
---|---|
cdrField |
|
header |
|
| value <string> – Enter ISUP parameter value. |
message | |
messageBody | |
parameter |
|
sdpContent | |
token |
|
undefined | |
variable | Use this object to specify variable range, variable scope and variable values:
|
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.
% set profiles signaling sipAdaptorProfile Test6 rule 1 action 1 type message operation teardown message teardown responseCode 488
You can enter the command from both the system-level and configure CLI modes. Parameter Default Description M/O N/A Use this parameter to create a gap between the SMM rules in order to add new rules in the gap without deleting the rules. Note: The largest value allowed for the gap is determined based on the sum of rule count and gap. The SBC generates an error in the .DBG log if the ruleCount + gap is greater than CPX_MAX_SMM_RULES. The SBC generates an error in the .DBG log if the input index value is greater than or equal to Maximum Rule Index of the existing rules (index >= maxRuleIndex). MRequest Profiles
Command Syntax
% request profiles signaling sipAdaptorProfile <profile_name> cmds addGapInRuleList index <0-10000> gap <0-10000>
Command Parameters
addGapInRuleList
Gap
– Represents the number of rule positions to move after the input index. Range: 0-10000. Default = 0Index
– Represents the rule after which the gap is created Range: 0-10000. Default = 0 Configuration Examples
request profiles signaling sipAdaptorProfile SMM_INC cmds addGapInRuleList index 10 gap 5
result success