Route Based on "phone-context" Parameter Received in SIP Invite Message
Sample SIP INVITE
Code Block |
---|
|
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 |
SBC Configuration
Create flexible policy rules and apply to SBC:
Code Block |
---|
|
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 |
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
Code Block |
---|
set addressContext defaultAddressContext zone ZONE_IAD flexiblePolicyAdapterProfile FP_PHONE_CONTEXT |
To associate flexible policy rules with the Ingress Trunk Group
Code Block |
---|
set addressContext defaultAddressContext zone ZONE_IAD sipsTrunkGroup IAD_TG signaling flexiblePolicyAdapterProfile FP_PHONE_CONTEXT |
Note |
---|
SBC extracts the value of the phone-context parameter and stores it into var1, which is passed in policy request to PSX. |
PSX Configuration
Create Flexible Variable Rules
Caption |
---|
0 | Figure |
---|
1 | Creating Flexible Variable Rules |
---|
|
|
Assign Flexible Variable Rules to Ingress Trunk Group
Caption |
---|
0 | Figure |
---|
1 | Assign Flexible Variable Rules to Ingress Trunk Group |
---|
|
|
Configuring Flexible Routing by Using Call Processing Element Type and/or Call Parameter Filter Profile
Using Call Processing Element Types to Apply Flex Routing
Modify Element Routing Priority to Use Flex Routing Call Processing Element Type in Standard Route Configuration
Caption |
---|
0 | Figure |
---|
1 | Modify Element Routing Priority |
---|
|
|
Associate Element Routing Priority with Trunk Group to Use Flex Routing Call Processing Element type in Standard Route Configuration
Caption |
---|
0 | Figure |
---|
1 | Associate Element Routing Priority Profile to Trunk Group |
---|
|
|
Create Standard Routes Using Call Processing Element Types to Apply Flex Routing
Caption |
---|
0 | Figure |
---|
1 | Create Standard Routes |
---|
|
|
Caption |
---|
0 | Figure |
---|
1 | Create Standard Routes |
---|
|
|
The two standard routes above result in the following Routing Label selection:
- PHONE_CONTEXT_R1 will be returned if Flex variable V1 is populated with the value "enterprise-1.net"
- PHONE_CONTEXT_R2 will be returned if Flex variable V1 is populated with the value "enterprise-2.net"
Create Standard Routes using Call Parameter Filter Profile to Apply Flexible Routing
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.
Caption |
---|
0 | Figure |
---|
1 | Create Standard Routes using Call Parameter Filter Profile |
---|
|
|
The standard route above results in Routing Label selection:
- PHONE_CONTEXT_R3 is returned, if Flex variable V1 is populated with the value "enterprise-3.net".
Apply Policy Based on the Presence of the AMR or AMR-WB Codec in a SIP Invite SDP
Sample SIP INVITE
Code Block |
---|
|
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 |
SBC Configuration
Create Flexible Policy Rules and Apply to SBC
Code Block |
---|
|
#
# 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:
Code Block |
---|
|
% set addressContext defaultAddressContext zone ZONE_IAD flexiblePolicyAdapterProfile FP_CODEC |
To associate flexible policy rules with the ingress trunk group
Code Block |
---|
% 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.
PSX Configuration
Create Call Parameter Filter Profiles
Caption |
---|
0 | Figure |
---|
1 | Create Call Parameter Filter Profile for AMR Codec |
---|
|
|
Caption |
---|
0 | Figure |
---|
1 | Create Call Parameter Filter Profile for AMR-WB Codec |
---|
|
|
Create Packet Service Profiles
Caption |
---|
0 | Figure |
---|
1 | Create Packet Service Profile for AMR-WB |
---|
|
|
Caption |
---|
0 | Figure |
---|
1 | Create Packet Service Profile for AMR |
---|
|
|
Create Packet Service Profile ID Groups
Caption |
---|
0 | Figure |
---|
1 | Create Packet Service Profile ID Group for AMR-WB |
---|
|
|
Caption |
---|
0 | Figure |
---|
1 | Create Packet Service Profile ID Group for AMR |
---|
|
|
Create Policy Profiles
Packet Service Profile ID Group and/or IP Signaling Profile can be associated to Policy Profile.
Caption |
---|
0 | Figure |
---|
1 | Create Policy Profiles for AMR-WB Codec |
---|
|
|
Caption |
---|
0 | Figure |
---|
1 | Create Policy Profiles AMR Codec |
---|
|
|
Create Policy Profile Group
Caption |
---|
0 | Figure |
---|
1 | Create Policy Profile Group |
---|
|
|
This policy profile group above will result in the following policy profile application:
- SBX133_AMRWB will be applied if Flexible variable V2 is populated with the value "AMR-WB".
- SBX133_AMR will be applied if Flexible variable V2 is populated with the value "AMR".
Apply Policy Profile Group to Trunk Group
For Egress policy apply Policy Profile Group to Egress Trunk Group.
Caption |
---|
0 | Figure |
---|
1 | Apply Policy Profile Group to Egress Trunk Group |
---|
|
|
For Ingress policy apply Policy Profile Group to ingress Trunk Group.
Caption |
---|
0 | Figure |
---|
1 | Apply Policy Profile Group to Ingress Trunk Group |
---|
|
|