VICIfast
ENES
Guides & tutorials

Why searching a lead by phone number freezes VICIdial, and the missing index

A lead search by phone number can freeze VICIdial's dialers for seconds. Why the call log has no phone index, where these lookups come from, and how to add one.

VICIfast Support
··3 min read
Why searching a lead by phone number freezes VICIdial, and the missing index

A customer calls back. Your agent types the number into the lead search, and for a few seconds nothing on the floor moves: not their screen, not anyone else's, not the dialers.

That isn't your server being too small. VICIdial's call log has no index on the phone number, so finding one number means reading the whole log, and the log is locked while it's read.

An index is the back of the book

An index is a sorted list the database keeps next to a table, so it can jump straight to the rows it wants. Think of the index at the back of a reference book. Without one, the only way to find every call to one number is to read every row and check it.

The phone number column in VICIdial's call logs, vicidial_log for outbound calls and vicidial_closer_log for inbound, isn't indexed out of the box. On a new system you won't feel it. On a floor whose log has grown into the millions of rows, every phone search reads all of them.

Why one search freezes the dialers

The call log is a MyISAM table, and MyISAM locks the whole table while a read runs. A search that reads all of it holds that lock for as long as the read takes.

The dialers keep writing in the meantime. New calls, answers and every Disposition (the status an agent picks at the end of a call) all land in that log, and each write now waits its turn. Status saves wait, calls waiting for an agent wait, and from the floor it looks like the dialer froze.

On one floor we measured, phone searches meant dialer freezes of 4 to 12 seconds. Long enough for agents to notice, and long enough for answered calls to sit waiting while the drop timer runs.

flowchart TD
  A[Someone searches by phone] --> B[Database + web server]
  B --> C{Phone number indexed?}
  C -- No --> D[Read the whole call log]
  D --> E[Call log locked]
  E --> F[Dialer writes queue]
  F --> G[Dialers freeze for seconds]
  C -- Yes --> H[Jump to matching rows]
  H --> I[Answer almost at once]

Where phone lookups come from

The lead search box on the agent screen isn't the only source. Phone lookups reach the database from several places:

  • Managers using Search For a Lead in the LISTS section, which looks up a Lead by phone number or by Alternate phone number, the lead's second number. How to search for a lead shows that screen.
  • Agents, when Agent Lead Search is switched on, searching while paused or during an inbound call.
  • Outside software using the Non-agent API, VICIdial's interface for other systems. Its phone_number_log function lists the calls placed to one or more numbers, so a CRM that runs it on every call adds a phone search to every call.

Any of these that has to find a number in the call log pays the full price. The more of them you have, the more often your floor stalls.

Adding the missing index

The fix is one index on the phone number in each call log table. Whoever looks after your database can add it. It changes no VICIdial setting and no screen; searches simply stop reading the whole log.

Never build the index mid-shift. On a log with millions of rows it takes a while, and the floor waits on that table until it's done.

Keep the log tables archived as well. A smaller log makes every read faster, indexed or not.

Every cluster we build gets that index. If you're still working out whether you need a cluster at all, read how VICIdial clusters work and when you need one. A floor that still fits on one machine can add the same index, and most floors do start on one: see our single-server plans.

When you're planning separate machines, get a cluster sized for your floor.

Frequently asked

› Does this affect inbound floors too?
Yes. Inbound calls are logged in vicidial_closer_log, and its phone number column has no index by default either.
› Will a faster database server fix it?
Not really. Without the index the search still reads every row, and the lock lasts as long as the read. The index takes the long read away.

About VICIfast

We run VICIdial servers for call centres, so you don’t have to. You get the dialer set up, secured and kept running — we handle the server, the updates and the backups. Bring your own phone carrier at no markup, or use VICIfast Voice, our own US calling and numbers, from $0.0085 a minute. From $49 a month per server.

Questions? Call +1 636 556 0022 and talk to someone who runs dialers.

Citing this article

VICIfast Engineering. “Why searching a lead by phone number freezes VICIdial, and the missing index”. VICIfast LLC, November 22, 2026. Retrieved from https://vicifast.com/blog/vicidial-lead-search-phone-index

Have questions?

Related posts

You might be interested in

Comments

Comments are reviewed before they appear. We never publish your email.

No comments yet - be the first.