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

Router SIP Profiles (Number Normalization)

Hello, All!

I am having some difficulties coming up with the appropriate regex for the following scenario. Does anyone have an idea how to better write a translation rule for outbound calls?

Scenario: Extension 75001 dials 123-456-7890.

Call Path: 75001 --> CUCM --(SIP Trunk)-> CUBE ---> SIP Trunk (PSTN)

Requirement: The PSTN requires the full 10-digit telephone number within the SIP header or it will deny the call.

Solution: Modify the SIP header to translate the extension to a full 10-digit number.

Issue: Telephone number is 555-123-5001.  The leading 7 must be stripped and only the last 4 digits must then be prefixed with the NPA-NXX.

Example...

75001 dials 123-456-7890. Call sent to CUCM. CUCM sends calls to CUBE. CUBE translates SIP header from "75001@my.callmanager.home' to "5551235001@my.callmanager.home".

I believe this can be accomplished with SIP diversion header manipulation, but I'm not fully understanding the sytax behind it.

request INVITE sip-header Diversion modify "<sip:(.*)@(.*)>" "<sip:555123???@my.callmanager.home>"

Thanks in advance for your time and help!

1 ACCEPTED SOLUTION

Accepted Solutions
VIP Super Bronze

Router SIP Profiles (Number Normalization)

You dont need a diversion header as this is only used during call forwarding. what you  need is either Remote-Party-ID or P-Asserted-Identity, depending on which your cucm is configured to use...

request INVITE sip-header Remote-Party-ID modify "<555123>" "

my.callmanager.home

>"

Replace the NPA-XXX with the correct number you require

Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

Please rate all useful posts "The essence of christianity is not the enthronement but the obliteration of self --William Barclay"
5 REPLIES
VIP Super Bronze

Router SIP Profiles (Number Normalization)

You dont need a diversion header as this is only used during call forwarding. what you  need is either Remote-Party-ID or P-Asserted-Identity, depending on which your cucm is configured to use...

request INVITE sip-header Remote-Party-ID modify "<555123>" "

my.callmanager.home

>"

Replace the NPA-XXX with the correct number you require

Please rate all useful posts

"opportunity is a haughty goddess who waste no time with those who are unprepared"

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

Router SIP Profiles (Number Normalization)

Hi Raymond,

     I believe what you are looking for is to change the calling number from 75001 to 5551235001 in the "From", the Remote-Party-ID or the P-Asserted dentity. If thats the case then try the following :

request INVITE sip-header From modify "<7>" "<555123>"

Let us know if that works.

Regards,

Jagpreet

New Member

Router SIP Profiles (Number Normalization)

Both of you were extremely helpful. Thanks so much! Back to the documentation for me.

Router SIP Profiles (Number Normalization)

Since you have a CUCM, I'm curious as to why you are not using External Phone Number Masks.  Anything you can share with us?

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.

Anthony Holloway

Please use the star ratings to help drive great content to the top of searches.
New Member

Re: Router SIP Profiles (Number Normalization)

Hi, Anthony!

Sure. I oversimplified the example scenario,but portrayed the same purpose. What I'm doing in reality is running certain existing extensions to a new SIP trunk during a test period. For security reasons, the new carrier only allows outbound calls on DIDs they host. During testing, I have left the external call mask the same and added the test SIP trunk at the top of the route list. If for some reason it were to fail, the call will continue to route out it's production call path using the correct external call mask.

I hope that helps your curiosity. I always appreciate learning new and better ways to do things, so if you have any suggestions or comments fire away. Thanks!

327
Views
5
Helpful
5
Replies
CreatePlease login to create content