How a Cisco CUBE chooses a dial-peer
Most "the call fails on the gateway" problems come down to which dial-peer matched. A CUBE matches one inbound and one outbound dial-peer for every call, and each match follows a fixed order.
Inbound: first match in this order
For a SIP call arriving at the CUBE, Cisco IOS-XE checks these in order of preference and stops at the first type that matches:
incoming uri viaincoming uri requestincoming uri toincoming uri fromincoming called-numberanswer-address, compared with the calling numberdestination-pattern, compared with the calling numbercarrier-id source
Within one type, the longest and most specific match wins. Anything narrower than the type, such as a VRF or tenant binding, filters the candidates first.
When nothing matches: dial-peer 0
If no inbound dial-peer matches, the CUBE uses its built-in default, dial-peer 0. That peer has none of your settings: no SIP profile, no chosen codec list, no DTMF method you configured. The call may still connect and then fail in a way that looks unrelated, such as no audio in one direction or digits that are not recognized. Seeing "0" as the inbound peer is a finding in itself.
Outbound: a different order
For the outgoing leg the order of preference is:
- A dial-peer group attached to the inbound peer
- A provision policy URI
- An ILS route string
destination uritogether withcarrier-id targetdestination-patterntogether withcarrier-id targetdestination uridestination-patterncarrier-id target
Several outbound peers can match. The CUBE orders them by longest match, then by preference, and tries the next one when a peer fails. That hunt is why a failed call can show more than one outbound attempt.
See the match
show dialplan number <digits>predicts the outbound match for a number.debug voip dialpeershows the inbound and outbound peers chosen for a live call.show dial-peer voice summarylists peers with their state. A peer that is down is skipped.
Check the inbound peer first. A wrong inbound match changes everything that follows.
Where Workbench helps
Dial-Peer Lens reads debug voip dialpeer output and shows one card per call: the inbound peer, each outbound peer tried, and why. CCAPI Flow adds the timeline from the call-control debug.