When a phone call misbehaves, the fault is almost always in one of three places: the signalling (the call never sets up, or tears down early), the media (the call connects but the audio is bad or one-way), or the registration (a trunk or a SIP phone can’t authenticate). This page is the field guide for all three — start from the symptom, read the likely cause, apply the fix. Every call keys off a single call_sid, so once you have that from your reports you can follow one call across signalling, media, and the agent. Pull the SIP ladder and the per-call quality numbers from the call trace explorer in the console before you start guessing.
This is the debugging reference. For the step-by-step for a trunk that won’t come up at all, see SIP Trunk Issues; for audio flowing only one way, One-Way Audio; for a call that never answers, Call Does Not Connect.

Where to look first

1

Get the call_sid

Find the call in your reports and copy its call_sid. Every downstream tool — the SIP ladder, the media quality record, the CDR — is keyed on it.
2

Read the SIP ladder

Open the call trace explorer and pull the full request/response ladder for that call_sid. The final response code and the Reason / Q.850 cause on the last message tell you whether signalling or the far end failed.
3

Read the media quality record

Every call that reached the media plane has a per-call quality record — packet loss, jitter, and an MOS score derived from them. If signalling looks clean but callers complain, this is where the answer is. See MOS, Jitter & Packet Loss.
4

Drop to packets only if needed

If the summary numbers don’t explain it, capture the raw SIP and RTP at the edge. See Packet-Level Debugging.

SIP signalling failures

The SIP gateway answers inbound calls as a back-to-back user agent (B2BUA), so it owns both legs of every dialog. A healthy inbound answer runs 100 Trying183 Session Progress with SDP (early media) → 200 OK with the same SDPACK. Deviations from that sequence are the most common cause of “the call connected and then dropped.”

Symptom → cause → fix

SymptomLikely causeFix
INVITE gets no response at allSource IP not matched to a trunk, or blocked by the source-IP ACLConfirm the carrier’s signalling IP is on the trunk (trunks are matched by source IP or dialed DID). Check the ACL. See SIP Trunk Issues.
INVITE answered 403 ForbiddenTrunk/ACL rejected the source, or the spam filter trippedVerify the trunk’s internal_sip_ip / source IP and realm; review spam-filter thresholds.
INVITE answered 404 Not FoundDialed DID isn’t provisioned or isn’t bound to a trunk/agentImport the E.164 number and bind it to a trunk and an agent. See Number Provisioning.
488 Not Acceptable HereCodec mismatch — the offered SDP had no codec the engine will answerOffer G.711 µ-law (PT 0) or A-law (PT 8). The engine transcodes to its internal bus, but the wire codec must be one it accepts. See the Codec Guide.
Call answers, then the carrier sends BYE within ~1 sProvisional 180 Ringing sent without SDP, so no early-media path — some carriers tear downThe engine answers with 183 Session Progress carrying SDP for early media; make sure the carrier isn’t forcing an SDP-less 180.
487 Request TerminatedCaller hung up (CANCEL) before answer — normal for abandoned callsUsually benign. Correlate with ring duration in reports.
408 Request Timeout / 480 Temporarily UnavailableFar leg (human SIP phone, PSTN callee, or vendor) never respondedCheck the destination endpoint’s registration and reachability; see registration section below.
486 Busy Here / 603 DeclineCallee busy or declinedExpected; surfaces in the CDR as the mapped Q.850 cause.
503 Service UnavailableUpstream trunk or vendor congested / out of serviceRetry over an alternate trunk; check carrier status.
Call drops mid-conversation with BYESession timer / re-INVITE not honored, or media inactivityCheck for a stalled media path (see RTP section) — a dead media plane can trigger a teardown.

Q.850 cause codes

When a call clears, the gateway writes a CDR that includes the Q.850 cause — the PSTN-world reason the call ended — mapped from the final SIP response. Read the cause on the cleared event to classify a hang-up without replaying the whole ladder. The common ones:
Q.850MeaningTypical SIP mappingWhat it usually means
16Normal call clearingBYE / 200Either party hung up normally.
17User busy486 Busy HereCallee was on another call.
18No user responding408 Request TimeoutFar leg never answered signalling.
19No answer (user alerted)480 / 408Rang out with no pickup.
21Call rejected403 / 603ACL, policy, or callee decline.
27Destination out of order502 / 503Trunk or gateway down.
31Normal, unspecified480 / 404Catch-all clearing.
34No circuit/channel available503Trunk congestion / capacity.
38Network out of order503Upstream network fault.
41Temporary failure503Transient upstream error — safe to retry.
47Resource unavailable503No media or signalling resource.
88Incompatible destination488Codec / capability mismatch.
102Recovery on timer expiry408A timer (e.g. session refresh) fired.
127Interworking, unspecifiedvariesCross-network mapping loss.
A CDR row for an AI-handled call carries a handler tag on the segment, so you can tell whether the leg that cleared was the AI stretch or a human stretch of the same call_sid. Multi-segment calls split at the handoff. See Observability Overview.

RTP / media failures

The media plane runs RTP/RTCP in-engine: G.711 on the wire (µ-law PT 0 / A-law PT 8), decoded to the runtime’s 8 kHz PCM16 bus, noise-suppressed, and re-paced back out every 20 ms (160 samples per tick). It scores each call’s quality from loss and jitter using an ITU-T G.107 E-model and writes an MOS estimate to the per-call quality record. DTMF rides as RFC 2833 events.

Reading the RTP stats

Two numbers do most of the work:
packet loss
percent
Derived from RTP sequence-number gaps. Sustained loss above ~1–2% is audible; above ~5% the call is rough. Bursty loss (dropped runs of sequence numbers) sounds worse than the same average spread evenly, because the jitter buffer can’t conceal a long gap.
jitter
milliseconds
Inter-arrival variation. The jitter buffer absorbs a working range; beyond it, late packets are discarded (and counted as loss) or introduce delay. Rising jitter with rising discard-loss is a network-path problem, not a codec problem.
The MOS score folds both into one number so you can rank calls without reading raw counters. Treat MOS as the triage signal and loss/jitter as the diagnosis. Full interpretation guide: MOS, Jitter & Packet Loss.

Symptom → cause → fix

SymptomLikely causeFix
Choppy / robotic audio, high loss %Network loss on the RTP path, or bursty sequence gapsCheck the path to the carrier; loss is symmetric to jitter here. Capture RTP at the edge to see the gaps. See Packet-Level Debugging.
Audio delayed / “walkie-talkie” feel, high jitterJitter beyond the buffer’s working range → late packets discardedReduce path jitter; sustained high jitter shows as discard-loss and a low MOS.
One-way audio (caller can’t hear agent, or vice versa)RTP flowing in only one direction — usually NAT/addressing: private bind IP advertised where a public IP is requiredConfirm the trunk’s external_rtp_ip (public) vs internal_rtp_ip (bind). In cloud-NAT the SDP must advertise the public media address. See One-Way Audio.
No audio at all, but call is establishedSDP negotiated a codec the far end never sends, or media never openedVerify the answered SDP codec matches the wire; confirm the call resolved to proxy media mode (the runtime requires proxied media for AI handling and recording).
DTMF digits not detectedDigits sent as in-band audio tones instead of RFC 2833 eventsConfigure the carrier/endpoint to send RFC 2833 (telephone-event) DTMF.
Pitch too high/low (“chipmunk”)Sample-rate mismatch across a leg (e.g. an 8 kHz leg treated as 16 kHz)This class of double-resample bug is fixed in the stateful resampler; if you see it on a bridged/vendor leg, check the leg’s declared clock rate.
MOS good but agent mishears speechNot a transport problem — turn-taking or recognitionMove to the runtime side: Barge-In Debugging.
media_mode: direct is defined on the trunk but the live runtime currently degrades it to proxy. If you configured direct and see no recording, no MOS, and no AI audio, that’s why — proxied media is the working path. See Transport to Telephony Overview.

Registration failures

The engine embeds its own SIP registrar (default-on, multidomain, digest auth + source-IP ACL, with nonce/replay hardening) — there is no separate registration server to run. Two kinds of party register: outbound trunks that register to a carrier, and human agents on real SIP deskphones/softphones that register to your workspace. Each workspace has its own SIP host, <workspace-id>.sip.telequick.dev, and the engine identifies the tenant from the leftmost DNS label of the inbound request.

Symptom → cause → fix

SymptomLikely causeFix
REGISTER challenged 401 Unauthorized in a loopWrong digest credentials, or the client isn’t re-sending with the Authorization header after the nonce challengeVerify the AOR user and secret (secrets are sealed at rest). A single 401 challenge is normal — a loop means the credential response is wrong.
REGISTER answered 403 ForbiddenSource IP not on the SIP ACL, or wrong realm/domainAdd the device’s IP to the SIP ACL and confirm it’s registering to the right <workspace-id>.sip.telequick.dev realm.
REGISTER answered 404 / 488Registering to the wrong tenant subdomain, so the leftmost label doesn’t resolve to your workspacePoint the SIP client at <workspace-id>.sip.telequick.dev exactly; the label is the tenant key.
Phone registers, then goes unreachable after a minute or twoRegistration Expires too short and the client isn’t refreshingEnsure the client re-registers before expiry; the binding TTL follows the Expires value.
Inbound call to a registered phone never rings itContact bound to a private/NAT address the engine can’t reachThe engine binds on a private IP but must advertise a reachable Contact/Via; confirm public vs private addressing for cloud-NAT.
Trunk won’t register outbound to the carrierWrong sip_username / sip_password or register_expires_sec, or the carrier expects a specific transport (WS/WSS)Check the trunk credentials and transport (sip_ws vs sip_wss/TLS). See SIP Trunk Issues.
Trunk INVITEs bypass the registrar ACL (they’re matched by source IP instead), so a trunk can deliver calls even while a device registration is failing — don’t conflate the two. Registration problems affect SIP phones and outbound trunk registration; inbound carrier trunks are matched by IP.

A quick triage flow

1

Did the call set up?

No final 200 OK in the ladder → signalling. Read the final response and Q.850 cause above. If the trunk never came up, go to SIP Trunk Issues.
2

Did it set up but sound bad or go one-way?

Call is established but audio is poor → media. Read loss/jitter/MOS; for one-way audio check RTP addressing. Go to One-Way Audio or MOS, Jitter & Packet Loss.
3

Is it a device or trunk that won't come up?

REGISTER failing → registration. Check credentials, ACL, tenant subdomain, and expiry above.
4

Still stuck?

Capture the raw packets at the edge and read the wire directly. Go to Packet-Level Debugging.

SIP Trunk Issues

The focused runbook for a trunk that won’t register or route.

MOS, Jitter & Packet Loss

How to read the media quality metrics this page points you at.

Packet-Level Debugging

When the summaries aren’t enough, read the SIP and RTP off the wire.

Call Lifecycle

The healthy INVITE-to-CDR sequence these failures deviate from.