Modify SIP URI

Answered Question
Apr 19th, 2012

Hi everyone,

We're deploying a CUBE as an SBC to do sip-to-sip to our service provider (CUCM 8.5). I would like any calls that are using internal extensions to use our pilot number for the trunk as any non-valid DID numbers calling out get dropped by the service provider. I'm pretty sure I can do this by having a pattern set up on the CUBE to modify any URI's that aren't valid to the private number, but struggling on building a pattern for it.

Can anyone point to a guide on creating the patterns or give us a pointer?

Here is an example of what I'm trying to do:

55554XXX contain all valid DIDs with 55554000 being our pilot number. If a call goes out as 555511111, I would like the CUBE to modify it to 55550000.

I think something like below would do it, but need some pointers on building the pattern:

request INVITE sip-header From modify "" ""

Hope that makes sense,


I have this problem too.
0 votes
Correct Answer by Paolo Bevilacqua about 2 years 11 months ago

Modyfying (calling) numbers  doesn't require rewiting SIP header.

You would use voice translation-profile and rule for that.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Correct Answer
Paolo Bevilacqua Thu, 04/19/2012 - 16:16

Modyfying (calling) numbers  doesn't require rewiting SIP header.

You would use voice translation-profile and rule for that.

Mark Holmes Thu, 04/19/2012 - 16:19

Hi Paolo,

Apologies if my original description was confusing.

Without modifying the external number mask in CUCM, we would like anyone using an internal only extension trying to call externally to have a 'from' of our pilot number (

Does that make more sense?

Jason Dance Thu, 04/19/2012 - 17:43

Are they mapped to different partitons through separate call search spaces?  If so, why not use Calling party transformations in your route pattern, and have one route pattern for internal only users, and one for your users with DDIs?  You may need to modify your route list that you map to though.

Mark Holmes Thu, 04/19/2012 - 18:02

Hi Jason,

Unfortunately not, they all live in the same partition.


Jason Dance Thu, 04/19/2012 - 18:19

So same css on the line appearance also?

Mark Holmes Thu, 04/19/2012 - 18:23

Yeah extensions that aren't DDIs are in the same CSS as extensions that are DDIs.

Previously on our ISDN the SP was making the non DDI extensions go out as the pilot number.

Craig Dyer Fri, 04/20/2012 - 04:37

Hi Mark,

I would use a pattern like:-

request INVITE sip-header From modify "From:.*

This will overwrite the calling number for any Non-DDI numbers begining with 55551XXXX to 5550000 depending on your service provider you may need to also overwrite the P-Asserted identity in the same way with:-

request INVITE sip-header P-Asserted-Identity modify "P-Asserted-Identity:.*


Hope this helps if you need anything more please ask,



Mark Holmes Wed, 04/25/2012 - 21:36

Hi Paolo,

Thank you, that's a much more elegant way of completing what I wanted! Craig, thank you for your suggestion too.

Using my above example, this is what I ended up with:

voice translation rule 1

rule 1 /^5555[^4]\(.*\)/ /55554000/

voice translation-profile PilotNumber

translate calling 1

dial-peer voice 40 voip

translation-profile outgoing PilotNumber


Login or Register to take actions

This Discussion

Posted April 19, 2012 at 4:08 PM
Replies:8 Overall Rating:5
Views:905 Votes:0
Tags: sip, cube, sip_trunk

Related Content


Discussions Leaderboard

Rank Username Points
Paolo Bevilacqua
Chris Deren
Ayodeji oladipo...
William Bell
Rank Username Points
Terry Cheema
Marcelo Almeida...
Aman Soi
bruno rangel
Aaron Harrison