VICIdial can't make or receive calls until it is connected to a VoIP carrier through a SIP trunk. In VICIdial, trunks are set up as carriers under the Admin menu. Each carrier entry contains the SIP connection details and a small piece of dialplan that sends calls to it.
What you need from your carrier
- The carrier's SIP server address (hostname or IP) and port.
- Authentication method: IP authentication (the carrier trusts your server's IP) or registration (username and password).
- Required number format, for example country code plus number, and any technical prefix.
- Supported codecs, usually G.711 ulaw/alaw, sometimes G.729.
- Your concurrent call limit and your DIDs for inbound calls.
IP authentication is generally more secure and reliable for servers with a static IP. Ask the carrier to whitelist your server's public IP.
Step 1: Create the carrier
Go to Admin → Carriers → Add a new carrier. Give it an ID and name, choose your server, and set the protocol to SIP.
Registration string
Only needed if the carrier uses registration. It holds the username, password and server so Asterisk can register to receive inbound calls. Leave it empty for IP authentication.
Account entry
This defines the SIP peer: the carrier's host, the context incoming calls should land in, allowed codecs, NAT handling, and credentials if required. Typical settings include type=peer, host= the carrier address, context=trunkinbound, disallow=all followed by allow=ulaw, and dtmfmode=rfc2833.
Dialplan entry
This tells Asterisk which dialed numbers go to this carrier. A common pattern matches a dial prefix (for example 9) followed by the number, strips the prefix, and sends the call to the carrier peer. The campaign's dial prefix must match what the dialplan expects, or calls will fail immediately.
Step 2: Set the campaign dial prefix
In the campaign, set the dial prefix to the one your carrier's dialplan entry uses. If you have several carriers, give each a different prefix and choose the carrier per campaign by its prefix.
Step 3: Inbound DIDs
Inbound calls from the carrier arrive in the context you set (usually trunkinbound). Create a DID record for each number so VICIdial knows where to route it. See setting up inbound groups.
Step 4: Test
- Open the Asterisk CLI and confirm the peer is reachable (and registered, if using registration).
- Make a manual call from an agent screen to your own mobile.
- Check both directions of audio. If one side is silent, see fixing one-way audio.
- Call one of your DIDs and confirm it reaches the right queue.
- Check the carrier log in VICIdial for hangup causes on failed calls.
Troubleshooting
- 403 Forbidden: IP not whitelisted or wrong credentials.
- 404 Not Found: number format is wrong; check country code and prefix.
- 503 Service Unavailable: carrier capacity or routing problem, or your concurrent call limit is reached.
- Calls fail instantly with no SIP traffic: the dialplan entry doesn't match the dial prefix.
Our guide to SIP response codes explains these in more detail.
Security reminder
Before going live, set a spending limit with the carrier, block international destinations you don't need, and restrict SIP traffic to the carrier's IPs. See securing VICIdial against toll fraud.
Need help with VICIdial, Asterisk or AI voice agents?
SmartAiCalls sets up, secures and supports calling systems for call centers and growing businesses. Talk to us or request a free demo.
Related guide: VICIdial Pricing 2027: Hosting, Server, VoIP and AI Costs