02-04-2025 02:43 PM
Solved! Go to Solution.
02-05-2025 02:16 AM
Outtake from this document. Explain Cisco IOS and IOS XE Call Routing
Number String Preference:
Much like URI's have a specific order of operations for evaluating matches, there is also a set of rules used when evaluating a numeric digit-string. The default dial-peer hunt scheme for a Cisco gateway is set to 0. This means the gateway searches for a pattern with the longest match (most specific). If there are two dial-peers with the same match length, the gateway looks at the explicitly defined dial-peer preference. Lastly, if both of those are the same, it chooses one in a random order.
There are other dial-peer hunt schemes available for configuration; however, most deploymens keep the default of 0.
Tip: If dial-peers are being matched outside the default order, an administrtor can examine the running configuration for a non-default dial-peer hunt scheme.
Gateway(config)# dial-peer hunt ? <0-7> Dial-peer hunting choices, listed in hunting order within each choice: 0 - Longest match in phone number, explicit preference, random selection. 1 - Longest match in phone number, explicit preference, least recent use. 2 - Explicit preference, longest match in phone number, random selection. 3 - Explicit preference, longest match in phone number, least recent use. 4 - Least recent use, longest match in phone number, explicit preference. 5 - Least recent use, explicit preference, longest match in phone number. 6 - Random selection. 7 - Least recent use.
The longest match number string dial-peer algorithm finds the dial-peer with the most numbers in a sequence that exactly match a sequence of numbers in a number string. This concept is clarified in the subsequent scenario.
Scenario: Eligible dial-peers have been configured with these possible matches, and the gateway is evaluating a digit-string of 2001. Dial-peer 1 can match any number 2000 through 2999 while dial-peer 2 can match 2000 through 2009. Dial-Peer 2 would be matched for this call as it is the longest match (most specific) for the digit string 2001 when the default dial-peer hunting mechanisms is employed (dial-peer hunt 0). In other words, the sequence of numbers 200 is the largest sequence that exactly matches a sequence of number in the number string 2001.
!
dial-peer voice 1 voip
destination-pattern 2...
!
dial-peer voice 2 voip
destination-pattern 200.
!
Preference is defined as the administrator defined weight for each dial-peer. Administrators can configure a preference so the call always uses a specific dial-peer before others. By default, all dial-peers are preference 0. A dial-peer with preference 0 is matched before another dial-peer with preference 1 through 10. Most administrators setup multiple dial-peers to send a call to a specific CUCM subscriber with a backup subscriber or another call agent being configured using another dial-peer with a lower preference (which is configured with a higher number).
Scenario: Two dial-peers are configured with the same match length for the digit string of 2001. The administrator defines an explicit preference. The gateway evaluates both dial-peers the same since their match length is the same. However, the administrator sets dial-peer 1 with a higher preference so that dial-peer is chosen as the first dial-peer used in routing the call. Dial-Peer 2 would remain as a secondary option can a failure occur on the first dial-peer.
!
dial-peer voice 1 voip
destination-pattern 2...
preference 1
!
dial-peer voice 2 voip
destination-pattern 2...
preference 2
!
A Cisco gateway only attempts to route a call via one eligible outbound dial-peer at a time. If a failure condition is observed on the first selected dial-peer, then the gateway attempts to route the call out the next eligible dial-peer. This continues until the call either succeeds or fails because there are no more eligible dial-peers left to try. A common symptom of dial-peer hunting and failure is a noticeable delay in ringback while making calls. Debugs are usually needed to verify exactly why the call is failing on a given dial-peer. The command huntstop can be employed on a dial-peer if an administrator does not want a gateway to look for another dial-peer when a failure condition is observed.
Scenario: Two dial-peers are configured with the same match length for the digit string of 2001. The administrator has defined an explicit preference and does not want to match dial-peer 2 for this particular call. Since there are two dial-peers with the same match-length, the preference is used to determine the dial-peer. Dial-Peer 1 has the lowest configured preference number, so it is used to route the call. If a failure condition occurs on the outbound call leg using dial-peer 1, then the gateway immediately stops dial-peer hunting since the huntstop command is configured. In this scenario, dial-peer 2 is never utilized for outbound routing.
! dial-peer voice 1 voip destination-pattern 2... preference 1 huntstop ! dial-peer voice 2 voip destination-pattern 2... preference 2 !
02-04-2025 09:51 PM
If you post the output from debug voip ccapi inout put in a text file we can check what’s going on.
02-05-2025 02:16 AM
Outtake from this document. Explain Cisco IOS and IOS XE Call Routing
Number String Preference:
Much like URI's have a specific order of operations for evaluating matches, there is also a set of rules used when evaluating a numeric digit-string. The default dial-peer hunt scheme for a Cisco gateway is set to 0. This means the gateway searches for a pattern with the longest match (most specific). If there are two dial-peers with the same match length, the gateway looks at the explicitly defined dial-peer preference. Lastly, if both of those are the same, it chooses one in a random order.
There are other dial-peer hunt schemes available for configuration; however, most deploymens keep the default of 0.
Tip: If dial-peers are being matched outside the default order, an administrtor can examine the running configuration for a non-default dial-peer hunt scheme.
Gateway(config)# dial-peer hunt ? <0-7> Dial-peer hunting choices, listed in hunting order within each choice: 0 - Longest match in phone number, explicit preference, random selection. 1 - Longest match in phone number, explicit preference, least recent use. 2 - Explicit preference, longest match in phone number, random selection. 3 - Explicit preference, longest match in phone number, least recent use. 4 - Least recent use, longest match in phone number, explicit preference. 5 - Least recent use, explicit preference, longest match in phone number. 6 - Random selection. 7 - Least recent use.
The longest match number string dial-peer algorithm finds the dial-peer with the most numbers in a sequence that exactly match a sequence of numbers in a number string. This concept is clarified in the subsequent scenario.
Scenario: Eligible dial-peers have been configured with these possible matches, and the gateway is evaluating a digit-string of 2001. Dial-peer 1 can match any number 2000 through 2999 while dial-peer 2 can match 2000 through 2009. Dial-Peer 2 would be matched for this call as it is the longest match (most specific) for the digit string 2001 when the default dial-peer hunting mechanisms is employed (dial-peer hunt 0). In other words, the sequence of numbers 200 is the largest sequence that exactly matches a sequence of number in the number string 2001.
!
dial-peer voice 1 voip
destination-pattern 2...
!
dial-peer voice 2 voip
destination-pattern 200.
!
Preference is defined as the administrator defined weight for each dial-peer. Administrators can configure a preference so the call always uses a specific dial-peer before others. By default, all dial-peers are preference 0. A dial-peer with preference 0 is matched before another dial-peer with preference 1 through 10. Most administrators setup multiple dial-peers to send a call to a specific CUCM subscriber with a backup subscriber or another call agent being configured using another dial-peer with a lower preference (which is configured with a higher number).
Scenario: Two dial-peers are configured with the same match length for the digit string of 2001. The administrator defines an explicit preference. The gateway evaluates both dial-peers the same since their match length is the same. However, the administrator sets dial-peer 1 with a higher preference so that dial-peer is chosen as the first dial-peer used in routing the call. Dial-Peer 2 would remain as a secondary option can a failure occur on the first dial-peer.
!
dial-peer voice 1 voip
destination-pattern 2...
preference 1
!
dial-peer voice 2 voip
destination-pattern 2...
preference 2
!
A Cisco gateway only attempts to route a call via one eligible outbound dial-peer at a time. If a failure condition is observed on the first selected dial-peer, then the gateway attempts to route the call out the next eligible dial-peer. This continues until the call either succeeds or fails because there are no more eligible dial-peers left to try. A common symptom of dial-peer hunting and failure is a noticeable delay in ringback while making calls. Debugs are usually needed to verify exactly why the call is failing on a given dial-peer. The command huntstop can be employed on a dial-peer if an administrator does not want a gateway to look for another dial-peer when a failure condition is observed.
Scenario: Two dial-peers are configured with the same match length for the digit string of 2001. The administrator has defined an explicit preference and does not want to match dial-peer 2 for this particular call. Since there are two dial-peers with the same match-length, the preference is used to determine the dial-peer. Dial-Peer 1 has the lowest configured preference number, so it is used to route the call. If a failure condition occurs on the outbound call leg using dial-peer 1, then the gateway immediately stops dial-peer hunting since the huntstop command is configured. In this scenario, dial-peer 2 is never utilized for outbound routing.
! dial-peer voice 1 voip destination-pattern 2... preference 1 huntstop ! dial-peer voice 2 voip destination-pattern 2... preference 2 !
02-05-2025 11:40 AM
Hey Roger,
Thanks for the assistance.
I think the important part from the documentation provided is: " If a failure condition is observed on the first selected dial-peer, then the gateway attempts to route the call out the next eligible dial-peer."
The outbound leg was failing on the more specific pattern and choosing to go to the next eligible dial-peer, which matched on the .T Destination-Pattern.
I'll mark this as solved. It behaved the correct way after I modified my dial-peers. (Got a busy tone, but it was doing what it was supposed to be doing now. The busy tone is due to some other incorrect configuration).
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