A PRI is a phone line that carries a fixed block of calls over copper, 23 at once in the US, while a SIP trunk carries calls over the internet. An AI voice agent speaks SIP, so a PRI needs a gateway or PBX first. Dograh, our open-source voice agent platform, takes calls either way, self-hosted or on Dograh Cloud.
Key Takeaways
- A US PRI carries 23 calls at once, a SIP trunk scales with bandwidth.
- A PRI reaches an AI agent only through a gateway or PBX.
- Asterisk can keep the PRI and hand chosen calls to Dograh.
This post is part of our guide to SIP trunk providers, where moving off a PRI line gets a short section. Here we cover what each line is, why a PRI call needs converting for an AI agent, how to keep or move the PRI, and when to stay.
What a PRI line and a SIP trunk are
A PRI, short for Primary Rate Interface, is a digital phone line delivered on a T1 circuit in North America or an E1 circuit in most other countries. The Primary Rate Interface standard splits a T1 into 23 channels for calls plus one for signalling, and an E1 into 30 plus one. Each call channel carries one call, so a US PRI holds 23 calls at once, and the 24th caller hears a busy tone until a channel frees up.
A SIP trunk does the same job over an internet connection. Calls travel as data, and capacity depends on bandwidth instead of physical channels. Twilio's sizing rule is 100 kbps per call at peak, so the 23 calls of a PRI need about 2.3 Mbps. Adding more calls means more bandwidth or a higher limit on the account, not a second circuit.
Both carry the same phone-quality voice. A PRI channel is 64 kbit/s audio sampled at 8 kHz, and most SIP trunk calls reach an AI agent as 8 kHz audio too.
SIP trunk vs PRI side by side
Voice quality comes out even, so the differences that matter sit in how calls travel, how capacity grows and what hardware has to stay on site. The table puts those points next to each other, with the route to an AI agent in the last row.
| PRI line | SIP trunk | |
|---|---|---|
| How calls travel | Copper T1 or E1 circuit | Internet connection |
| Calls at once | 23 (T1) or 30 (E1) per line | Set by bandwidth and the account limit |
| Adding capacity | Another circuit | More bandwidth or a higher limit |
| Hardware on site | PBX with a T1/E1 card, or a gateway | None for a cloud agent |
| Audio | 8 kHz phone quality | 8 kHz on most calls |
| Reaching an AI agent | Through a gateway or PBX | Directly over SIP |
The last row decides most AI projects. A SIP trunk can point at an AI platform on day one. A PRI needs one more piece in the middle.
Why a PRI call needs a gateway first
An AI voice agent runs as software in a data centre. It takes calls as SIP or as a media stream over the internet, and a PRI delivers calls as time-division signals over copper. Something on site has to convert one into the other.
That something is either a gateway or a PBX with a T1/E1 card. A gateway is a small box that takes the PRI on one side and sends SIP calls out the other. A PBX such as Asterisk can do the same with a T1/E1 card and Asterisk's DAHDI drivers, which support a range of T1, E1 and J1 cards. If your desk phones already hang off a PBX on the PRI, that PBX may be able to do this job.

The conversion does not change the audio quality the agent hears. A PRI channel is 8 kHz phone audio, and the agent receives 8 kHz phone audio on the other side.
Keeping the PRI with Asterisk and Dograh
If the PRI already ends on an Asterisk PBX, you can keep it. Asterisk takes the PRI, and Dograh takes the call from Asterisk through Asterisk ARI, Asterisk's own interface for handing calls to an outside application. That route works on Asterisk 22 or newer, and on Asterisk 20 LTS once the chan_websocket and res_websocket_client modules are loaded.
The setup runs in a fixed order. Create an ARI user and turn on the HTTP server in Asterisk. Save those details in Dograh, which generates a Stasis app name. Put Stasis(<name>) in the dialplan for the calls the agent should answer, then register the extensions. The rest of the PBX keeps working as before.
Calls can go back the other way. With Transfer Call on ARI, the agent dials a staff extension or number while the caller hears hold music, and connects them once someone answers. If nobody picks up, the agent stays on the line with the caller.
Our guide to open-source IVR software covers Asterisk and FreePBX in more depth, and call centres running VICIdial on Asterisk can see the open-source predictive dialer post.
Open Source Alternative to Vapi / Retell
Self-hosted voice agent platform — no per-minute fees
dograh-hq/dograh
Star on GitHub
Moving the PRI to a SIP trunk
The usual signals to move are a carrier notice that the copper service is ending, a contract up for renewal, or channels that sit idle most of the month while you pay for all 23. Carriers are retiring copper lines, so the notice may come before you plan for it.
Your numbers can come with you. Under the Federal Communications Commission's (FCC) number porting rules, a simple port must be finished within one business day unless you or the new carrier ask for longer. Run the PRI and the new trunk side by side until the port completes, then move calls over a group at a time.
Without a PBX in the way, the new trunk connects straight to Dograh through Dograh Managed SIP, with no Cloudonix account to open. Pick the region closest to the carrier, add the trunk and numbers, and set each number's Inbound workflow to the agent that should answer. If a provider account would fit better than a trunk, our Telephony 101 for voice AI explains the choice.
The carrier bill changes when you move, and the platform bill depends on how you run the agent. Self-hosted Dograh has no per-minute platform fee, but servers, model keys and phone minutes still cost money. Dograh Cloud charges a 1¢-a-minute platform fee.
When a PRI still fits
A PRI is not wrong for every site. It still fits where broadband is unreliable, where breaking a contract early costs more than the savings, or where fax, alarm or other life-safety lines have not yet been tested on IP. A site closing within a year may not be worth moving at all. In those cases, keeping the PRI and adding an AI agent through Asterisk gets the agent live without touching the line.
Join the Dograh Community
Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.
Glossary
- Call channel
- One of the call-carrying channels on a PRI. A T1 PRI has 23 and an E1 has 30, each carrying one 64 kbit/s call, plus one more channel for signalling.
- Gateway
- A box that converts calls from a PRI's time-division signals into SIP calls over the internet, and back. It lets a PRI line reach software, such as an AI agent, that speaks only SIP or media streams.
- DAHDI
- Asterisk's open-source Linux drivers for telephony cards, including T1, E1 and J1 cards. They let an Asterisk server terminate a PRI line directly, without a separate gateway.
- Stasis app
- The Asterisk application that hands a call to an outside program over ARI. In Dograh, saving the ARI connection generates its name, which goes into the dialplan for calls the agent should answer.

