In this section:
INVITE sip:9886001123;phone-context=enterprise-1.net@10.7.15.143:5060 SIP/2.0 Via: SIP/2.0/UDP 10.7.6.56:5060;branch=z9hG4bK-1-0 From: <sip:+16031234567@10.7.6.56:5060>;tag=1 To: sut <sip:9886001123@10.7.15.143:5060> Call-ID: 1-18533@10.7.6.56 Cseq: 1 INVITE Contact: <sip:6203215002@10.7.6.56:5060> Max-Forwards: 70 Subject: Performance Test P-Charging-Vector: icid-value=3cbeb620-0001-1000-00-0000-10-6b-00-02-20;icid-generated-at=10.10.10.10;orig-ioi=1234;term-ioi=4567 Record-Route: <sip:6203215002@10.7.6.56:5060;lr;x-ep-index=1> Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH Require: timer Supported: timer Min-SE: 90 Session-Expires:90;refresher=uas Content-Type: application/sdp Content-Length: 125 v=0 o=user1 53655765 2353687637 IN IP4 10.7.6.56 s=- c=IN IP4 10.7.6.56 t=0 0 m=audio 22222 RTP/AVP 0 8 18 a=sendrecv
Create flexible policy rules and apply to SBC:
Rule 1 # This rule supports flexible policy to route calls based upon "phone-context" parameter # in Request-URI of incoming INVITE #set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 # criteria 1: Message set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT profileType flexiblePolicy set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 1 type message set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 1 type message message messageTypes request set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 1 type message message methodType invite # criteria 2: header set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 2 type header set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 2 type header header condition exist set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 2 type header header name request-line # configure the parameter criteria set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 3 type parameter set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 3 type parameter set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 3 type parameter parameter condition exist set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 3 type parameter parameter paramType userinfo set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 criterion 3 type parameter parameter name phone-context # action 1 - store policy/routing string into messageScope variable(var1) set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 action 1 type parameter set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 action 1 operation store set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 action 1 paramType userinfo set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 action 1 to type variable variableValue var1 variableScopeValue message set profiles signaling sipAdaptorProfile FP_PHONE_CONTEXT rule 1 action 1 from type parameter value phone-context
set addressContext defaultAddressContext zone ZONE_IAD flexiblePolicyAdapterProfile FP_PHONE_CONTEXT
set addressContext defaultAddressContext zone ZONE_IAD sipsTrunkGroup IAD_TG signaling flexiblePolicyAdapterProfile FP_PHONE_CONTEXT
SBC extracts the value of the phone-context parameter and stores it into var1, which is passed in policy request to PSX.
Modify Element Routing Priority to Use Flex Routing Call Processing Element Type in Standard Route Configuration
Associate Element Routing Priority with Trunk Group to Use Flex Routing Call Processing Element type in Standard Route Configuration
The two standard routes above result in the following Routing Label selection:
In addition to the Call Processing Element types, a Call Parameter Filter Profile may be applied to a Standard Route to match/filter flexible routing criteria.
The standard route above results in Routing Label selection:
INVITE sip:9886001123@10.7.15.143:5060 SIP/2.0 Via: SIP/2.0/UDP 10.7.6.57:5060;branch=z9hG4bK-1-0 From: <sip:+16031234567@10.7.6.57:5060>;tag=1 To: sut <sip:9886001123@10.7.15.143:5060> Call-ID: 1-28012@10.7.6.57 Cseq: 1 INVITE Contact: <sip:6203215002@10.7.6.57:5060> Max-Forwards: 70 Subject: Performance Test P-Charging-Vector: icid-value=3cbeb620-0001-1000-00-0000-10-6b-00-02-20;icid-generated-at=10.10.10.10;orig-ioi=1234;term-ioi=4567 Record-Route: <sip:6203215002@10.7.6.57:5060;lr;x-ep-index=1> Allow: INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH Require: timer Supported: timer Min-SE: 90 Session-Expires:90;refresher=uas Content-Type: application/sdp Content-Length: 154 v=0 o=user1 53655765 2353687637 IN IP4 10.7.6.57 s=- c=IN IP4 10.7.6.57 t=0 0 m=audio 22222 RTP/AVP 0 8 18 99 a=rtpmap:99 AMR-WB/16000 a=sendrecv
# # These rules support flexible policy based upon whether specific codecs (AMR or AMR-WB) # appears in the SDP of incoming INVITE message. # var2: 0, if neither "AMR" nor "AMR-WB" present in SDP. # AMR, if "AMR" present and "AMR-WB" is not present in SDP. # AMR-WB, if "AMR-WB" present in SDP. # # rule 1: initialize variable var2 to "0" set profiles signaling sipAdaptorProfile FP_CODEC profileType flexiblePolicy set profiles signaling sipAdaptorProfile FP_CODEC rule 1 criterion 1 type message message messageTypes request set profiles signaling sipAdaptorProfile FP_CODEC rule 1 criterion 1 type message message methodType invite set profiles signaling sipAdaptorProfile FP_CODEC rule 1 action 1 type variable set profiles signaling sipAdaptorProfile FP_CODEC rule 1 action 1 operation store set profiles signaling sipAdaptorProfile FP_CODEC rule 1 action 1 from type value value "0" set profiles signaling sipAdaptorProfile FP_CODEC rule 1 action 1 to type variable variableValue var2 variableScopeValue message # rule 2: store "AMR" to variable var2 if regex pattern "AMR/" matches in messageBody set profiles signaling sipAdaptorProfile FP_CODEC rule 2 criterion 1 type message message messageTypes request set profiles signaling sipAdaptorProfile FP_CODEC rule 2 criterion 1 type message message methodType invite set profiles signaling sipAdaptorProfile FP_CODEC rule 2 criterion 2 type messageBody messageBody condition regex-match regexp string "AMR/" numMatch match set profiles signaling sipAdaptorProfile FP_CODEC rule 2 action 1 type variable set profiles signaling sipAdaptorProfile FP_CODEC rule 2 action 1 operation store set profiles signaling sipAdaptorProfile FP_CODEC rule 2 action 1 from type value value "AMR" set profiles signaling sipAdaptorProfile FP_CODEC rule 2 action 1 to type variable variableValue var2 variableScopeValue message # rule 3: store "AMR-WB" to variable var2 if regex pattern "AMR-WB/" matches in messageBody set profiles signaling sipAdaptorProfile FP_CODEC rule 3 criterion 1 type message message messageTypes request set profiles signaling sipAdaptorProfile FP_CODEC rule 3 criterion 1 type message message methodType invite set profiles signaling sipAdaptorProfile FP_CODEC rule 3 criterion 2 type messageBody messageBody condition regex-match regexp string "AMR-WB" numMatch match set profiles signaling sipAdaptorProfile FP_CODEC rule 3 action 1 type variable set profiles signaling sipAdaptorProfile FP_CODEC rule 3 action 1 operation store set profiles signaling sipAdaptorProfile FP_CODEC rule 3 action 1 from type value value "AMR-WB" set profiles signaling sipAdaptorProfile FP_CODEC rule 3 action 1 to type variable variableValue var2 variableScopeValue message
Flexible Policy rules can be associated either with the Ingress zone or the Ingress Trunk Group
To associate flexible policy rules with the ingress zone:
% set addressContext defaultAddressContext zone ZONE_IAD flexiblePolicyAdapterProfile FP_CODEC
To associate flexible policy rules with the ingress trunk group
% set addressContext defaultAddressContext zone ZONE_IAD sipsTrunkGroup IAD_TG signaling flexiblePolicyAdapterProfile FP_CODEC
Presence of codec "AMR" or "AMR-WB" is stored in var2, which is passed in the policy request to the PSX.
Packet Service Profile ID Group and/or IP Signaling Profile can be associated to Policy Profile.
This policy profile group above will result in the following policy profile application:
For Egress policy apply Policy Profile Group to Egress Trunk Group.
For Ingress policy apply Policy Profile Group to ingress Trunk Group.