cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
576
Views
0
Helpful
8
Replies

Translation Pattern in CUBE 2921 series

mohammad saeed
Level 5
Level 5

Hi guys,

I m fresh in VoIP and I found one CUBE connect with SIP and CUCM with this destination pattern:

dial-peer voice 9 voip
description **Outgoing Call to STC SIP Trunk**
destination-pattern 01[123456789].......
rtp payload-type comfort-noise 13
session protocol sipv2
session target ipv4:10.200.7.157
session transport udp
voice-class sip dtmf-relay force rtp-nte
dtmf-relay rtp-nte digit-drop
codec g711alaw
no vad
!

My question is 01[123456789]..... "I didn't find explanation for that way without comma or hyphen! what is it mean those number together [123456789] is it the same if i use it with commas [1,2,3,4,5,6,7,8,9]??

Thanks for all

Mohammad Saeed

1 Accepted Solution

Accepted Solutions

devils_advocate
Level 7
Level 7

As far as I know it means the same as 1 through 9 so the following three mean the same thing:

[1-9]

[123456789]

[1,2,3,4,5,6,7,8,9]

FYI, this is a destination pattern as opposed to a translation pattern.
You are not translating anything, you are matching based on the Called Number.

View solution in original post

8 Replies 8

Chris Deren
Hall of Fame
Hall of Fame

Yes, they are the same, but proper syntax is to use commas between them, though it works either way. You can also summarize it as [1-9].

devils_advocate
Level 7
Level 7

As far as I know it means the same as 1 through 9 so the following three mean the same thing:

[1-9]

[123456789]

[1,2,3,4,5,6,7,8,9]

FYI, this is a destination pattern as opposed to a translation pattern.
You are not translating anything, you are matching based on the Called Number.

devils_advocate,

Comma should be used, see:

http://www.cisco.com/c/en/us/td/docs/ios/12_2/voice/configuration/guide/fvvfax_c/vvfpeers.html

[ ] 

Indicates a range of digits. A consecutive range is indicated with a hyphen (-); for example, [5-7]. A nonconsecutive range is indicated with a comma (,); for example, [5,8]. Hyphens and commas can be used in combination; for example, [5-7,9]. 

Note Only single-digit ranges are supported. For example, [98-102] is invalid. 

My bad.

I edited my post straight after, I was thinking translation pattern initially. 

So if I didn't use commas that means is wrong destination pattern?

It still works, though the proper syntax is to use commas, many folks miss that because it works both ways :-)

Good, but why choose [123456789] instead of [1-9] what is the benefit of that?

Thanks,

No benefit, you would want to change it to [1-9].