Voice Gateway · PRI

PRI T1/E1 Gateway Config Generator

Generate IOS-XE config for PRI T1 or E1 voice gateway: controller, ISDN switch type, D-channel, framing, and protocol binding (MGCP / H.323 / SIP) to CUCM.

By Faz Karim · 30 yrs Cisco UCLast updated 2026-04-20
What this tool does

Controller to dial-peer in one pass

PRI config spans the physical controller, the D-channel, signaling protocol binding, and dial peers. Miss one line and calls don't go through. This generator emits a full working block for your circuit type and carrier.

Generate PRI config

Inputs

Your PRI gateway config

Set inputs, click Generate PRI config.

How to read your result

Four config blocks

1

Controller

Physical circuit settings.

2

Serial

D-channel interface.

3

Voice

Voice-port + encoding.

4

Dial peers

Route to CUCM.

Deep dive

The four PRI traps

Switch-type mismatch: if your carrier provisioned the circuit as NI (National ISDN) and you configure isdn switch-type primary-5ess, the circuit physically comes up (LED green), Layer 2 (LAPD) comes up, but no calls can complete. You'll see "PRI Layer 3 errors" in show isdn status. Always verify with the carrier: "What's the switch type on our Q.931?"

Clock source: T1/E1 must have exactly ONE clock source in the circuit. The carrier always provides clock from their central office — your router should use clock source line on the controller. Using internal on both ends causes slips, then errors, then the circuit drops. If you have multiple PRIs from the same carrier, only one should be line; the others should be line secondary or follow the primary.

Framing/encoding mismatch: T1 needs ESF framing + B8ZS encoding for modern ISDN. Older circuits might use SF/AMI but ISDN PRI requires ESF. E1 needs CRC4 framing + HDB3 encoding. If these don't match on both ends, you get Layer 1 alarms (yellow alarm, red alarm). The LED on the NIM tells you Layer 1 state; show controller t1 0/2/0 tells you the details.

Protocol binding (SIP/MGCP): the dial peer or voice port needs to know where to send calls. For SIP: dial-peer voice X voip with session target ipv4:<cucm>. For MGCP: mgcp call-agent <cucm> + tie voice-port to MGCP. Don't mix — one protocol per gateway. SIP is preferred in 2026; MGCP requires CUCM manages the gateway state.

FK
Faz Karim30 years Cisco Network · UC · Data Center · LinkedIn
FAQ

Common questions

How do I verify a PRI is up?

show isdn status — you want Layer 1 ACTIVE, Layer 2 MULTIPLE_FRAME_ESTABLISHED, Layer 3 OPERATIONAL.

What about T1 CAS (robbed bit)?

Much older, no D-channel. Use only for very legacy tie lines. Different config — ds0-group instead of pri-group.

Can I run MGCP and SIP on the same gateway?

Per voice port / DS0, yes — but complex. Best to pick one.

How to debug Layer 3 ISDN issues?

debug isdn q931 (verbose). Look at call SETUP → CONNECT flow.

Worked examples

Three PRI setups

US 1×T1 to CUCM via SIP

50 users.

primary-ni, SIP to CUCM, 23 voice channels.
Standard SMB.

EU 2×E1 to legacy PBX via QSIG

PBX tie.

primary-qsig, 30 channels each, trunk group.
QSIG feature parity.

4×T1 TDM to CUCM via MGCP

Call center, all MGCP.

primary-ni, MGCP controls all 4 T1s.
CUCM manages gateway.
Sources verified against current Cisco guidance

Citations

Related tools

You might also need

PRI-to-SIP migration?

Our Upgrade Sprints convert legacy PRI circuits to SIP trunks with parallel run, failback, and documentation.

$25K–$75Kturnkey
Book a 30-min call →Or email info@famoustec.com