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. The SBC supports up to 512 SIP Adaptor Profiles.
Refer to SIP Message Manipulation for additional SMM Details.
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 (see 'rule' syntax below) state <disabled | enabled>
SIP Adaptor Profile Parameters
Parameter | Length/Range | Description |
---|---|---|
| 1-23 | The name of the SIP Adaptor profile. Up to 512 profiles are configurable. |
advancedSMM | N/A | Enable flag to apply advanced SMM logic, such as dialog stateful variables, to INVITE, REGISTER, SUBSCRIBE messaging. For an example SMM rule, see How to Treat Hostpart Based on the Received Format.
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-256 | Use this object to define the SIP Message Manipulation (SMM) rule within the SIP Adaptor Profile. Specify the SSM rule index number, and then configure the parameters as listed in the Rule Parameters section below. |
| 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
Rule Parameters
Parameter | Length/Range | Description |
---|---|---|
| 1-256 | The index number of SMM rule within the SIP Adaptor Profile. |
| 1-128 |
|
| 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:
|
| N/A | This value specifies the matching header. The following are the valid set of values for this field:
|
| 1-20 | Identifies the SIP PDU manipulation Criterion.
(See Rule Criterion Switch Parameters and Rule Criterion Type Parameters tables below for parameter details) |
% 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>
Action Parameters
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.
|
to type | Use this object to configure destination message parameters. (See Type Parameters table below for details)
|
type | Use this field to specify object type to take action against. (See Type Parameters table below for details).
|
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>
Rule Criterion Switch Parameters
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
Rule Criterion Type Parameters
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 codecNames <string, max: 256 chars>[] condition streamInstanceId streamType
SDP Content Parameters
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 operation action.
|
Operation Parameters
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. |
undefined | Default value. |
writeCdr | Write CDR to a field specified in ' |
Type Parameters
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