All integrations

Twilio Elastic SIP for VICIdial

Bring your Twilio Elastic SIP trunk to managed VICIdial. Templated PJSIP — three fields, live in 30 seconds.

Twilio is the easiest carrier to start with — five-minute setup at Twilio, then 30 seconds on the dashboard. The platform writes the PJSIP endpoint, regenerates the dialplan, and reloads Asterisk for you. You never edit pjsip.conf by hand.

What you'll need from Twilio

  • An Elastic SIP Trunk created in the Twilio Console
  • The trunk's Termination URI (looks like your-trunk.pstn.twilio.com)
  • Your Account SID + a Termination credential (Console → Elastic SIP Trunking → Authentication)
  • A DID purchased and routed to your trunk's Origination URI

Add the trunk

Dashboard → your server → Manage Trunks+ Add trunk.

Partner:    Twilio
Direction:  Outbound (add another row for Inbound)
Trunk name: twilio-out
Auth mode:  User / password
Host:       your-trunk.pstn.twilio.com
Username:   <account SID>
Password:   <termination credential>

Save. The platform writes the PJSIP endpoint via SSH, regenerates the dialplan, reloads Asterisk, and allocates a 4-digit dialplan prefix (e.g. 9742). Done — you can place a test call within seconds.

What gets written on the box

/etc/asterisk/pjsip.conf:

[twilio-out]
type=endpoint
context=trunkoutbound
disallow=all
allow=ulaw
allow=alaw
outbound_auth=twilio-out-auth
aors=twilio-out-aor
from_domain=your-trunk.pstn.twilio.com

[twilio-out-auth]
type=auth
auth_type=userpass
username=<account SID>
password=<termination credential>

[twilio-out-aor]
type=aor
contact=sip:your-trunk.pstn.twilio.com
qualify_frequency=60

/etc/asterisk/extensions.conf (dialplan_entry on vicidial_carriers):

exten => _9742X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9742X.,n,Dial(PJSIP/${EXTEN:4}@twilio-out,,tor)
exten => _9742X.,n,Hangup

You don't paste any of this. We do.

Link a VICIdial campaign

The dashboard shows the allocated prefix (e.g. 9742) next to the trunk. Two options:

  • Click "Link campaigns" in the dashboard, pick the VICIdial campaign(s), confirm. The platform updates vicidial_campaigns.dial_prefix over SSH.
  • Manual: open vicidial_admin.php → Campaigns → <your campaign> → Dial Prefix, paste the prefix, save.

Same effect either way.

Inbound DIDs

In Twilio Console → SIP Trunking → your trunk → Origination URI:

sip:<your-server-ipv4>;transport=udp

…or use your server's hostname instead of the IP. Then add the DID in Manage Trunks → Inbound DIDs with the routing target (in-group, campaign, extension, or IVR).

Caveats

  • Attestation: Twilio's A-attestation is enterprise-tier; default Elastic SIP gets B/C. If you're doing serious outbound to the US, set up SHAKEN/STIR with Twilio before scale.
  • Per-minute price: Twilio is premium. For high-volume domestic US, Bandwidth or Telnyx cut the bill by 30–50%.
  • IP whitelist: If you'd rather not have credentials in pjsip.conf, switch the trunk to IP-auth mode and whitelist your server's IPv4 in Twilio.