10-10-2013 04:24 AM - edited 03-16-2019 07:49 PM
My scenario is the following:
Region A Sites (east coast offices) ---------------------------------> CUCM --> Centralized CUBE B --> SIP Provier verizon Region A SBC
Cisco offices (direct registration to CUCM, no SRST)
PBX Sites (MGCP integration with CUCM)
Region B Sites (east coast offices) ---------------------------------> CUCM --> Centralized CUBE B --> SIP Provier verizon Region B SBC
Cisco offices (direct registration to CUCM, no SRST)
PBX Sites (MGCP integration with CUCM)
I'm expected to add outbound redundancy where Region A sites can route calls over CUBE B and Region B can route calls over CUBE A
The SIP provider screens caller id to verify that the DID Homed at the SBC its using, the screening is based off
Diversion Header and P-asserted-Identity Header
I've created the a SIP profile on each CUBE to modify the remote-party-ID header and add its content to the p-asserted-identity header, this is to allow the rerouting of calls, second its to also enable CFWD to an external party
Here is a short version of the profile:
voice class sip-profiles 1
request INVITE sip-header Remote-Party-ID modify "Remote-Party-ID:(.*>).*" "P-Asserted-Identity:\1"
request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity: <sip:305.......@10.40.40.10>" "P-Asserted-Identity: <sip:2147750975@10.40.40.10>"
request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity: <sip:248.......@10.40.40.10>" "P-Asserted-Identity: <sip:2147750975@10.40.40.10>"
request INVITE sip-header Diversion modify "Diversion: <sip:.*@.*>" "Diversion: <sip:2147750975@10.40.40.10:5060>"
I'd like to also add the following as the second to last rule in the SIP profile:
request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity: (*>) <sip:\\+.*>"
"P-Asserted-Identity: <sip:2147750975@10.40.40.10>"
I'm not sure if my syntax is wrong, but the above rule never seems to work. I have situations where the remote-party-id header contains a number beginning with a +
i.e Remote-Party-ID: "WIRELESS CALLER" <sip:+12487878187@10.40.40.10>;party=calling;screen=yes;privacy=off
does my syntax too good ?
any feedback is appreciated
Thanks
Solved! Go to Solution.
10-18-2013 03:55 AM
Mando,
You can use this profile to strip off the + or +1
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
or
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
And you can use the same for Remote-Party-ID
request INVITE sip-header Remote-Party-ID modify "<>" "<>">>
NB: You might need to escape the + sign. If the above doesnt work use this..
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
If you want to strip the leading (1) along with the + just modify like this..
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
Please rate all useful posts
"opportunity is a haughty goddess who waste no time with those who are unprepared"
Added profile to strip +1
10-15-2013 07:24 AM
Hi Mando,
Can you please provide the complete INVITE message ? So that we have that as sample to test your profile ?
Once I have the complete INVITE message, will be happy to check the syntax for your profile config.
Regards
Prashanthi Velpula
10-16-2013 03:42 PM
Hello,
The invites are from a CFWD scenario. Cisco phone 956 278 8599 is forwarded to 248 787 8187
a PSTN caller 305 205 2046 is dialing 956 278 8599
CUCM ip address 10.1.40.102 and CUBE is 10.40.40.10
SIP SBC 172.X.X.X
CUCM --> CUBE (this is where i would be applying the sip profile)
*Oct 16 22:28:06.483: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:912487878187@10.40.40.10:5060 SIP/2.0
Via: SIP/2.0/TCP 10.1.40.102:5060;branch=z9hG4bK49189b34dc22a3
From: "WIRELESS CALLER" <>;tag=18095909~aaf222e9-fc5e-4552-95a5-9433ef6cdd7d-47147943>
To: <912487878187>912487878187>
Date: Wed, 16 Oct 2013 22:35:04 GMT
Call-ID: 3224a180-25f11498-1d3df1-6628010a@10.1.40.102
Supported: 100rel,timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM8.6
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Cisco-Guid: 0841261440-0000065536-0001024219-1713897738
Session-Expires: 86400
P-Asserted-Identity: "WIRELESS CALLER" <>>
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
Contact: <>>
Max-Forwards: 67
Content-Type: application/sdp
Content-Length: 214
v=0
o=CiscoSystemsCCM-SIP 18095909 1 IN IP4 10.1.40.102
s=SIP Call
c=IN IP4 10.40.40.10
t=0 0
m=audio 16818 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
CUBE --> SIP Provider
*Oct 16 22:28:06.485: //425194/3224A180000F/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:12487878187@172.30.223.17:5337 SIP/2.0
Via: SIP/2.0/UDP 10.40.40.10:5060;branch=z9hG4bK59097BB8
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
From: "WIRELESS CALLER" <>;tag=24B04D7A-1BC1>
To: <12487878187>12487878187>
Date: Wed, 16 Oct 2013 22:28:06 GMT
Call-ID: 10173568-35E911E3-AF9EA495-29959B78@10.40.40.10
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 0841261440-0000065536-0001024219-1713897738
User-Agent: Cisco-SIPGateway/IOS-15.2.4.M4
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1381962486
Contact: <>>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 66
Session-Expires: 86400
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 242
v=0
o=CiscoSystemsSIP-GW-UserAgent 9917 12 IN IP4 10.40.40.10
s=SIP Call
c=IN IP4 10.40.40.10
t=0 0
m=audio 16818 RTP/AVP 0 101
c=IN IP4 10.40.40.10
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
Thanks
10-16-2013 06:24 PM
Hi Mando,
Thank you for the INVITE sample, below is a result of what you have:
With just the below profile, i am showing the output, please let me know if this is your requirement:
!
voice class sip-profiles 1
request INVITE sip-header Remote-Party-ID modify "Remote-Party-ID:(.*>).*" "P-Asserted-Identity:\1"
BEFORE:
!
P-Asserted-Identity: "WIRELESS CALLER" <>>
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
AFTER:
!
P-Asserted-Identity: "WIRELESS CALLER" <>>
P-Asserted-Identity: "WIRELESS CALLER" <>>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
With just the below profile, i am showing the output, please let me know if this is your requiremen ?
( Modified your existing profile )
voice class sip-profiles 1
request INVITE sip-header P-Asserted-Identity modify "<.>" "<2147750975>"2147750975>
BEFORE:
P-Asserted-Identity: "WIRELESS CALLER" <>>
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
AFTER:
P-Asserted-Identity: "WIRELESS CALLER" <2147750975>2147750975>
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The other profiles, are incorrect, as they are NOT modifying the INVITE message:
!
THERE IS NO CHANGE WITH BELOW PROFILES
voice class sip-profiles 1
request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity: <305.......>" "P-Asserted-Identity: <2147750975>"2147750975>305.......>
request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity: <248.......>" "P-Asserted-Identity: <2147750975>"2147750975>248.......>
request INVITE sip-header Diversion modify "Diversion: <.>" "Diversion: <2147750975>"2147750975>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please let me know what is your requirement ? Based on that I will help you create the sip-profile ? Or is the above AFTER outputs valid and suits your requirement ?
Regards
Prashanthi Velpula
10-17-2013 05:04 PM
is it possible to match any number starting with a + ? that's the issue that i was having, i don't want a vague match like
request INVITE sip-header P-Asserted-Identity modify "<.>" "<2147750975>"2147750975>
i need it to be specific to +1XXXXXXXXXX
basically the following:
voice class sip-profiles 1
request INVITE sip-header Remote-Party-ID modify "Remote-Party-ID:(.*>).*" "P-Asserted-Identity:\1"
request INVITE sip-header P-Asserted-Identity modify "<>" "<2147750975>"2147750975>>
10-18-2013 03:51 AM
Hi Mando,
voice class sip-profiles 1
request INVITE sip-header Remote-Party-ID modify "Remote-Party-ID:(.*>).*" "P-Asserted-Identity:\1"
!
++ The above line is modifying the Remote-Party-ID to P-Asserted-Identity header , and below is the output:
BEFORE:
P-Asserted-Identity: "WIRELESS CALLER" <>>
Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off>
AFTER applying the profile:
P-Asserted-Identity: "WIRELESS CALLER" <>>
P-Asserted-Identity: "WIRELESS CALLER" <>>
Is the above your requirement ?
++ If yes, what is the need to send two P-Asserted-Identity headers to provider ?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Coming to the below profile:
!
request INVITE sip-header P-Asserted-Identity modify "<>" "<2147750975>"2147750975>>
++ This is incorrect syntax
++ If you need to modify P-Asserted-Identity header as below:
- Modify "+13052052046" TO "2147750975", Then below is what you will need:
!
request INVITE sip-header P-Asserted-Identity modify "<.>" "<2147750975>"2147750975>
++ The above profile is picking the "+13052052046" and modifying TO "2147750975"
( Please confirm if this is your requirement ? )
And yes, this is modifying the extension starting with + , it actually also means , anything in that "<.>" WILL BE modified to "<2147750975>"2147750975>
Hope the above is more informative.
Regards
Prashanthi Velpula
10-18-2013 03:55 AM
Mando,
You can use this profile to strip off the + or +1
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
or
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
And you can use the same for Remote-Party-ID
request INVITE sip-header Remote-Party-ID modify "<>" "<>">>
NB: You might need to escape the + sign. If the above doesnt work use this..
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
If you want to strip the leading (1) along with the + just modify like this..
request INVITE sip-header P-Asserted-Identity modify "<>" "<>">>
Please rate all useful posts
"opportunity is a haughty goddess who waste no time with those who are unprepared"
Added profile to strip +1
10-22-2013 09:50 AM
Thanks!
11-04-2013 07:53 AM
I have scratched SIP Profile desgin discussed in this post and came up with this alternative that works much better for me and allows for failover between different sites.
My scenario is the following:
Region A Sites (east coast offices) ---------------------------------> CUCM --> Centralized CUBE A--> SIP Region A SBC
Cisco offices (direct registration to CUCM, no SRST)
PBX Sites (MGCP integration with CUCM)
Region B Sites (east coast offices) ---------------------------------> CUCM --> Centralized CUBE B --> SIP Region B SBC
Cisco offices (direct registration to CUCM, no SRST)
PBX Sites (MGCP integration with CUCM)
Inorder to allow :
Region A sites --> CUBE B --> Region B
i've created the following sip profile on CUBE B:
!
voice class sip-profiles 1
request INVITE sip-header Contact copy "<>" u01 >
request INVITE sip-header Diversion add "Diversion: "
request INVITE sip-header Diversion modify "Diversion: " "Diversion: <>" >
request INVITE sip-header Diversion modify "<>;privacy=off;reason=unconditional;screen=yes" >
request INVITE sip-header Diversion modify "<1..........>;privacy=off;reason=unconditional;screen=yes" 1..........>
request INVITE sip-header Diversion modify "<305.......>;privacy=off;reason=unconditional;screen=yes" 305.......>
request INVITE sip-header Diversion modify "<248.......>;privacy=off;reason=unconditional;screen=yes" 248.......>
request INVITE sip-header Diversion modify "<212.......>;privacy=off;reason=unconditional;screen=yes" 212.......>
request INVITE sip-header Diversion modify "<215.......>;privacy=off;reason=unconditional;screen=yes" 215.......>
request INVITE sip-header Diversion modify "<201.......>;privacy=off;reason=unconditional;screen=yes" 201.......>
request INVITE sip-header Diversion modify "<202.......>;privacy=off;reason=unconditional;screen=yes" 202.......>
request INVITE sip-header Diversion modify "<312.......>;privacy=off;reason=unconditional;screen=yes" 312.......>
request INVITE sip-header Diversion modify "<404.......>;privacy=off;reason=unconditional;screen=yes" 404.......>
request INVITE sip-header Diversion modify "<856.......>;privacy=off;reason=unconditional;screen=yes" 856.......>
request INVITE sip-header Diversion modify "<919.......>;privacy=off;reason=unconditional;screen=yes" 919.......>
request INVITE sip-header Diversion modify "<....>;privacy=off;reason=unconditional;screen=yes"
request INVITE sip-header Diversion modify "<.......>;privacy=off;reason=unconditional;screen=yes"
request INVITE sip-header Diversion modify "<>;privacy=off;reason=unconditional;screen=yes" >
!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide