Skip to content

Bulk-Add DIDs

When a carrier ports a block of numbers to you (10, 50, 100+), adding inbound routes one at a time is brutal. Use the Bulk Handler module to import inbound routes from CSV.

Before You Start

  • The DIDs are provisioned on the trunk (carrier confirms).
  • A common destination for the block is decided (e.g. all go to "Main IVR" initially, then you tweak individuals later).

Steps

1. Export the current routes for the CSV format

  1. Go to System Admin → Bulk Handler.
  2. Click the Inbound Routes tab.
  3. Click Export to download a CSV. This shows you the exact column format you need to import.

2. Build the CSV

Open the exported CSV in a spreadsheet. Required columns (FreePBX 15):

extension,cidnum,description,destination,faxexten,faxemail,faxdetect,
mohclass,grppre,delay_answer,pricid,pmmaxretries,pmminlength,pricidnum,
ringing,reversal,rnavsound,videosupport,calleridreplace,calleridprepend,
seclang,callrecording,signal,prependchar,asyncagi,faxoverride,
ari_application,bridgepeer,...

Minimum required for each new DID row: - extension — the DID, e.g. 12075551234. - cidnum — leave blank. - description — friendly label, e.g. Sales Line 5. - destination — the destination string in module,id format, e.g. ivr,1 for IVR id 1, or ext-local,1001,1 for extension 1001. Easiest: create one route manually first, export, copy the destination string.

Leave all other columns blank or matching defaults.

3. Import

  1. System Admin → Bulk Handler → Inbound Routes tab.
  2. Import section → choose your CSV.
  3. Replace existing data?No (additive, won't wipe existing routes).
  4. Click Import.
  5. Click Apply Config.

Verify

Spot-check a few imported DIDs in Trunk Attributes → Inbound Routes. Place a test call to one or two and confirm routing.

Common Issues

  • CSV import errors out. Column header mismatch. Always export first to get the live header row, then add data rows below it.
  • Destinations missing after import. The destination field must reference an ID that exists. If you reference ivr,99 and IVR 99 doesn't exist, the route imports but routes nowhere. Pre-create destinations.
  • DID format inconsistent across carriers. Group by carrier and import in batches per carrier so each batch matches one DID format.
  • Only 50-row import succeeds, rest fail. Some FreePBX versions cap import per request — split into chunks.