Carrier / Trunk Setup

Configure SIP trunks and carriers in Vicidial for outbound and inbound calling

What are Carriers in Vicidial?

In Vicidial, a carrierrepresents a SIP trunk or VoIP provider that connects your Vicidial server to the public telephone network (PSTN). Carriers handle the actual phone calls — routing your outbound calls to real phone numbers and delivering inbound calls to your server.

You need at least one carrier configured for Vicidial to make or receive calls. Multiple carriers can be configured for redundancy (failover), cost optimization, or geographic routing.

Authentication Types

IP Authentication

The provider authorizes your server based on its IP address. No username/password registration needed. Your server's public IP must be whitelisted with the provider.

Best for: Dedicated servers with static IPs

Registration (Credential) Auth

Your server registers with the provider using a username and password (SIP REGISTER). Works from any IP address, making it suitable for dynamic IPs.

Best for: Dynamic IPs or cloud instances

Adding a Carrier: Step-by-Step

Admin → Carriers → Add a New Carrier

Example: IP Authentication Carrier

; Account Entry (goes into sip.conf via Vicidial)
[trunk_provider]
type=friend
host=sip.provider.com
port=5060
insecure=port,invite
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
context=trunkinbound
dtmfmode=rfc2833

Example: Registration-Based Carrier

; Registration String
register => myusername:mypassword@sip.provider.com/DID_NUMBER
 
; Account Entry
[reg_provider]
type=friend
username=myusername
secret=mypassword
host=sip.provider.com
fromdomain=sip.provider.com
fromuser=myusername
canreinvite=no
disallow=all
allow=ulaw
context=trunkinbound

Dial Prefix Setting:

# Format: SIP/trunk_name/

The dial prefix tells Vicidial how to route calls through this carrier. The phone number is appended automatically.

Key Carrier Settings

SettingDescriptionExample
Carrier IDUnique identifier (e.g., TRUNK1, VOIP_MAIN). Max 15 characters.SIPTRUNK1
Carrier NameDescriptive name for the carrier.VoIP Provider - Primary
Registration StringSIP registration details for the trunk. Format depends on auth type.register => user:pass@provider.com
Account EntryThe SIP peer/trunk configuration block for Asterisk sip.conf or pjsip.conf.[trunk_provider]...
Dial PrefixDigits or string prepended when using this carrier (e.g., for routing).SIP/trunk_provider/
DTMF ModeDTMF sending method: rfc2833, inband, info, or auto.rfc2833
ActiveY/N — whether this carrier is currently in use.Y

Multiple Carriers & Failover

Vicidial supports multiple carriers with automatic failover. Configure in the campaign settings:

  • Primary Carrier — Set as the default dial prefix in campaign settings.
  • Failover Carrier — Use Vicidial's dial prefix routing or Asterisk dialplan to route to secondary carrier on failure.
  • Round-Robin — Distribute calls across multiple carriers for load balancing.
  • Cost-Based Routing — Use different carriers based on destination (domestic vs. international, per area code).

Caller ID (CID) Management

  • Campaign CID — Default Caller ID set at the campaign level. All outbound calls show this number.
  • List CID Override — Each list can have its own CID, overriding the campaign CID.
  • CID Group — Rotate through multiple CIDs automatically (for local presence dialing).
  • Per-Lead CID — Set CID per lead via custom field for maximum local presence.
  • STIR/SHAKEN — Ensure your carrier supports STIR/SHAKEN attestation to prevent "Spam Likely" labels.
Compliance: Only use CIDs that you own and are authorized to use. Spoofing Caller ID is illegal in most jurisdictions (US: Truth in Caller ID Act).

Common SIP Providers

ProviderAuth TypeNotes
Twilio Elastic SIPIP + CredentialPopular cloud provider. Easy setup, pay-per-minute.
TelnyxIP + CredentialDeveloper-friendly, good international rates.
VoIP.msRegistrationBudget-friendly, great for small operations. SIP registration.
FlowrouteIP AuthGood US coverage, tech-focused, IP authentication.
Bandwidth.comIP AuthEnterprise-grade, direct CLEC access.
Voxbone (Bandwidth)IP AuthInternational DID coverage, IP authentication.
Bulk SolutionsIP AuthHigh-volume outbound specialist, competitive rates.
QuestBlueRegistration / IPDID and SIP trunking, supports both auth types.

Testing Your Carrier

# Check SIP registration status
asterisk -rx 'sip show registry'
 
# Check trunk peer status
asterisk -rx 'sip show peer trunk_provider'
 
# Test a call through the trunk
asterisk -rx 'channel originate SIP/trunk_provider/12125551234 application Playback tt-weasels'
 
# Enable SIP debugging for troubleshooting
asterisk -rx 'sip set debug on'

Troubleshooting Carrier Issues

Registration fails:Verify credentials, check host/port, ensure no firewall blocking. Review SIP debug output for error code.
Calls fail with 403 Forbidden:IP not whitelisted with provider (IP auth) or incorrect credentials (registration auth). Contact provider.
404 Not Found:Invalid number format. Check dial prefix, ensure correct E.164 format. Some providers require country code.
One-way or no audio:RTP ports blocked. Open UDP 10000-20000. Set canreinvite=no, nat=force_rport,comedia.
Calls drop immediately:Codec mismatch. Set disallow=all, then allow=ulaw (or provider's preferred codec). Check codec support.
Poor call quality:Network congestion. Check bandwidth, run traceroute to provider. Consider G.729 for lower bandwidth.
Back to Vicidial Guide DID Setup Campaign Setup Asterisk Guide