Skip to content

How to troubleshoot failed voice agent calls over SIP

A practical order of checks for authentication, routing, channels and audio quality when a voice agent call fails or sounds bad.

When a voice agent call fails or sounds bad, start with the call record, not the agent prompt. In SIP.cr, every call to and from your agent has a record with its timeline, hangup cause explained in plain words, and audio quality measures (MOS, jitter and packet loss). Those three things tell you, in most cases, whether the problem is in authentication, routing, capacity or the network, and which side to fix.

This guide gives you a repeatable order of checks that works for ElevenLabs, Vapi, Retell AI, Synthflow, or a PBX such as Asterisk or FreeSWITCH.

Step 1: find the call and read how it ended

Open the call in the SIP.cr portal. Each record shows the result, duration, the per-call timeline and the hangup cause with what to check. The trunk page also shows the last call on that trunk and how it ended, which is the fastest check right after you change a setting.

If you prefer to work from code or from a coding agent, the same data is available through the REST API (/api/v1/calls) and the MCP server at https://sip.cr/mcp, which exposes tools such as list_calls, get_call and get_call_stats. A coding agent in Claude Code, Cursor or VS Code can pull the last failed calls while you look at the configuration.

Step 2: sort the failure into one of four groups

Most failures fall into one of these groups. The SIP response codes below are the standard ones defined in RFC 3261; your platform may show them under a different label.

GroupTypical signsWhat to check first
Authentication401 or 407 challenges that never succeed, 403 ForbiddenTrunk username and password copied exactly; the trunk type matches how the platform connects
Routing404 Not Found, inbound calls that never reach the agentNumber points to a trunk group that contains the right trunk; inbound address on the platform side
CapacityCalls rejected only at busy times, 486 Busy Here or 503 Service UnavailableChannels on the trunk versus peak simultaneous calls
MediaCall connects but one side hears nothing, choppy or robotic audioNAT, codecs, MOS, jitter and packet loss

The group decides who you talk to. Authentication and routing are almost always configuration on one of the two sides. Capacity is a setting. Media problems usually live in the network path.

Step 3: authentication checks

SIP.cr trunks authenticate in one of three ways: fixed IP, registration (the PBX registers to SIP.cr), or username and password (digest). When you create a trunk and pick ElevenLabs, Vapi, Retell AI or Synthflow, the form sets up username-and-password authentication; picking the PBX option sets up registration.

Common mistakes:

  1. A trailing space or missing character when pasting the trunk password.
  2. The username and password pasted into the wrong fields. The trunk page lists each value under the name the platform uses for it, so match the labels one by one.
  3. A trunk created with the wrong platform type, so the authentication method does not match what the platform sends.
  4. For a PBX, the registration is not active. Check the registration status on the PBX itself (for example with the commands in the Asterisk documentation or FreeSWITCH documentation).

Also confirm the account itself is active. Service starts once the account has been reviewed, a payment method is on file and there is credit.

Step 4: routing checks

For inbound calls, two things have to line up:

  • The Costa Rica number (+506, 800 or 0800) must point to a trunk group that contains the trunk for your agent.
  • The platform must accept calls at the inbound address on the trunk. For ElevenLabs and Retell AI, the new-trunk form fills in that address for you.

For outbound calls, the caller ID must be one of your account's own numbers. If your agent platform sends a different number as caller ID, change it on the platform side before looking anywhere else.

If you use more than one trunk in a trunk group, remember that the group applies ordered failover for inbound calls, so check that the trunks are in the order you intend.

Step 5: capacity checks

Each trunk has a number of channels, from 1 to 1,000, that you can change from the portal or the API. One channel carries one simultaneous call. If calls fail only during a campaign or at peak hours, compare the number of channels with the highest number of calls you expect at the same moment.

The statistics view (and /api/v1/stats) gives you answer rate (ASR), average duration (ACD) and call volume. A sudden drop in ASR at the same hour every day is a strong hint that you are running out of channels or that the agent platform is limiting concurrency on its side.

Step 6: media and audio quality

If the call connects but the audio is wrong, look at the quality fields on the call record.

MeasureWhat it meansCommonly used target
MOSEstimated listening quality on a 1 to 5 scale, based on the ITU-T E-modelAround 4 or higher is generally considered good
JitterVariation in packet arrival time, in millisecondsUnder about 30 ms is a common rule of thumb
Packet lossShare of audio packets that never arrivedUnder 1% is a common rule of thumb

These targets are industry rules of thumb, not limits set by SIP.cr. Use them to decide where to look:

  • High packet loss or jitter points to the network between the agent platform or PBX and the trunk: a congested office link, Wi-Fi, or a VPN in the middle.
  • One-way or no audio with good numbers on the other leg usually points to NAT. A PBX behind NAT should use registration, which SIP.cr supports for exactly this case; also review the PBX's own NAT settings and firewall rules for the RTP port range.
  • Robotic or clipped audio with normal network numbers can come from transcoding. SIP.cr supports G.711 and Opus. Offering a short, clear codec list on your side avoids surprises.

For voice agents, audio quality has a direct effect on speech recognition. A call with heavy packet loss can produce wrong transcripts and confused answers, which looks like a prompt problem but is not.

Step 7: watch for failures as they happen

Instead of checking the portal by hand, you can choose a webhook URL in the portal. SIP.cr posts call.initiated, call.answered, call.completed and call.failed events when the call record arrives, right after the call ends. Each request is signed with HMAC-SHA256 in X-Webhook-Signature, so verify the signature before you trust the body:

expected = hmac_sha256(secret, raw_body)
valid    = constant_time_equals("sha256=" + expected, header)

You can send a test event and read the delivery log from the portal. A simple handler that collects call.failed events by hangup cause gives you a daily view of what to fix first.

A short checklist

  1. Open the call record and read the hangup cause.
  2. Classify it: authentication, routing, capacity or media.
  3. Compare the trunk values on the platform with the trunk page, label by label.
  4. Confirm the number points to the right trunk group and the caller ID is one of your numbers.
  5. Compare channels with peak simultaneous calls.
  6. For audio problems, read MOS, jitter and packet loss before touching the agent.
  7. Make a test call and check the last call on the trunk page.

If a field on your platform does not match what you see in SIP.cr, follow the platform's own guide and write to [email protected] with the call details.

For the field-by-field setup of each platform, see the integration guides starting at /sip-trunk/pbx, and for automating these checks, see /api-mcp.

More articles

Reviewed, then live

Put your AI voice agent on the phone network.

Create the account today. Once our team approves it and you add a payment method, your first trunk and number take a few minutes.

Create account Talk to sales