Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

SIP Profile syntax question

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

Everyone's tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions
VIP Super Bronze

Re: SIP Profile syntax question

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

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
8 REPLIES
Cisco Employee

SIP Profile syntax question

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

New Member

SIP Profile syntax question

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>

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>

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

Cisco Employee

SIP Profile syntax question

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>"

BEFORE:

P-Asserted-Identity: "WIRELESS CALLER" <>

Remote-Party-ID: "WIRELESS CALLER" <>;party=calling;screen=yes;privacy=off

AFTER:

P-Asserted-Identity: "WIRELESS CALLER" <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>"

request INVITE sip-header  P-Asserted-Identity modify "P-Asserted-Identity:  <248.......>" "P-Asserted-Identity:  <2147750975>"

request INVITE sip-header Diversion modify "Diversion: <.>" "Diversion: <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

New Member

SIP Profile syntax question

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>"

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>"

Cisco Employee

SIP Profile syntax question

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>"

++ 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>"

++ 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>"

Hope the above is more informative.

Regards

Prashanthi Velpula

VIP Super Bronze

Re: SIP Profile syntax question

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

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
New Member

SIP Profile syntax question

Thanks!

New Member

Re: SIP Profile syntax question

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"

request INVITE sip-header Diversion modify "<305.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<248.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<212.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<215.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<201.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<202.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<312.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<404.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<856.......>;privacy=off;reason=unconditional;screen=yes"

request INVITE sip-header Diversion modify "<919.......>;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"

request INVITE sip-header Diversion modify "<>;privacy=off;reason=unconditional;screen=yes"

!

1280
Views
0
Helpful
8
Replies
CreatePlease login to create content