All docs

Connecting your SIP carrier

How to wire any major SIP trunk into VICIdial. Common gotchas + a working sip.conf template.

We don't resell SIP — that's by design. You bring whichever carrier gives you the best per-minute rates, jurisdictional coverage, and CLI controls. Here's how to wire any of them up.

Where it goes

VICIdial admin → AdminCarriersAdd Carrier.

Carrier definitions are stored in the vicidial_server_trunks table and rendered into /etc/asterisk/sip-vicidial.conf and extensions-vicidial.conf when you save.

Required fields

Every carrier needs at minimum:

  • Carrier ID — short-name like twilio_us (alphanumeric + underscores)
  • Carrier Name — anything human-readable
  • Server IP — the host on which this carrier is reachable. For a VICIdial single-box install, that's 127.0.0.1.
  • ActiveY once you're ready to use it
  • Carrier Description — visible in dial-plan dropdowns
  • Globals String — sets variables your registration string can reference
  • Registration String — the SIP register => line
  • Account Entry — the [trunkname] block in sip-vicidial.conf
  • Dial Plan Entry — the [trunkname] block in extensions-vicidial.conf

Worked example: Twilio Elastic SIP Trunking

; Globals String
TWUSER=ACxxxxxxxxxxxxxxxxxxxxxxxxxx
TWPASS=your_termination_secret
TWHOST=your-trunk.pstn.twilio.com
; Registration String
register => ${TWUSER}:${TWPASS}@${TWHOST}/${TWUSER}
; Account Entry
[twilio_us]
disallow=all
allow=ulaw
allow=alaw
type=peer
host=${TWHOST}
username=${TWUSER}
secret=${TWPASS}
fromuser=${TWUSER}
fromdomain=${TWHOST}
context=trunkinbound
qualify=yes
insecure=invite,port
nat=force_rport,comedia
canreinvite=no
; Dial Plan Entry
exten => _9XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9XXXXXXXXXX,n,Dial(SIP/${EXTEN:1}@twilio_us,,tTo)
exten => _9XXXXXXXXXX,n,Hangup

Common gotchas

"All circuits busy" on every test

Usually means your carrier's IPs aren't allowlisted in the firewall. Check firewall-cmd --list-all — Asterisk SIP (5060/UDP) needs to allow inbound from your carrier's signalling IPs. Most carriers publish these on their docs page.

Calls connect, but no audio

Typically NAT/RTP. Confirm:

  • nat=force_rport,comedia is set on the carrier definition
  • RTP port range (10000–20000/UDP) is open in the firewall
  • Your VICIdial server has a public IP (not behind a NAT'd LB)

Echo on outbound

Set relaxdtmf=yes and check carrier-side echo cancellation.

Calls fail with 403 Forbidden

Authentication. Most often a typo in the registration string. Tail /var/log/asterisk/messages for the SIP REGISTER attempts and you'll see the exact response.

Multiple carriers / least-cost routing

VICIdial routes outbound based on the campaign's Dial Method + Carrier ID Override. Define each carrier separately, then choose per-campaign which one a list uses.

For least-cost routing across many carriers, look into the dial_handler custom AGI — out of scope for this doc but doable.

Test before you scale

Configure one test campaign with one phone number (yours), one agent, and Auto Dial Level = 1. Confirm the call lands. Then ramp dial level + concurrent agents.