VICIDIAL SIP-TRUNKING TECHNICAL

VICIdial Backup Carrier & Failover Setup

SIPNEX ·

A backup carrier in VICIdial is a second SIP trunk configured under Admin → Carriers, with its own account entry, Dialplan Entry and dial prefix, so campaigns can move traffic when the primary route degrades or the account is shut off. It only helps if it is built and tested before the day you need it.

If your contact rate just fell off a cliff, or your primary trunk went dark mid-shift, the fix below takes one admin screen and a dial prefix change. If both of those are still hypothetical for you, this is the day to build the second trunk.

Why single-carrier dialing fails

Outbound dialing concentrates three risks on whichever carrier carries it. First, suspension: high-volume short-duration traffic trips automated review at many providers, and an account can be paused with little warning — our guide to what to do when a dialer account is suspended covers the recovery playbook, but recovery is measured in days while your floor sits idle.

Second, route quality. If your contact rate sags over weeks with no configuration change on your side, a second carrier lets you test whether the route is the cause, and per-carrier measurement (below) shows the sag early.

Third, plain outages. A trunk that stops responding takes every campaign down unless a second route exists. This page covers building that second route.

Adding a second carrier in VICIdial

Carriers live in the admin under Admin → Carriers, which offers Show Carriers, Add A New Carrier, and Copy A Carrier. For a backup trunk, Copy A Carrier is often the fastest start: clone your working primary, then change the credentials, host, and prefix.

The ADD NEW CARRIER screen asks for a Carrier ID, name, and description, plus the fields that matter operationally: the Registration String (used when the carrier authenticates by username and password), the Account Entry (the trunk’s peer definition), the Dialplan Entry (the dialplan that routes calls out through this carrier), the protocol, and the server IP it applies to. VICIdial’s built-in admin help (the ? link beside each field) defines every one of them.

Two details make a second carrier low-risk to stage. The Dialplan Entry pattern you give the backup should answer to a different dial prefix than your primary — that prefix is the routing switch, covered next. And every carrier record has an Active (Y/N) setting, which the help text describes as deciding whether the carrier is written into the auto-generated Asterisk config. You can build and hold a backup trunk fully configured but inactive, then flip it on the day you need it — no deleting or rebuilding.

Keep the config at this depth here on purpose: the full walkthrough — entries, registration, codecs, and test calls — is our VICIdial SIP trunk setup guide. Whatever you do, complete a test call through the backup before the day you need it. A failover trunk that has never passed a call is a hope, not a backup.

Per-campaign carrier routing with dial prefixes

VICIdial has no “allowed carriers” picker on the campaign screen. Campaign-to-carrier routing is done with dial prefixes matched against carrier dialplan patterns. VICIdial’s help text describes the campaign Dial Prefix as a way to change “a path of dialing to go out through a different method without doing a reload in Asterisk,” with 9 as the default for a 91NXXNXXXXXX dialplan pattern.

That one mechanism gives you everything a routing picker would. Give your primary carrier’s dialplan the 9 pattern and your backup an 8 pattern, and any campaign dials through the backup the moment you change its Dial Prefix from 9 to 8. In both entries, ${EXTEN:1} strips the one-digit prefix before the number goes to the carrier, the same convention VICIdial’s own PJSIP carrier example uses. The peer names primary and backup stand in for your carriers’ account entries:

; primary carrier Dialplan Entry (campaign Dial Prefix 9)
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(SIP/${EXTEN:1}@primary,,tTo)
exten => _91NXXNXXXXXX,n,Hangup()

; backup carrier Dialplan Entry (campaign Dial Prefix 8)
exten => _81NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _81NXXNXXXXXX,n,Dial(SIP/${EXTEN:1}@backup,,tTo)
exten => _81NXXNXXXXXX,n,Hangup()

Campaigns also carry a separate Manual Dial Prefix for agent-placed calls, and individual lists can set a Dial Prefix Override, which the help text says overrides the campaign’s Dial Prefix and Manual Dial Prefix for leads in that list. So routing can differ per campaign, and even per list, without touching the carriers themselves.

This is also the foundation for the second-carrier use case beyond failover: running both trunks live, on different campaigns, at the same time.

Carrier A/B testing by campaign

Because dial statistics in VICIdial are reported per campaign, the clean way to compare carriers is to make the campaign the unit of test: point one campaign (or a cloned copy dialing a split of the same list) at each carrier via its Dial Prefix, run them side by side, and compare.

The Reports page gives you the campaign-level numbers — the Outbound Calling Report for per-campaign dial statistics, and the Outbound Summary Interval Report for the same story over time intervals. With one carrier per campaign, those per-campaign answer numbers become per-carrier answer numbers.

For the system-wide view, the Admin Utilities page (linked from Reports) carries the carrier-facing reports: the Carrier Log Report, Hangup Cause Report, Dial Log Report, and SIP Event Report (the last one needs SIP event logging turned on). Know what the Carrier Log Report is before you lean on it. Per VICIdial’s help text, it shows dial status and SIP error reason breakdowns plus the carrier log records for a selected date, filtered by server — not by carrier. True per-carrier ASR comparison is done by exporting the call data (Admin Utilities also links Export Calls Report Carrier) or by the campaign-split method above.

If the A/B run shows your incumbent losing on connect rate, the decision framework in choosing the best SIP trunk for VICIdial covers what to weigh beyond the answer numbers.

What actually happens when a carrier fails

VICIdial doesn’t ship a failover toggle — failover behavior comes from Asterisk’s dialplan semantics, and it’s worth understanding the two failure modes.

When a carrier actively rejects a call — a SIP 503 Service Unavailable, the classic “we’re not taking this traffic” response — Asterisk’s SIP channel maps it to congestion (Q.850 cause 34). The channel is congested immediately, and the attempt lands in your logs with a congestion dial status rather than being retried down the same trunk. When a carrier simply stops responding, a different mechanism fires: Asterisk schedules a timer when the INVITE is sent, and if no response arrives before it expires, the call is auto-congested. Either way, a dead or rejecting primary shows up as a wall of congestion in the Carrier Log Report — that’s your signal.

Recovery is then a routing decision, in one of two forms. The manual form: keep the backup on its own prefix and change the campaign Dial Prefix when the primary degrades — slower by a few minutes, but explicit. The standing form: let the primary’s Dialplan Entry fall through to the backup automatically.

The standing form needs a guard. When the primary’s Dial fails, the dialplan moves on to the next priority whatever the failure was, so a bare second Dial line also runs after BUSY or NOANSWER. That redials a person who was busy or didn’t pick up, through the second carrier, seconds after the first attempt. Fall through only when the primary could not carry the call at all — a DIALSTATUS of CHANUNAVAIL or CONGESTION:

; primary Dialplan Entry with a guarded fall-through to the backup
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(SIP/${EXTEN:1}@primary,,tTo)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CHANUNAVAIL"]?backup)
exten => _91NXXNXXXXXX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?backup)
exten => _91NXXNXXXXXX,n,Hangup()
exten => _91NXXNXXXXXX,n(backup),Dial(SIP/${EXTEN:1}@backup,,tTo)
exten => _91NXXNXXXXXX,n,Hangup()

Neither form is a named VICIdial feature; both are dialplan-level patterns, which is why the earlier advice stands. Test the fall-through by making the primary fail on purpose (set it inactive, or point it at an unreachable host) and confirm the backup carries the call, before the outage rather than during it.

SIPNEX as the second trunk

Disclosure first: SIPNEX is an FCC-licensed carrier that serves VICIdial operations daily, so we are exactly the kind of vendor this section recommends. The case for us as the backup trunk is the case for us generally — dialer traffic is our core traffic, not a tolerated exception, which matters when the whole point of a backup is that it won’t flinch at the same traffic profile that stressed your primary.

The practical shape: spin up a SIPNEX trunk alongside your existing provider, stage it on its own dial prefix, and pass test calls through it this week. If you A/B it against your incumbent, the billing math is part of the comparison — SIPNEX bills dialer traffic at 12/6 (a 12-second minimum, then 6-second increments), and outbound calls are signed with our own STIR/SHAKEN certificate at A-level attestation. If the incumbent in question is a platform that restricts dialer traffic outright, our survey of SIP providers that allow autodialers maps who actually welcomes it.

Frequently asked questions

Does VICIdial automatically fail over to a backup carrier?

Not via any built-in toggle — failover is a dialplan pattern, not a VICIdial feature. The manual approach is swapping the campaign’s Dial Prefix to the backup’s pattern. The automatic approach is a fall-through in the primary’s Dialplan Entry that jumps to a second Dial line only when DIALSTATUS is CHANUNAVAIL or CONGESTION. An unguarded second Dial line also fires after BUSY or NOANSWER and redials the same person through the backup. Rejected calls (SIP 503) and unresponsive trunks both register as congestion, which is how a failing primary shows up in your logs.

Can each VICIdial campaign use a different backup carrier?

Yes — routing is per campaign, set by the campaign’s Dial Prefix. Each carrier’s Dialplan Entry answers to its own prefix pattern, so campaign A can dial through one carrier while campaign B dials through another, with a separate Manual Dial Prefix for agent-placed calls and a Dial Prefix Override available per list. There is no named carrier-selection dropdown; the prefix is the whole mechanism.

How do I measure whether my backup carrier connects better than my primary?

Run one carrier per campaign and compare the campaigns — that turns the Outbound Calling Report into a carrier comparison. The Carrier Log Report on the Admin Utilities page breaks a day’s attempts down by dial status and SIP reason, filtered by server, but not by carrier — for true per-carrier ASR, export the call data via Export Calls Report Carrier.


Build the second trunk before the morning you need it. Stage a SIPNEX trunk on its own prefix, A/B it against your primary, and request rates against your actual CDRs — (833) 665-2220.

SIPNEX

The carrier built by operators, for operators.

FCC-licensed carrier with its own STIR/SHAKEN SP certificate. Operator-owned. SIP trunks built for operators who dial at volume.