Skip to content
CLIRoutes

Integration · Dialer

VICIdial setup for CLIRoutes

VICIdial talks to carriers through the Carriers screen in the admin interface, which writes Asterisk configuration for you on every server you select. This guide adds a CLIRoutes carrier with IP or credential authentication, a dialplan that routes a campaign dial prefix to the trunk, and the campaign settings that decide which caller ID is presented.

Tested on
VICIdial 2.14 · Asterisk 13 / 16 / 18
Channel driver
chan_sip (default) or PJSIP
Auth
IP allow-list or registration
Signalling
sip.example-carrier.net:5060 UDP/TCP · 5061 TLS
Codecs
G.711 a/μ-law, G.729

Before you start

  • Admin access to VICIdial with Modify Carriers permission (user level 9).
  • Your dialer server public IP added to your CLIRoutes endpoint, or SIP credentials from the portal.
  • At least one authorised caller ID approved in the portal under Caller IDs.
  • UDP 5060 and the RTP range (10000–20000 by default) open to the CLIRoutes signalling and media networks.

Placeholders in angle brackets, such as <ACCOUNT_ID>, come from your portal. The host shown is a placeholder; use the one listed under Portal → Network.

Set up VICIdial

  1. 01

    Create the carrier

    In the admin screen go to Admin → Carriers → Add a New Carrier. Use a short Carrier ID without spaces, set Protocol to SIP, choose the server(s) that will place calls and leave Active set to N until the test call passes.

  2. 02

    Fill in the account entry

    The account entry becomes the peer definition. For IP authentication leave the credentials out; for registration add defaultuser, secret and fromuser and fill the Registration String field as shown in the second block.

    Account Entry · IP authentication
    [cliroutes]
    type=peer
    host=sip.example-carrier.net
    port=5060
    disallow=all
    allow=ulaw
    allow=alaw
    allow=g729
    dtmfmode=rfc2833
    insecure=port,invite
    qualify=yes
    nat=force_rport,comedia
    sendrpid=pai
    trustrpid=yes
    context=trunkinbound
  3. 03

    Add registration (credential accounts only)

    Skip this step if your endpoint uses IP authentication. Otherwise paste the registration string with the account ID and SIP password from Portal → Endpoints.

    Registration String
    register => <ACCOUNT_ID>:<SIP_PASSWORD>@sip.example-carrier.net:5060
  4. 04

    Set the globals string

    The globals string creates a variable the dialplan can reference, so you can repoint every campaign at a different trunk by editing one line.

    Globals String
    CLIROUTES = SIP/cliroutes
  5. 05

    Write the dialplan entry

    This entry matches numbers sent with dial prefix 9, strips the prefix, logs the call through the VICIdial AGI and dials the full international number (country code first, no + or 00). The o option keeps the campaign caller ID on the outbound leg.

    Dialplan Entry
    exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
    exten => _9X.,n,Dial(${CLIROUTES}/${EXTEN:1},,tTo)
    exten => _9X.,n,Hangup()
  6. 06

    Point the campaign at the carrier

    Open Campaigns → [your campaign] → Detail. Set Dial Prefix to 9, Campaign CallerID to an authorised number in E.164 without the plus, and check Use Custom CallerID is off unless every list row carries an approved number.

  7. 07

    Activate and test

    Set the carrier to Active = Y and submit; VICIdial rebuilds the configuration within a minute. Place a manual dial to a mobile you control, confirm the caller ID shown on the handset, then check the call appears in Portal → CDRs with the expected destination and duration.

    Asterisk CLI · verify
    asterisk -rx "sip show peer cliroutes"
    asterisk -rx "sip show registry"
    asterisk -rx "sip set debug peer cliroutes"

How VICIdial chooses the caller ID

VICIdial resolves the presented number in this order: the list-level or lead-level custom caller ID (if Use Custom CallerID is enabled), then the campaign CID areacode table, then the campaign caller ID. Whatever wins is sent in the From and P-Asserted-Identity headers. CLIRoutes checks that number against the caller IDs authorised on your account and rejects anything else with 403 Forbidden.

Matching dial level to channels and CPS

Your endpoint has a channel limit and a calls-per-second limit. With an adaptive dial method VICIdial can burst above both when agents become free together. Cap the campaign with Auto Dial Level and Available Only Tally Threshold, and keep the server-level Max VICIDIAL Trunks at or below your channel limit. The channel and CPS sizing guide shows the arithmetic, or use the SIP channel calculator.

Troubleshooting

SymptomLikely causeFix
403 Forbidden on every callServer IP not on the endpoint, or caller ID not authorisedAdd the IP in the portal; check the campaign CID
404 / 484 on some destinationsPrefix not stripped, or number sent in national formatConfirm ${EXTEN:1} and that lists hold full international numbers
One-way audioNAT rewriting or RTP ports closedKeep nat=force_rport,comedia; open RTP to the media range
503 during burstsChannel or CPS limit reachedLower dial level or ask routing to raise limits

For code-by-code meanings, see SIP response codes for dialer operators.

Last verified by the CLIRoutes routing team. Menus can change between releases; if a field has moved, tell us.

FAQ

VICIdial questions

Can’t find what you need? Our routing team answers within the hour, around the clock.

Should I use chan_sip or PJSIP with VICIdial?

Most VICIdial installs still run chan_sip and the carrier screen is built around it. Newer builds on Asterisk 18 support PJSIP; if your server already uses it, follow the Asterisk PJSIP guide for the endpoint and keep the same dialplan pattern.

Can I run several CLIRoutes products from one VICIdial server?

Yes. Create one carrier per endpoint (for example CLI and CC), give each its own globals variable and dial prefix, and pick the prefix per campaign.

Why does the handset show a different number from my campaign caller ID?

Either a list-level custom caller ID overrode it, or the number was not authorised and the call was rejected and retried on another carrier. Check the CDR in the portal, which records the caller ID we received.

Do I need to restart Asterisk after editing the carrier?

No. VICIdial regenerates the configuration and reloads on its own cycle, usually within 60 seconds. You can force it by running a SIP reload from the Asterisk CLI.