04-24-2018 12:58 PM - edited 03-17-2019 12:41 PM
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
Solved! Go to Solution.
08-09-2018 08:06 AM
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.
04-24-2018 01:26 PM
04-24-2018 01:34 PM
04-24-2018 02:01 PM
04-25-2018 05:26 AM
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.
04-25-2018 07:07 AM
04-25-2018 07:48 AM
04-25-2018 07:50 AM
The question boils down to;
If I have two pattern maps that overlap. Will the cisco IOS use the closes match?
04-25-2018 08:18 AM
04-26-2018 09:08 AM
04-26-2018 09:41 AM
04-27-2018 08:35 AM
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?
04-27-2018 09:19 AM
08-09-2018 08:06 AM
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.
08-09-2018 08:23 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide