cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5197
Views
35
Helpful
21
Replies

Overlapping e164-pattern-map

kely
Level 1
Level 1

Can I have overlapping pattern maps?

What will be the behavior? Closest match?

 

In my scenario I have a large group of TNs. Most of the numbers will point to CUCM. Some need to point directly to a different GW, but are in the same range. Would this setup work?

 

TN Range: 1800-800-0000 through 1800-800-0999.

 

e164-pattern-map 1

e164 18008000...

 

e164-pattern-map 2

e164 18008000268

e164 18008000594

e164 18008000558

e164 18008000944

 

dial-peer 1

destination e164-pattern-map 1

send to CUCM

 

dial-peer 2

destination e164-pattern-map 2

send to GW

1 Accepted Solution

Accepted Solutions

Sorry, I know this is a little dated but I just ran across this. I would not completely rely on the "show dialplan number" for e164-pattern-map routing. Even though it shows both dial-peers (based on pattern-maps) as potential matches, it will route based on the more explicit match between the two maps. I run this in a production environment every day and this works flawlessly. My dialplan does overlap, but it is by design. I want all toll-free numbers routed to CVP unless I want a specific number routed to CUCM. So...

 

voice class e164-pattern-map 1

  e164 800.......

voice class e164-pattern-map 2

  e164 8001234567

!

dial-peer voice 1 voip
  description CVP dial-peer - Outbound
  destination e164-pattern-map 1
  session server-group 1234

dial-peer voice 2 voip
  description CUCM dial-peer - Outbound
  destination e164-pattern-map 2
  session server-group 4567

 

8001234567 will route to dial-peer 2 every time, while 800XXXXXXX will route to dial-peer 1 every time. Test it in a lab and you will find that it definitely does route on the more explicit match if multiple matches are found. I hope this helps.

View solution in original post

21 Replies 21

R0g22
Cisco Employee
Cisco Employee
Can you make this a bit more generic if possible ?

e164-pattern-map 1
e164 18008000...

The preferred one should be longest match but it might cause overlaps.

Sure.
Pattern map 1
..........
Pattern Map 2
.........1

All 10 digit numbers are in pattern map 1 and fall into dial peer 1.
All 10 digit numbers that end with 1 are in pattern map 2.

Will the number 1000000001 go to Dial peer 1 or dial peer 2?

R0g22
Cisco Employee
Cisco Employee
You are still overlapping the dial plan.

Pattern map 1
.........[2-9]
Pattern Map 2
.........1

The above won't be overlapping.

Nipun,

 

I think I oversimplified the example. I can't edit the dial pattern 1 to avoid all of the special numbers and still use a wild cards. I have dozens of non-sequential numbers to avoid.

 

I want the patterns to overlap. This way all calls are handled and route one way by default, but any number specifically called out in dial pattern 2 would be processed by the second pattern.

 

I just want to ensure a number specifically called out in dial pattern 2 would always use that dial pattern and it's dial peer.

R0g22
Cisco Employee
Cisco Employee
Ok. So you want the dial plans to overlap but want calls to specific numbers to route through a specific dial pattern ? So exactly, how do you want the IOS to handle that ?

Pattern map 1 uses wildcards for generic match to many number. Ex: ..........
Pattern map 2 uses more specific list to match special routing cases. Ex: 1800800....
DP 1 matches pattern map 1.
DP 2 matches pattern map 2.
All numbers in pattern map 2 are called and are a closer match than pattern map 1. Will the IOS recognize this and always use DP 2?

Would it make more sense to use a dial pattern .......... For the general route and a pattern map for the special routing?
Dial pattern .......... Normal routing.
Pattern map 1 1800800.... Specific numbers for special routing.

The dial pattern 1 is more specific than the dial pattern ..........

The question boils down to;

If I have two pattern maps that overlap. Will the cisco IOS use the closes match?

R0g22
Cisco Employee
Cisco Employee
There would still be a overlap. Irrespective of the fact what number you dial, you will always match peer with pattern 1. I ran this in my lab to prove the point.

voice class e164-pattern-map 1
e164 ..........

voice class e164-pattern-map 2
e164 1800800....



dial-peer voice 1023819 voip
session target ipv4:1.1.1.1
destination e164-pattern-map 1

dial-peer voice 1023818 voip
session target ipv4:2.2.2.2
destination e164-pattern-map 2



HOST2911#show dialplan number 1234567890
Macro Exp.: 1234567890

VoiceOverIpPeer1023819
peer type = voice, system default peer = FALSE, information type = voice,
description = `',
tag = 1023819, destination-pattern = `',
destination e164-pattern-map tag = 1 status = valid,


HOST2911#show dialplan number 12345678901
Macro Exp.: 12345678901

VoiceOverIpPeer1023819
peer type = voice, system default peer = FALSE, information type = voice,
description = `',
tag = 1023819, destination-pattern = `',

Nipun,

That is unfortunate. Thanks for checking.

R0g22
Cisco Employee
Cisco Employee
I know. IOS is not intelligent unfortunately. Best thing is to not overlap. Send me a PM with the details and we can work out a plan to accommodate what you are trying to achieve.

Nipun,

 

I have been doing some testing on overlapping pattern maps.

I have two pattern maps, using preference in the dial-peers it appears this may still work. Does this sound correct?

I have specific pattern map for special case and general pattern map for general case.

voice class e164-pattern-map 1
  e164 2601111111
  e164 2602222222
 !
!
voice class e164-pattern-map 2
  e164 260.......
 !
!

dial-peer voice 1 voip
 session protocol sipv2
 session server-group 1
 destination e164-pattern-map 1

 preference 0
!

dial-peer voice 2 voip
 preference 1
 session protocol sipv2
 session server-group 2
 destination e164-pattern-map 2
!

 

If I run show dialplan number 2601111111 it still matches on both dial patterns. However, it should always use dial-peer 1 because it is a higher preference correct?

 

Numbers that are in pattern map 2 but not pattern map 1 wouldn't overlap and always use dial peer 2 correct?

R0g22
Cisco Employee
Cisco Employee
Nope. It's still a overlap. Preference is used as a tie breaker by IOS when the destination-pattern across multiple dp's are similar. Your patterns are overlapping but not identical, so preferences won't be used as a tie breaker.

Sorry, I know this is a little dated but I just ran across this. I would not completely rely on the "show dialplan number" for e164-pattern-map routing. Even though it shows both dial-peers (based on pattern-maps) as potential matches, it will route based on the more explicit match between the two maps. I run this in a production environment every day and this works flawlessly. My dialplan does overlap, but it is by design. I want all toll-free numbers routed to CVP unless I want a specific number routed to CUCM. So...

 

voice class e164-pattern-map 1

  e164 800.......

voice class e164-pattern-map 2

  e164 8001234567

!

dial-peer voice 1 voip
  description CVP dial-peer - Outbound
  destination e164-pattern-map 1
  session server-group 1234

dial-peer voice 2 voip
  description CUCM dial-peer - Outbound
  destination e164-pattern-map 2
  session server-group 4567

 

8001234567 will route to dial-peer 2 every time, while 800XXXXXXX will route to dial-peer 1 every time. Test it in a lab and you will find that it definitely does route on the more explicit match if multiple matches are found. I hope this helps.

This is exactly what I was trying to implement. A general pattern map to handle the bulk of my numbers and a specific pattern map that handled specific numbers even though they fell within the general map.

Thanks for your reply.