By default, the SBC selects the ingress trunk group for an incoming SIP request based on its source IP address and port. Using SMM, you can extract a value from the incoming message and use the value to select a new ingress trunk group. This secondary trunk group selection enables applying trunk group policies and profiles on a more granular basis in subsequent processing of the session.
A SIP Param Based Action profile maps values that might be extracted from incoming messages, using the SMM storeSipParam
operation, to specific SIP trunk group names. If the extracted storeSipParam
value matches an entry configured in a SIP Param Based Action profile specified with the SMM storeProfileName
operation, the SBC selects the trunk group specified by the matching entry as the new ingress trunk group.
The following commands create an SMM rule in a profile called "selectTG" that performs two actions on INVITE requests. The first action uses the operation storeSipParam
to extract the username from the incoming Request-URI and stores into "var1." The second action uses the operation storeProfileName
to store "PROFILE" as the name of a sipParamBasedActionProfile
in "var2."
% set profiles signaling sipAdaptorProfile selectTG state enabled % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 1 type message % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 1 message % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 1 message messageTypes all % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 1 message methodTypes invite % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 1 message condition exist % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 2 type header % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 2 header % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 2 header name Request-Line % set profiles signaling sipAdaptorProfile selectTG rule 1 criterion 2 header condition exist % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 type header % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 operation storeSipParam % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 from % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 from type header % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 from value Request-Line % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 headerInfo headerValue % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 to % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 to type variable % set profiles signaling sipAdaptorProfile selectTG rule 1 action 1 to variableValue var1 % set profiles signaling sipAdaptorProfile selectTG rule 1 action 2 type variable % set profiles signaling sipAdaptorProfile selectTG rule 1 action 2 operation storeProfileName % set profiles signaling sipAdaptorProfile selectTG rule 1 action 2 from type value value PROFILE % set profiles signaling sipAdaptorProfile selectTG rule 1 action 2 to type variable variableValue var2 % commit
The following commands create a sipParamBasedActionProfile
named "PROFILE" that defines three entries to compare against the parameter extracted with the operation storeSipParam
. The first entry uses full matching and specifies that if the extracted parameter is "username1," "username2," or "username3," then the new ingress trunk group is "TG1." The second entry uses regular expression matching and specifies that if the extracted parameter matches the regular expression "02*" then the new ingress trunk group is "TG2." The third entry uses range matching and if the extracted parameter is within the range 8000000000 and 9999999999, then the new ingress trunk group is "TG3."
% set profiles signaling sipParamBasedActionProfile PROFILE action selectTG % set profiles signaling sipParamBasedActionProfile PROFILE % set profiles signaling sipParamBasedActionProfile PROFILE entry 1 trunkGroupName TG1 matchType full param username1 % set profiles signaling sipParamBasedActionProfile PROFILE entry 1 param username2 % set profiles signaling sipParamBasedActionProfile PROFILE entry 1 param username3 % set profiles signaling sipParamBasedActionProfile PROFILE entry 2 trunkGroupName TG2 matchType regexp paramRegexp 02* % set profiles signaling sipParamBasedActionProfile PROFILE entry 3 trunkGroupName TG3 matchType range rangeStart 8000000000 rangeEnd 9999999999 % commit