Two connections do almost all the work: live events for the "who is calling" popup and the call log for history. What you need from the phone system, what to avoid, and why the number is the key.
You need two connections, not one. Live events from the phone system, so you know someone is calling right now — that is where the popup with customer context comes from. And the call log, so you have history and recordings afterwards. The key that links a call to a customer is the phone number, reduced to a single form.
The log is a table of finished calls — who called whom, when, how long, where the recording is. It is accurate but late: the row appears after the call. For history and analysis it is enough. For a "who is calling" popup it is useless.
Live events are the stream the phone system emits the moment a handset rings. That is how you know the number before anyone picks up. In exchange, the stream keeps nothing — if you were not listening, the event is gone.
So the two go together: events give you the moment, the log gives you the trace.
The same phone gets stored three ways: with a leading zero, with a country code, with a plus. Match exactly and you find nothing.
The practical fix is to compare by the last nine digits. That covers every variant of a national number without a rulebook. The same normalisation has to apply when customers are entered, or the database fills with duplicates.
Its value is not the number but the context. A number on its own does not help — the salesperson still has to go looking. A useful popup carries the name, the order count, open service cases and a link to the full lookup. All of that is assembled while the phone is still ringing.
Two practical details you only learn during rollout. First, the lookup is cached by number — otherwise every poll hits the store and ticket databases. Second, the notice has to arrive when the tab is in the background; a browser notification handles that, while an in-page toast covers the case where the person is looking at the system.
Do not give the integration permission to dial and change things. The popup needs read access to call events, nothing more. A separate user with minimal rights and an IP restriction.
Do not keep passwords in a PHP file in a reachable place. The classic old phone-lookup tool is usually exactly that — one file with database credentials in plain text.
Do not rely on the extension to tell you who spoke. Handsets get shared and rotated. The extension is a good first hypothesis, not an answer.
The phone system is FreePBX. The event connection is a separate user with read access to calls only, permitted from the server's address only. The listener is a long-running process that catches the moment of ringing and writes a short-lived key in memory, along with a pre-warmed lookup for the number.
The browser asks every few seconds and stops when the tab is hidden. On a ring a card appears top right — name, order count, ticket count — plus a browser notification for a hidden tab. There is also a full lookup page: orders, service cases, the linked customer from quotes, recent conversations, and a call-back button.
Separately there is search by phone, name or order number, with Cyrillic–Latin transliteration, because the same name gets written both ways.
The log is read periodically and creates the call record with its recording. From there transcription and analysis begin. Missed calls are collected too — they are the expensive ones, because that is a customer who rang and nobody caught.
Who spoke is determined at three levels: presence on the extension, the mapping of extensions to people, and where that is ambiguous, the introduction at the start of the transcript.
What does the phone system need to support? A call log with recordings and a stream of live events. FreePBX and Asterisk have both; so do most modern systems.
Does every computer need software installed? No. The popup arrives in the browser the operator already works in. The older approach of an application on every machine is unnecessary and harder to maintain.
How is a call matched to a customer? By phone number, compared on the last nine digits so that the variants with a leading zero, a country code and a plus all agree.
What is shown when the phone rings? The customer's name, order count, open service cases and a link to the full lookup. The information is prepared while the phone is still ringing.
What permissions does the integration need? Read access to call events only, with a separate user and an IP restriction. It does not need permission to dial or to change settings in order to do lookups.
Are missed calls recorded? Yes. They are a separate category and appear in the list — that is a customer who rang and nobody caught.
Can you tell which salesperson handled a call? Yes, at three levels: presence, the extension mapping, and where ambiguous, the introduction at the start of the conversation.
Tell us what eats your team’s day. We will show you — on our own live system — how much of it can simply disappear.