Where AI integration with IP telephony breaks
A voice agent rarely breaks on recognition or synthesis — it breaks at the junction with telephony. Connecting the agent to a PBX adds another layer to the conversation: signaling channel, media stream, buffering at the gateway.
Each introduces its own delay, and together they turn a live utterance into a response that the caller hears with noticeable latency.
The first bottleneck is the pause between the caller's utterance and the agent's response.
To avoid interrupting the person, end-of-utterance detection waits for a silence "tail"; on a noisy line the caller inhales — and the speech detector decides the thought is finished, or conversely holds the pause an extra second.
Voice agent response delay is made up of waiting for silence, the recognition queue, and synthesis of the response — and instead of a dialogue, the caller hears a dead line.
The second place is speech gaps in the call during transfer.
When the conversation goes to an operator or another line, the media stream renegotiates, and several words from the caller do not get into either the recording or recognition: the agent hands over control no longer knowing how the phrase ended.
In reports this looks like "client was silent", though in fact they were speaking — just not to the right place.
The third is desynchronization under line overload. As the number of simultaneous calls grows, processing time per stream grows, and the agent starts responding not when the caller finished, but when the resource became available.
Audio and text diverge, the agent asks again, the caller repeats — and a simple scenario turns into irritation.
None of these places is visible in a demo with one call. They manifest only under real load, with real codecs, echo and drops — so we break down how this is closed at each layer.
What a voice agent on the line provides: latency and accuracy
A voice agent connects to existing IP telephony and takes the first response upon itself: accepts the call, clarifies the purpose of the call, and either closes the request or transfers to an operator together with a conversation transcript.
The effect of implementation is visible not in feelings, but in a set of metrics taken from the same line.
Below are control points by which we accept the work. We check each on live traffic after launch, not on a demo stand.
- Response time. The agent responds within a second, pauses between utterances — fractions of a second; complaints "hung on the line for a long time" leave the flow.
- Share of auto-responses without an operator. Typical requests — ticket status, recording, tariff, address — are closed entirely on the line: benchmark 60–75% of incoming flow.
- Speech recognition accuracy. 95%+ on a clean channel; noise and a weak headset are compensated by re-asking and confirmation of key fields — ticket number and date.
- Reduced load on operators. One agent handles hundreds of simultaneous conversations, so the operator pool stops growing with traffic.
- Eliminated class of drops at peak. Previously a call was dropped when the queue exceeded the operator pool; now the agent holds it in the queue until the line becomes available.
- Transfer to human with context. The operator receives a transcript and brief summary and does not re-ask what the client already said.
We build recognition on production models, e.g. Whisper, and keep them in the customer's perimeter: quality is independent of an external service, and transcripts stay inside the perimeter.
Options for connecting a voice agent to a PBX
The connection scheme determines where the media stream lives, who holds call signaling and how many links the agent response passes through. This determines response latency, resilience to peaks and what data leaves your perimeter. Below are three working schemes and their limitations.
| Option | When suitable | Limitations |
|---|---|---|
| Direct connection to the PBX | Telephony is already in its own perimeter, there are requirements to keep recordings and dialogue data inside the perimeter | Capacity is limited by your servers: the number of simultaneous conversations is limited by resources, and recognition and synthesis models are updated by you yourself |
| Connection via gateway to a cloud platform | The PBX remains operational, and recognition and synthesis are delegated to an external service | Dependency on an external channel: under degradation latency grows and drops appear, a backup route and communication quality control are needed |
| Hybrid scheme | Need a balance: routing, recording and policies on your own side, heavy models in the cloud | Harder to maintain: coordination of routing rules, state synchronization between perimeters, no single point of failure |
We separately calculate line load limits: how many simultaneous conversations the PBX handles, how many channels the operator provides, what happens at peak and how quickly the agent returns freed channels.
If the limit is exceeded, the call does not "slow down", but drops, so the scheme is selected for peak load, not average, and confirmed by a test run on a real call profile.
Work order: from line audit to handover to support
Implementation starts not with code, but with a line survey: it is important to understand what already works on the customer side, where calls are lost and which scenarios should be given to the agent at all. Then the project follows a fixed route — with a verifiable result at each step.
- Telephone line audit. We collect statistics on the flow: distribution of calls by hour, share of missed, channel quality, latency on the segment to the PBX. Result — a map of bottlenecks and a list of scenarios where the agent really offloads operators.
- Call routing scheme. We determine what goes to the agent, what immediately to an operator, how transfer between them works and what happens when the queue is unavailable. We coordinate the scheme in writing — it also becomes the basis for tests.
- Connection and setup. We connect the agent to the customer infrastructure, pull data from CRM by caller number, set timeouts and interruption response — this determines whether speech is perceived as live or as a robot.
- Load run. We run parallel calls, drops, silence, noise, poor channel. We record response latency, share of correctly recognized utterances and routing correctness at each step.
- Pilot on part of traffic. We compare the agent with a control group of operators by share of resolved requests and transfers to human, adjust scenarios and switching thresholds.
- Acceptance and rollback. We check against metrics agreed before start, and separately test returning calls to operators if quality degrades.
- Handover to support. We provide regulations, routing scheme and instructions for typical failures; the customer team performs the control run themselves, we remain available under warranty.
Routing schemes, configurations and regulations
After implementation, the customer retains not only a working agent, but also a set of artifacts by which the duty shift can raise, change or roll back the solution without us. Below is the package handed over with commissioning.
- Voice agent configurations — dialogue scenarios, set of intents, utterance texts and thresholds for transfer to operator as versioned profiles: separate test, separate production.
- Call routing schemes — route from incoming line to agent and operator: where numbers lead, where the queue turns on, what happens on overflow or node unavailability.
- Access policies for recordings — who sees and exports conversations and transcripts, how long they are stored, how personal data is masked, what is logged in the access journal.
- Operator escalation regulation — conditions and priorities of transfer, maximum waiting time, what dialogue context the agent passes with the call and how it handles the client's refusal of the bot.
- Integration documentation — diagram of connections with telephony and the accounting system, list of exchange points, requirements for channels and behavior when an adjacent service is unavailable.
- Shift instructions — typical actions: check that the agent responds, switch traffic to operators, return the previous configuration version.
- Set of metrics and dashboard — response latency, share of recognized utterances, share of escalations: they show whether quality degraded after edits.
Case: how response latency was cut threefold
The incoming support line received up to several hundred calls per day, at peak hours — more than a dozen simultaneously.
The voice agent stood in front of Asterisk and started the conversation, but before the first phrase held a pause of almost 2.5 seconds — during this time the caller had time to decide no one hears them and hang up.
Measurements were taken on real traffic, not demo recordings, so the picture was honest immediately.
Before: pause you can hear
Median pause before response — 2.5 seconds, at peak — up to 5. During load hours 18% of calls dropped on the first caller utterance, and 4 out of 10 requests ended with transfer to an operator.
Root cause: the agent waited until the person finished the phrase entirely, and only then started recognition — the whole chain lined up sequentially.
What changed and what we got
Recognition was moved to streaming mode: the agent parses speech without waiting for the end of the phrase, and responds at a semantic pause.
Knowledge base check and response synthesis were moved from the sequential chain to parallel steps, and typical questions — ticket status, working hours, connection terms — were closed with pre-prepared utterances without a full scenario pass.
After the changes, median pause — 0.7 seconds, at peak no higher than 1.2. Drops on the first utterance fell from 18% to 6%, transfers to operator — 22% instead of 40%. Recognition accuracy on industry vocabulary, service names and SKUs grew to 94%.
We repeat measurements on every scenario change: a run on a recording of real calls shows pause, drops and share of requests closed by the agent before rollout to the line. Regression becomes visible before callers notice it.
How AI integration with IP telephony differs from a voice menu
A voice menu is a tree of predefined branches: the caller presses keys or says one of the prepared options, and the system only matches it to an item. The scenario is rigid — if you didn't get into the branch, then reset, repeat or transfer to an operator.
The cost of the scheme is visible on a non-typical request: a person who wants to "move delivery to Thursday and also ask about a return" has to call twice.
AI integration with IP telephony starts where instead of a list of options the system recognizes free speech and parses its meaning.
An utterance turns into an intent and parameters — what to do, with which order, on what date — and the route is built on the fly, not selected from a pre-drawn graph.
Context is held between utterances: the order number does not need to be named again if it was said at the beginning of the conversation.
Hence a different set of call handling scenarios. The agent asks a clarifying question if data is insufficient, returns to the previous topic if the caller changed their mind, and performs an action — checks status, changes the slot, records the request. Multiple intents in one call stop being a problem: they are parsed sequentially in one dialogue.
This works only with discipline on timing and control transfer.
The response must fit into the natural pause of the conversation, the agent must fall silent when the caller interrupts, and when transferring to an operator pass the transcript and already collected data so the human doesn't start with "dictate the number again".
The menu is not discarded: it remains a fallback path and rollback point when the system is unsure in recognition.
Technical doubts: connection, noise and recognition
Before start, technical teams ask not "can it", but "what will happen when it breaks". Some objections are closed at design: agent behavior on a drop, resilience on an overloaded direction, accuracy on industry vocabulary.
Separately — conversation recordings and personal data: here storage policy and role-based access decide.
We do AI integration with IP telephony through standard PBX interfaces — we work with Asterisk, FreeSWITCH and cloud platforms, so a drop, re-registration or codec change are handled at the dialogue level, not "will connect or not".
What does the agent do if the connection drops?
The drop is recorded by the release code, dialogue state and collected data are saved. The agent does not start the conversation anew: it either calls back on schedule or passes the card to an operator with a note at which step it was interrupted.
How does the agent behave under line overload?
We set a limit of simultaneous sessions and a priority queue: important numbers pass immediately, others receive a callback instead of silence in the handset. When the channel degrades, the scenario simplifies to a short survey, not breaks.
How accurately are industry terms recognized?
The general model provides the foundation, but item names, SKUs and abbreviations are improved with dictionaries and hints. Before launch we run real calls and look at accuracy on key fields — order number, address — not average recognition accuracy.
How are conversation recordings stored?
The recording is encrypted, the storage period is set by policy and closed by auto-deletion, access is granted by roles and logged. Before refining the model on recordings, data is anonymized, and the caller hears a recording notice at the beginning of the conversation.
Let's discuss the task: what to send for assessment
To return with an integration assessment and a voice agent implementation plan, we don't need a volume of technical documentation. Inputs on the line and scenarios are enough — the routing scheme and scope of work are assembled from them.
The more precise the initial data, the fewer assumptions in the plan and the fewer edits at the launch stage.
- Telephony scheme: how many simultaneously active channels, through what trunk calls arrive, what platform is on the customer side, who manages routing.
- Request scenarios: 5-10 typical reasons for a call, what the agent should close itself and what to transfer to an operator, by what criterion the escalation decision is made.
- Recordings of real conversations: 20-30 dialogues in source quality — speech recognition is tuned on them, a dictionary of terms and names is assembled, pauses and interruptions are checked.
- Integration points: where the agent writes the conversation outcome — CRM, support service or ticket base, what fields are mandatory, whether client card transfer into the dialogue is needed.
- Failure requirements: what happens when the agent or integration is unavailable, to what number the call returns, who is on duty and how the incident is recorded.
- Perimeter restrictions: where conversation recording is allowed to be processed, how long to store it, whether anonymization requirements exist and who on the customer side confirms access.
- Launch regulation: working hypothesis on response latency that we consider acceptable, agent working hours and the metric by which you will accept the result.
Describe the task in this scope — we will return with an assessment, architecture scheme and step-by-step plan: pilot on part of traffic, measurement of response latency and share of correctly recognized utterances, then expansion to the entire line.







