7.1 Cisco IOS XE Voice Gateways & Dial Peers

Key Takeaways

  • Cisco IOS XE voice gateways bridge legacy analog (FXS/FXO) and digital (T1/E1 PRI/CAS) circuits to packet-based voice networks using POTS and VoIP dial peers.

  • For SIP calls, inbound dial-peer selection checks URI matches first (incoming uri via, request, to, from), then incoming called-number, answer-address, destination-pattern against the calling number, and carrier-id; POTS calls can also match on the voice port; with no match, dial-peer 0 is used.

  • Dial-peer 0 handles unmatched inbound calls with defaults that often break enterprise calls: any codec, no DTMF relay, VAD enabled, IP precedence 0, no RSVP, fax-rate voice, and, for POTS calls, no direct inward dial.

  • Outbound dial peer selection evaluates destination-pattern and e164-pattern-map using longest prefix match, breaking ties with the lowest preference value (0 to 10) and then, by default, random selection.

  • The huntstop command halts the voice gateway's automated dial peer hunting mechanism, preventing failover to alternate gateways or PSTN trunks upon call failure.

Last updated: October 2026

7.1 Cisco IOS XE Voice Gateways & Dial Peers

Cisco IOS XE voice gateways serve as the critical physical and logical demarcation between Time-Division Multiplexing (TDM) telephony circuits, legacy analog stations, and packet-switched IP telephony infrastructures. Whether deployed on Cisco 4000 Series Integrated Services Routers (ISR 4000) or Catalyst 8000 Edge Platforms, IOS XE voice gateways convert continuous analog electrical waveforms and synchronous TDM bitstreams into discrete, IP-encapsulated Real-time Transport Protocol (RTP) packets governed by Session Initiation Protocol (SIP) signaling.


1. Cisco IOS XE Voice Gateway Physical Interfaces

An IOS XE voice gateway terminates physical voice circuits via specialized High-Density Voice Interface Modules (NIMs) and Network Modules. These physical connections fall into three primary categories:

+-----------------------------------------------------------------------------------------+
|                        CISCO IOS XE VOICE GATEWAY ARCHITECTURE                          |
|                                                                                         |
|  +--------------------+   +--------------------+   +---------------------------------+  |
|  |   FXS INTERFACE    |   |   FXO INTERFACE    |   |    DIGITAL ISDN PRI (T1/E1)     |  |
|  | (Station / Device) |   |   (Telco / CO PBX) |   |    (Channelized Trunking)       |  |
|  +---------+----------+   +---------+----------+   +----------------+----------------+  |
|            |                        |                               |                   |
|       POTS |                   POTS |                          POTS |                   |
|  Dial Peer |              Dial Peer |                     Dial Peer |                   |
|            v                        v                               v                   |
|  +-----------------------------------------------------------------------------------+  |
|  |                             CISCO IOS XE DIAL PLAN ROUTING                        |  |
|  |                          (Inbound & Outbound Dial Peer Match)                     |  |
|  +-------------------------------------+---------------------------------------------+  |
|                                        |                                                |
|                                        | VoIP Dial Peer                                 |
|                                        v                                                |
|  +-----------------------------------------------------------------------------------+  |
|  |                 IP TELEPHONY NETWORK (CUCM / CUBE / Webex Calling)                |  |
|  +-----------------------------------------------------------------------------------+  |
+-----------------------------------------------------------------------------------------+

Analog Interfaces: FXS and FXO

  • Foreign Exchange Station (FXS): An FXS port delivers central-office emulation directly to standard analog end devices, including plain old telephone service (POTS) handsets, conference room saucer pods, analog fax machines, and overhead paging systems. The FXS port delivers battery power (-48V DC idle line voltage), dial tone generation, and ring voltage (~90V AC at 20 Hz).
  • Foreign Exchange Office (FXO): An FXO port acts as an analog telephone station connecting upstream to a central office (CO) switch or legacy Private Branch Exchange (PBX). The FXO port receives battery power and ring voltage from the telco provider and executes off-hook/on-hook signaling.
  • Signaling Modes:
    • Loop Start: The default residential analog signaling mode. The station closes the circuit loop across Tip and Ring conductors, causing DC current to flow. Loop start is susceptible to glare (a race condition where both sides seize the line simultaneously).
    • Ground Start: Common on commercial PBX-to-CO trunks. The gateway grounds the Ring lead to seize the line, and the CO switch grounds the Tip lead in response. Ground start eliminates glare by providing immediate seizure detection on both ends.

Digital Interfaces: T1 and E1

Digital trunking multiplexes voice channels into discrete time slots using Pulse Code Modulation (PCM) sampled at 8,000 samples per second with 8 bits per sample (64 kbps DS0 channels):

  • T1 Architecture (North America & Japan): Operates at 1.544 Mbps aggregate bandwidth, comprising 24 DS0 channels.
    • T1 CAS (Channel Associated Signaling / Robbed-Bit): Signaling bits are "robbed" from every sixth frame (A and B bits in D4 Superframe; A, B, C, and D bits in Extended Superframe [ESF]). Robbed-bit signaling degrades in-band data payload fidelity and lacks advanced ISDN messaging.
    • T1 PRI (Primary Rate Interface): Comprises 23 B-channels (Bearer) carrying voice/data payloads at 64 kbps, and 1 D-channel (Delta) operating on time slot 24 at 64 kbps (23B + 1D). The D-channel runs the Q.931 signaling protocol, enabling sub-second call setup, caller ID name/number delivery, and call progress tracking.
    • Physical Framing & Line Code: Requires Extended Superframe (framing esf) and Bipolar 8-Zero Substitution (linecode b8zs) for clear-channel 64 kbps operation.
  • E1 Architecture (Europe & Rest of World): Operates at 2.048 Mbps aggregate bandwidth, comprising 32 time slots of 64 kbps each.
    • E1 PRI: Comprises 30 B-channels, 1 framing synchronization channel (time slot 0), and 1 D-channel dedicated to Q.931 signaling on time slot 16 (30B + 1D).
    • Framing & Line Code: Requires High-Density Bipolar 3 (linecode hdb3) and Cyclical Redundancy Check 4 (framing crc4).
  • Clocking Synchronization: TDM circuits require strict clock synchronization to prevent clock slips, buffer overruns, and frame drops. Voice gateways must synchronize to the telco network clock using clock source line primary on the active controller.

2. POTS vs. VoIP Dial Peers

A dial peer is a software addressable endpoint and call routing rule in Cisco IOS XE that defines call parameters, routing targets, and media transformations for each individual call leg. Every end-to-end phone call traversing an IOS XE voice gateway consists of at least two discrete call legs: an inbound call leg arriving from the originating network, and an outbound call leg departing toward the destination network.

[ Originator ] ===( Inbound Leg )===> [ IOS XE Voice Gateway ] ===( Outbound Leg )===> [ Destination ]
               Matched by:                                     Matched by:
               Inbound Dial Peer                               Outbound Dial Peer

POTS Dial Peers

POTS dial peers associate dialed telephone numbers with a physical voice interface module (FXS port, FXO port, or T1/E1 ISDN channel group):

  • Required Parameter: port <slot/subslot/port> (e.g., port 0/1/0 for an FXS port, or port 0/2/0:23 for a T1 PRI trunk).
  • Digit Stripping Behavior: By default, POTS dial peers strip all explicitly matched digits in the destination-pattern. For example, if a POTS dial peer has destination-pattern 9[2-9]......, matching digits 95551212 causes the gateway to strip the leading 9 and outdial only 5551212 across the physical port. This can be overridden using the no digit-strip command.

VoIP Dial Peers

VoIP dial peers associate dialed telephone numbers with an IP network address, fully qualified domain name (FQDN), or server group running a voice signaling protocol:

  • Required Parameters:
    • session protocol sipv2 (specifies SIP as the signaling transport).
    • session target ipv4:<ip-address> or session target dns:<fqdn> (or session server-group <tag>).
  • Digit Preservation Behavior: Unlike POTS dial peers, VoIP dial peers preserve all dialed digits by default; they do not strip matched destination-pattern digits when constructing the SIP Request-URI.
Architectural AttributePOTS Dial PeerVoIP Dial Peer
Physical BindingBound to physical port (port 0/1/0)Bound to IP session target (session target)
Signaling ProtocolAnalog loop/ground start, CAS, Q.931 PRISIP (or legacy H.323)
Default Digit HandlingStrips explicitly matched digitsRetains all dialed digits intact
Media EncodingFixed by hardware (PCM G.711 A/u-law)Negotiated dynamically (codec, voice class codec)
DTMF SignalingPhysical analog tones or Q.931 Keypad IEIn-band RTP NTE (RFC 2833), SIP INFO, SIP KPML

3. Inbound Dial Peer Matching Algorithm

When a call arrives at an IOS XE voice gateway, the gateway searches its dial plan to select an inbound dial peer. Selecting the correct inbound dial peer is critical because the inbound dial peer dictates the incoming call leg's voice class codec, DTMF relay method, translation profile, Quality of Service (QoS) markings, and Direct Inward Dialing (DID) behavior.

Cisco IOS XE evaluates incoming call parameters against configured dial peers in a fixed order. The router evaluates each step in sequence; the first matching dial peer wins:

+-----------------------------------------------------------------------------------+
|              INBOUND DIAL PEER MATCHING ORDER (FIRST MATCH WINS)                  |
|                                                                                   |
|  Step 1: SIP URI match (only if dial peers use a voice class uri)                 |
|          incoming uri via -> incoming uri request -> to -> from                   |
|  Step 2: Called number (DNIS)                                                     |
|          incoming called-number / incoming called e164-pattern-map                |
|  Step 3: Calling number (ANI)                                                     |
|          answer-address / incoming calling e164-pattern-map                       |
|  Step 4: Calling number (ANI) against destination-pattern                         |
|  Step 5: carrier-id source (and, for POTS calls, the incoming port)               |
|                                                                                   |
|  No match: system dial-peer 0                                                     |
+-----------------------------------------------------------------------------------+

Step 1: SIP URI matching

If any dial peer uses incoming uri via, incoming uri request, incoming uri to, or incoming uri from with a voice class uri, those matches are checked before any number-based match, in that order. Webex Calling Local Gateways rely on this: the Webex trunk dial peer uses incoming uri request to match the trunk's dtg= parameter.

Step 2: incoming called-number <string>

The gateway compares the incoming Dialed Number Identification Service (DNIS) / called party number against the incoming called-number command on all dial peers. The gateway selects the dial peer with the longest explicit match. This is the most common and recommended method for matching inbound SIP trunks from CUCM or ITSPs.

Step 3: answer-address <string>

If Step 2 yields no match, the gateway compares the calling party number (ANI) against the answer-address command configured on dial peers, selecting the longest match.

Step 4: destination-pattern <string>

If Step 3 yields no match, the gateway matches the calling party number (ANI) against the destination-pattern string of configured dial peers.

Warning

Many collaboration engineers mistakenly assume destination-pattern only matches outgoing called numbers. In Step 4 of inbound matching, the router evaluates destination-pattern against the calling number (ANI), which can inadvertently match an unexpected dial peer if inbound commands are omitted.

Step 5: carrier-id source and voice port

If nothing else matches, the gateway checks carrier-id source; for calls arriving on a voice port (analog or TDM), a POTS dial peer whose port matches the incoming port can also be selected.

No Match: Default Dial-Peer 0

If none of the preceding criteria match, the gateway assigns the call to the internal, unconfigurable dial-peer 0.


4. Dial-Peer 0 Default Attributes and Operational Pitfalls

Dial-peer 0 is hardcoded into the Cisco IOS XE operating system. It cannot be viewed in show running-config, cannot be modified, and cannot be deleted. Falling back to dial-peer 0 frequently results in severe call degradation or failure due to its restrictive default properties:

Parameter / FeatureDial-Peer 0 Default SettingOperational Impact in Enterprise Production
CodecAny supported codecThe leg accepts whatever codec is offered, so it may settle on a codec your design does not allow or that the other leg cannot use, forcing transcoding or failures.
DTMF RelayNone (In-Band Audio Only)DTMF digits sent via RFC 2833 (RTP NTE) or SIP KPML are ignored. Callers cannot navigate CUCM Auto-Attendants or Unity voicemail.
Fax RateVoice (Fax Relay Disabled)T.38 fax transmission fails; faxes drop over compressed links.
Voice Activity DetectionEnabled (VAD on)Comfort noise injection drops background audio, causing perceived silence and audio clipping.
QoS MarkingIP Precedence 0 / DSCP 0Voice packets are marked Best Effort, causing packet drop and jitter when traversing congested WAN routers.
Direct Inward Dialing (POTS)DisabledA PRI or analog call that lands on dial-peer 0 gets secondary dial tone and digit collection instead of routing on the dialed number.
RSVPNot supportedNo RSVP-based admission control on that leg.

Important

To prevent calls from ever matching dial-peer 0, always configure an explicit "catch-all" inbound VoIP dial peer with incoming called-number . containing your enterprise standard codec, DTMF relay (dtmf-relay rtp-nte sip-kpml), and DSCP markings (dscp ef voice).


5. Outbound Dial Peer Matching Algorithm & Hunting

When routing an outbound call leg, the voice gateway compares the dialed destination digits (called party number) against configured outbound dial peers:

  1. Longest Prefix Match: The gateway evaluates destination-pattern and destination e164-pattern-map. The dial peer with the most specific (longest) match against the dialed digit string is selected. For example, if dialed number 4155551212 matches both dial-peer 10 (destination-pattern 415.......) and dial-peer 20 (destination-pattern 415555....), dial-peer 20 is selected because it matches 6 explicit digits versus 3.
  2. Preference Tie-Breaking: If two or more dial peers match the identical number of digits with equal specificity, the gateway evaluates the preference parameter:
    • Values range from 0 to 10, where 0 is the highest priority (most preferred) and 10 is the lowest.
    • If primary dial-peer 100 has preference 1 and secondary dial-peer 200 has preference 2, dial-peer 100 is selected first.
  3. Random Selection: If several matching dial peers have the same specificity and the same preference, the default hunt order (dial-peer hunt 0) chooses among them randomly.

Dial Peer Hunting & huntstop

By default, if an outbound call attempt fails on the chosen dial peer (due to line busy, circuit congestion, or unallocated number), IOS XE initiates dial peer hunting. The gateway reviews its list of candidate matching dial peers and attempts call setup on the next available preference tier.

In scenarios where an administrator wants to terminate hunting immediately upon receiving specific telephony conditions, the huntstop command is applied:

  • Placing huntstop on a dial peer tells the gateway: "If this dial peer is selected and the call cannot be completed, do not attempt any lower-priority dial peers. Terminate call routing immediately and return disconnect status to the caller."

6. Complete Cisco IOS XE Dial Peer Configuration Snippets

The following working configuration demonstrates an enterprise voice gateway connecting an internal CUCM cluster over SIP (VoIP) to a PSTN T1 PRI circuit (POTS):

! --- Global Voice Service Parameters ---
voice service voip
 ip address trusted list
  ipv4 10.1.10.11 255.255.255.255
  ipv4 10.1.10.12 255.255.255.255
 mode border-element
 allow-connections sip to sip
 sip
  bind control source-interface GigabitEthernet0/0/0
  bind media source-interface GigabitEthernet0/0/0
!
! --- T1 PRI Controller Configuration ---
card type t1 0 2
!
isdn switch-type primary-ni
!
controller T1 0/2/0
 framing esf
 linecode b8zs
 clock source line primary
 pri-group timeslots 1-24
!
interface Serial0/2/0:23
 isdn switch-type primary-ni
 isdn incoming-voice voice
!
! --- Explicit Inbound VoIP Dial Peer (From CUCM) ---
dial-peer voice 100 voip
 description == Inbound SIP Trunk from CUCM Cluster ==
 translation-profile incoming CUCM-IN-NORMALIZE
 session protocol sipv2
 incoming called-number [2-9]......
 voice-class codec 1
 dtmf-relay rtp-nte sip-kpml
 no vad
!
! --- Outbound POTS Dial Peer (To PSTN T1 PRI) ---
dial-peer voice 200 pots
 description == Primary Outbound PSTN Route via T1 PRI ==
 destination-pattern 9[2-9]......
 port 0/2/0:23
 forward-digits 7
 preference 1
!
! --- Secondary Outbound Backup VoIP Dial Peer (To Backup CUBE) ---
dial-peer voice 201 voip
 description == Secondary Outbound PSTN Route via Backup CUBE ==
 destination-pattern 9[2-9]......
 session protocol sipv2
 session target ipv4:10.1.20.1
 preference 2
 dtmf-relay rtp-nte
 no vad
!
! --- Outbound VoIP Dial Peer (To CUCM Subscribers) ---
dial-peer voice 300 voip
 description == Outbound Calls to CUCM Phones ==
 destination-pattern [2-9]...$
 session protocol sipv2
 session target ipv4:10.1.10.11
 dtmf-relay rtp-nte sip-kpml
 voice-class codec 1
 no vad

7. Codec Preference Lists, Tenants & Dial-Plan Troubleshooting

Codec Preference Lists (Blueprint 4.1.c)

voice class codec 1
 codec preference 1 opus
 codec preference 2 g711ulaw
 codec preference 3 g729r8
!
dial-peer voice 200 voip
 voice-class codec 1

A dial peer that references voice-class codec offers or accepts the listed codecs in preference order, while a dial peer with a single codec command allows only that codec. If the two call legs on CUBE share no codec, the call needs a DSP transcoder; codec transparent instead passes the endpoints' own codec negotiation through unchanged.

Voice Class Tenants (Blueprint 4.2)

A voice class tenant groups the SIP settings for one trunk, such as registrar, credentials, outbound proxy, bind interfaces, SIP profiles, SRTP crypto, and transport. A dial peer that uses voice-class sip tenant <tag> inherits all of them. When the same setting appears in several places, the dial-peer value wins over the tenant value, and the tenant value wins over the global voice service voip > sip value. Tenants let one CUBE serve trunks with different needs, for example a Webex Calling registration trunk and a carrier trunk, without the settings of one leaking into the other.

Troubleshooting IOS XE Dial Plans (Blueprint 4.2)

QuestionCommand
Which inbound and outbound dial peers did the call match?debug voip ccapi inout
Which outbound dial peer would this number use?show dialplan number 914085551234
Which inbound dial peer matches this SIP URI?show dialplan incall uri sip from sip:5551234
What does this translation rule produce?test voice translation-rule 10 914085551234
Are the dial peers up?show dial-peer voice summary
What did each SIP message and SDP contain?debug ccsip messages
Which codec is each active leg using, and are packets flowing?show call active voice brief

Typical faults: a call lands on dial-peer 0 because no dial peer has a matching incoming called-number or URI; a translation profile is applied in the wrong direction (incoming versus outgoing); a SIP profile is attached as inbound when it should be outbound; or a dial peer points to the wrong tenant.

Loading diagram...
Cisco IOS XE Inbound and Outbound Dial Peer Selection Flowchart
Test Your Knowledge

An inbound SIP call arrives at a Cisco IOS XE gateway on which no dial peer uses an incoming uri command. The INVITE carries called number 5552000 and calling number 4155551000. Which dial peer parameter is evaluated first during inbound dial peer selection?

A

The answer-address parameter matched against the calling number 4155551000.

B

The carrier-id source parameter matched against the source carrier ID.

C

The incoming called-number parameter matched against the called number 5552000.

D

The destination-pattern parameter matched against the calling number 4155551000.

Test Your Knowledge

A network administrator discovers that incoming calls from an external SIP trunk are unexpectedly falling back to default dial-peer 0 on a Cisco IOS XE voice gateway. Which operational symptom will occur on these calls as a direct result of dial-peer 0 default attributes?

A

DTMF relay will be absent so digits travel only in-band, VAD will be enabled, and media will be marked IP precedence 0.

B

Calls will be rejected immediately with SIP 404 Not Found because dial-peer 0 drops all incoming connections.

C

Calls will automatically be tagged with DSCP Expedited Forwarding (EF) and preserve Direct Inward Dialing (DID).

D

Calls will negotiate G.729 compression and successfully transmit RFC 2833 DTMF relay packets.

Test Your Knowledge

An enterprise voice gateway has two outbound dial peers configured for the same destination pattern: dial-peer 10 (preference 1, huntstop enabled) pointing to a primary SIP trunk, and dial-peer 20 (preference 2) pointing to a backup PSTN gateway. What occurs if an outbound call matches dial-peer 10 and the primary SIP trunk returns a busy tone or disconnect signal?

A

The gateway automatically hunts to dial-peer 20 because huntstop only applies when all channels are physically dead.

B

The gateway ignores huntstop unless configured globally under the voice service voip configuration mode.

C

The gateway load-balances the next incoming call to dial-peer 20 using round-robin distribution.

D

The gateway halts dial peer hunting immediately and terminates the call without attempting dial-peer 20.

Sections you finish are checked off in the contents.