cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
915
Views
5
Helpful
5
Replies

Router SIP Profiles (Number Normalization)

raymond00
Level 1
Level 1

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

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

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

View solution in original post

5 Replies 5

Ayodeji Okanlawon
VIP Alumni
VIP Alumni

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

Jagpreet Singh
Cisco Employee
Cisco Employee

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

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

Anthony Holloway
Cisco Employee
Cisco Employee

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.

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!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: