How a bad line works
Roark drops audio from the simulated caller’s call in 20 ms packets, separately in each direction:- Toward the agent is what your agent hears from the caller.
- Toward the caller is what the caller hears from your agent.
Line qualities
Custom lines
A Custom line sets each direction on its own, with two dials:
A direction at 0% loss is left clean, so a Custom line can break up one way only, or differently each way.
Redials lose the same packets
The loss pattern is seeded per simulation, so when Roark dials the same simulation again it drops the same packets at the same points in the audio. A failure you see on a bad line is one you can reproduce, rather than bad luck on one call.Ready-made bad-line environments
Alongside the sound presets, every project gets four read-only environments that pair a place with the line a caller there is likely to be on. They are listed under Bad lines in the Environment panel.
Like the other Roark presets, they play their sound at the default level and can’t be edited. Change one and save it as your own.
Setting the line in the flow editor
The line is set in the same Environment panel as the background sound, from the Environment chip on any variant of a customer flow.1
Pick an environment
Open the Environment chip. The panel lists the Roark presets under Sound and Bad lines, then Your environments. Picking one of the bad-line presets is the quickest way to put a variant on a degraded line.
2
Choose the line
Under Phone line (“Lost audio, in 20 ms packets”), pick Clear, Minor loss, Cell edge, Poor, One way or Custom. Two strips below show the line in each direction: What the agent hears from the caller and What the caller hears from the agent. Each strip is two seconds of audio, 100 packets, with a gap where one is lost. They illustrate the pattern; they are not the packets a particular call lost.
3
Tune a Custom line
Choose Custom and each direction gets its own Loss and Gap length slider, starting from whatever line was on screen. A gap length of 20 ms reads “random”.
4
Save it
Presets keep their settings, so a changed preset becomes your own environment. Roark suggests a name such as “Office (10% noise, cell edge line)”, which you can overwrite. Use for this variant saves it and binds the variant to it; Save as new saves it without changing the environment you started from. If one of your environments already has the same settings, the panel offers Use it instead.
Where a line applies
Line quality only means something for an agent reached on a phone endpoint. An agent reached any other way (WebRTC, WebSocket, LiveKit and so on) has no phone line, so the setting does nothing there. When every agent a run targets is off the phone network, the run builder marks a variant with a bad line “Line ignored: this agent isn’t on the phone network.”Comparing lines with a sweep
To find out what each step down costs your agent, run the How the agent handles a bad line template. It runs one flow on each line, from Clear to One way, and reports which lines made the agent worse. Pair it with Background noise robustness: noise hides speech under sound, a bad line removes it.Config as code
Environments are not a config resource of their own. A flow in config refers to one by its display name, so a bad-line preset can be used straight away:API
An environment carries its line in two fields:lineQuality: one ofCLEAR,MINOR_LOSS,CELL_EDGE,POOR_CONNECTION,ONE_WAY_DEGRADEDorCUSTOM. Defaults toCLEAR.lineCustom: the per-direction loss of aCUSTOMline,nullon every other. It has two optional keys,toAgentandfromAgent. Each takespacketLossPercent(0 to 20, in steps of 0.5) and an optionalmeanBurstPackets, the average gap in 20 ms packets (2 to 10, so 40 ms to 200 ms). LeavemeanBurstPacketsout for random loss. Leave a direction out to keep it clean.
lineCustom is required with lineQuality: CUSTOM and refused with any other line, including on an update: to change the numbers, send them with lineQuality: CUSTOM. Either mistake is a 400.
Pacing a run
A bad line is one half of a realistic phone test; the other is how calls arrive. A run plan can start its calls at a set dial rate, from 0.01 to 10 calls per second, with an optional linear ramp up to it, instead of starting them all as fast as concurrency allows. See Pacing calls.What the carrier measured
Every simulated phone call also gets scored on what the phone carrier itself measured on the line. These come from the carrier’s report, not from listening to the recording:
They make up the Telephony package in the system metrics reference. Use them next to the Call Quality (DNSMOS) scores: the carrier’s figures say how the line carried the audio, DNSMOS says how the audio itself sounds.
These metrics exist only for simulated calls that went over the phone network. A web or WebSocket simulation is marked not applicable, and a phone call the carrier sent no report for is marked as missing data. A figure the carrier did not report is never recorded as zero.