Skip to content
Dialer & Setup

ViciDial Dial Prefix and Routing Configuration: Getting Calls to the Right Carrier

ViciDial's dial prefix and routing system controls which calls go to which carrier and in what format. Misconfigure it and you get 404 errors, wrong-country routing, or calls that strip country codes and arrive unroutable at the termination end. This guide covers the full routing stack from ViciDial Admin down to Asterisk dial-plan.

What Dial Prefixes Actually Do

In ViciDial, a dial prefix is a string prepended to the dialed number before Asterisk sends it to the carrier. It is not a routing rule in the traditional sense — it is a number transformation applied before the SIP INVITE goes out.

The confusion arises because "dial prefix" in ViciDial Admin is also bound to a carrier selection. So the prefix field does two jobs simultaneously: format the number and implicitly select the carrier for calls matching that pattern.

Understanding this dual role is essential before touching anything.


Step 1: Decide Your Dialing Format

Different carriers expect different number formats in the SIP Request-URI:

  • 11-digit North American: 1NXXNXXXXXX (e.g., 12125550100) — most common for US/CA SIP trunks
  • E.164 with plus: +12125550100 — preferred by modern SIP carriers; UnlimCall accepts this format
  • 10-digit: NXXNXXXXXX — some older trunks expect this; avoid it for new deployments
  • International with country code: 441234567890 for UK, 4930123456 for Germany

UnlimCall expects E.164 format without the leading plus for outbound calls, or with the plus — the SIP stack normalizes either. Confirm the expected format from your carrier dashboard and set ViciDial's prefix accordingly.


Step 2: Set the Dial Prefix in ViciDial Admin

Navigate to Admin → Dial Plans → Add/Edit Dial Plan:

  • Dial Prefix: Enter the string to prepend. For 11-digit US dialing, enter 1. For calls that are already E.164 in your lead list, enter nothing (blank) or + if your carrier expects the plus sign.
  • Carrier: Select the carrier this plan routes through. This is the explicit carrier selection step.
  • Active: Y
  • Minimum/Maximum Dial Length: Set to enforce digit counts. For NANP numbers post-prefix, minimum 11 and maximum 11 prevents malformed numbers from hitting the carrier.

Assign the dial plan to your campaign under Campaign Detail → Dial Plan.


Step 3: Multi-Country Routing with Multiple Dial Plans

For floors operating across multiple countries, create one dial plan per country or region and assign them to the appropriate campaigns:

CampaignPrefixExpected FormatNotes
US outbound(blank)E.164 in listLead list already includes +1
UK outbound(blank)E.164 in listLead list includes +44
DE outbound(blank)E.164 in listLead list includes +49

If your lead lists store numbers without country codes, you need the prefix to supply the country code:

CampaignPrefixSource FormatResult
US outbound110-digit NANP11-digit
UK outbound4410-digit localE.164 without plus

UnlimCall routes all 33 markets through a single SIP trunk — you do not need separate carrier records per country. One trunk, one authentication, one billing relationship, with routing handled at the network layer. See the full network coverage for the active country list.


Step 4: Asterisk Dial-Plan Context Validation

After ViciDial Admin configuration, verify the dial-plan context in Asterisk handles the formatted number correctly:

  1. Check extensions.conf for the context ViciDial uses for outbound calls (usually [default] or [from-internal]).
  2. The Dial() application should pass the prefixed number to the SIP peer: Dial(SIP/yourpeername/${EXTEN}@yourcarrierhost) or via the PJSIP equivalent.
  3. Test with asterisk -rx "dialplan show <context>" to confirm the extension match pattern catches the number format your prefix produces.

A common mistake: ViciDial adds a prefix of 1, producing 12125550100, but the Asterisk dial-plan has a pattern _NXXNXXXXXX that matches only 10-digit numbers. Result: 404, call fails, nobody knows why. Always verify the dial-plan pattern covers the post-prefix digit count.


Step 5: Handling Number Format Inconsistencies in Lead Lists

Real-world lead lists are messy. Numbers arrive as (212) 555-0100, 212-555-0100, +12125550100, and 12125550100 in the same CSV. ViciDial does minimal normalization by default.

Options:

  1. Pre-clean in your CRM or list management layer — strip all non-digits before import. Recommended.
  2. Use Asterisk's FILTER() function in the dial-plan to strip non-digit characters before dialing.
  3. Use a ViciDial dial_prefix custom field in the campaign combined with a DNCL-safe scrubbing step.

For international campaigns, pre-cleaning is mandatory. A UK number stored as 07911 123456 needs to become 447911123456 before hitting the carrier. The prefix 44 in ViciDial Admin handles the country code, but the leading 0 of the local format needs to be stripped first — ViciDial alone does not do this.


Step 6: Testing Routing Logic Before Production

Run a controlled test sequence:

  1. Create a test campaign with 5 numbers you control (colleagues' mobiles, test DID lines).
  2. Assign the dial plan under test to this campaign.
  3. Place calls and check: (a) do the right numbers ring, (b) does the caller ID appear correctly, (c) does audio work in both directions.
  4. Check the Asterisk full log for the exact SIP Request-URI sent — this confirms what format the carrier actually received.

The Request-URI in the SIP INVITE is the authoritative record of what ViciDial + Asterisk sent. Everything else is inferred.

For configuration details on tying this into a flat-rate pricing model, see the ViciDial integration overview and the pricing page for per-seat costs across all 33 markets.


Takeaways

  • Dial prefix does two jobs: formats the number and selects the carrier routing path.
  • Verify the post-prefix digit format matches the Asterisk dial-plan extension pattern.
  • For multi-country campaigns on a single trunk, one dial plan per country is cleaner than one carrier per country.
  • Pre-clean lead lists before import — ViciDial does not normalize number formats.
  • Read the SIP Request-URI in the Asterisk full log to confirm what format your carrier actually received.

Flat-Rate Routing Across 33 Countries

One SIP trunk, one seat price, 33 markets. See per-country pricing at unlimcall.com/pricing/.