CUCM · BAT

BAT CSV Generator — Directory Numbers

Bulk-create directory numbers without hand-editing CSV headers. Pick a starting DN, count, partition, CSS, voicemail pilot, and display-name pattern — get a ready-to-import BAT CSV.

By Faz Karim · 30 yrs Cisco UCLast updated 2026-04-20
What this tool does

CSV with the right headers, every time

BAT (Bulk Administration Tool) accepts CSV files to mass-provision directory numbers. Everyone gets the headers wrong at least once because they must match a BAT template exactly. This tool asks for the fields you actually care about — DN range, partition, CSS, mask, forward — and emits the CSV with the header your BAT template expects. Drop in and run.

Configure your line batch

Inputs

Your BAT CSV

Fill in the fields, click Generate CSV.

How to read your result

Header + rows, pipe into BAT

1

Header

Must match a BAT template named "Add Lines". Create once, reuse forever.

2

Rows

One per directory number. 2,000 max per CSV batch.

3

Validate, then commit

BAT → Validate Lines → Fix errors → Insert Lines.

Deep dive

BAT line provisioning — the three guardrails

Bulk provisioning via BAT is the fastest way to add 25+ lines at once, and also the fastest way to pollute a cluster if you skip the three guardrails. First: always run Validate Lines before Insert Lines. Validate checks partition/CSS/voicemail-profile references and rejects the batch if anything's missing, so you catch typos before they land in CUCM. Second: batch at ≤500 lines per CSV. Larger batches take forever to roll back if they go wrong, and BAT's progress indicator becomes unreliable past a few thousand rows. Third: set Calling Party Transform Mask and External Phone Number Mask correctly at creation time — these are the two fields that show up wrong on outbound caller ID after cutover, and fixing 300 lines after the fact is painful.

The External Phone Number Mask is almost always the DID: +1214555XXXX where XXXX is the last 4 of the DN. Using {dn:4} in the tool output tells the generator to substitute the last 4 digits of each DN into the mask. For Calling Party Transform Mask most deployments leave it blank and rely on the CUBE or Route Pattern to set caller ID — but if you're using CUCM-level CLIP/CLIR, set it here.

Voicemail: set Voicemail Profile to the Unity integration profile name (often "Default"). Leaving it blank means DNs have no mailbox, which is fine for common-area phones and bad for users. Forward All / Busy / No Answer destinations typically go to the voicemail pilot, but you may want to leave them blank at creation and let Self-Care Portal users configure them.

FK
Faz Karim30 years Cisco Network · UC · Data Center · LinkedIn
FAQ

Common questions

Does the header name matter?

Yes — it must match the BAT template's expected header or BAT rejects the file. This tool emits the standard 15-column "Add Lines" template header.

Can I update existing DNs with this CSV?

Not with this exact template. Use BAT → Update Lines with the Update Lines template — it has slightly different columns (primary key on DN + partition).

What's the max batch size?

BAT allows up to 2,000 rows per CSV. Break larger imports into multiple CSVs — and plan for a 15-minute DBReplication pause after each batch on big clusters.

Why separate Line and Phone imports?

Because a line can exist without a phone (voicemail pilot, hunt pilot), and one line can appear on multiple phones. Add Lines first, then Add Phones referencing them.

Worked examples

Three realistic batches

25 new sales hires — DAL site

DN 2001–2025, partition PT_DAL_Internal, CSS CSS_DAL_LD, mask +1214555{dn:4}

1 CSV, 25 rows, imports in ~30 seconds.
Everyday use case. 10 min to generate and import, vs. 2 hours by hand.

Common-area phones — hospital

DN 5100–5199, partition PT_HOSP_CommonArea, CSS CSS_HOSP_Restricted, no voicemail

1 CSV, 100 rows. No mailbox → no storage cost, no orphan VMs.
Common-area pattern. Keep Voicemail Profile blank.

Hunt group members

Members 3001–3008 going into LG_Sales_DAL

CSV with just the DNs. Add to Line Group separately via Hunt Group Designer.
Line creation precedes Line Group. Run these in order.
Sources verified against current Cisco guidance

Citations

Related tools

You might also need

Large rollout or M&A cutover?

The UC Modernization Sprint handles end-to-end BAT provisioning for 500–5,000 user cutovers. Fixed-fee, fixed-timeline.

$25K–$75Kdepending on size · turnkey
Book a 30-min call →Or email info@famoustec.com