How to connect ElevenLabs to a Costa Rica number over a SIP trunk
Step-by-step setup for ElevenLabs Agents on a SIP.cr trunk with a +506, 800 or 0800 number, plus what to check when the first call fails.
To connect ElevenLabs Agents to a Costa Rica phone number, create a username-and-password trunk in SIP.cr with the ElevenLabs option, import the number in ElevenLabs under Phone Numbers › Import number › From SIP Trunk with the four values from your trunk page, then buy a +506, 800 or 0800 number and point it at a trunk group that contains that trunk. After one inbound and one outbound test call, the agent can answer and place calls with a local caller ID.
This guide walks through each step, explains what each field means, and lists what to check when the first call does not work.
What each side does
It helps to be clear about the split before you start:
| Part | Handled by |
|---|---|
| Voice, conversation logic, the agent itself | ElevenLabs |
| Costa Rica number (+506, 800 or 0800) | SIP.cr |
| Connection to the public phone network | SIP.cr |
| Call records: timeline, hangup cause, MOS, jitter, packet loss | SIP.cr portal |
When something goes wrong, this table tells you where to look first. If the call never reaches the phone network, start in SIP.cr. If the call connects but the agent says the wrong thing, the problem is in the agent's configuration in ElevenLabs.
Before you begin
- A SIP.cr account that has passed review. A person reviews each new account (company details and legal representative), and service starts once a payment method is on file and there is credit.
- Access to the ElevenLabs Agents dashboard with an agent already built.
- An idea of how many calls you expect at the same time. Each SIP.cr trunk has between 1 and 1,000 channels, and one channel carries one simultaneous call.
Step-by-step setup
- Create the trunk. In the SIP.cr portal, open SIP trunks, choose New trunk and pick ElevenLabs. This sets the trunk to username-and-password authentication and fills in the address SIP.cr uses to send inbound calls to ElevenLabs.
- Set the channels. Enter the number of simultaneous calls you need. You can change it later from the portal or the API, so start with a realistic figure rather than the maximum you can imagine.
- Copy the values into ElevenLabs. In ElevenLabs, go to Phone Numbers › Import number › From SIP Trunk. The SIP.cr trunk page lists each value under the name ElevenLabs uses for it (see the mapping below).
- Buy a number. In SIP.cr, open Numbers, choose a +506, 800 or 0800 number from stock and route it to a trunk group that contains the ElevenLabs trunk.
- Test both directions. Call the number from a phone, then place an outbound call from ElevenLabs. The trunk page in SIP.cr shows the last call and how it ended.
Field mapping
The left column uses the field names from the ElevenLabs SIP trunking guide. The values come from your trunk page in SIP.cr.
| Field in ElevenLabs | Value from your SIP.cr trunk |
|---|---|
| Address | SIP server and port (host:port) |
| Transport type | Transport (TCP) |
| SIP trunk username | Trunk username |
| SIP trunk password | Trunk password |
For inbound calls, SIP.cr sends calls for your Costa Rica number to ElevenLabs at this address, which the new-trunk form fills in for you:
sip:sip.rtc.elevenlabs.io:5060;transport=tcp
You do not need to type it, but it is useful to recognise it when you read a call timeline.
Field names come from ElevenLabs's published guide and can change when ElevenLabs updates its product. If a label in the dashboard does not match the table, follow their guide for that field and write to [email protected] if you are unsure which value belongs there.
How outbound caller ID works
Outbound calls from ElevenLabs leave SIP.cr with one of your account's own numbers as caller ID. That is what makes a local number useful: people in Costa Rica see a +506 or toll-free number instead of a foreign one, and can call it back. If you run several agents, give each one its own number so a returned call reaches the right agent.
Checking the first calls
Do not stop at "the phone rang". Open each test call in the SIP.cr portal and confirm three things:
- The call ended the way you expected. The portal shows the hangup cause in plain words, with what to check if it was not a normal hang-up.
- The audio was clean. Each call record includes MOS, jitter and packet loss. Test from a mobile phone and a landline if you can, since callers will use both.
- The direction and number are right. Inbound calls should show the number you bought; outbound calls should show the caller ID you expect.
When the first call fails
| Symptom | What to check first |
|---|---|
| Outbound call from ElevenLabs is rejected | Username and password copied exactly, with no extra spaces; address includes the port |
| Inbound call never reaches the agent | The number is routed to a trunk group that contains the ElevenLabs trunk |
| Calls work until several run at once | The trunk's channel count against your peak number of simultaneous calls |
| Call connects but audio is poor | MOS, jitter and packet loss in the call record |
| Nothing works on a new account | Account review is complete, a payment method is on file and there is credit |
The hangup cause in the call record usually points straight at one of these rows, so read it before changing settings.
Running more than one agent
You can create several trunks in one SIP.cr account, for example one per ElevenLabs agent, or one for ElevenLabs and another for a PBX. Numbers, channels and billing stay in one place. Trunk groups let you route each number to the trunk that should answer it, and for inbound calls a trunk group can hold several trunks in an ordered failover list.
Automating the setup
Everything in the portal is also available through the REST API at https://sip.cr/api/v1 (trunks, trunk groups, numbers, calls, statistics and usage) with a Bearer API key. If you prefer to keep an eye on calls from your own system, SIP.cr can post call.initiated, call.answered, call.completed and call.failed events to a URL you choose. These webhooks are sent when the call record arrives, right after the call ends, and are signed with HMAC-SHA256 in the X-Webhook-Signature header, so verify the signature before trusting the body.
There is also an MCP server at https://sip.cr/mcp that lets a coding agent such as Claude Code, Cursor or VS Code read your trunks, numbers, calls and statistics while it works.
A short launch checklist
- Trunk created with the ElevenLabs option and enough channels for peak traffic
- Four values pasted into ElevenLabs and saved
- Number bought and routed to the right trunk group
- One inbound and one outbound test call, each reviewed in the portal
- One number per agent, so callbacks reach the right place
The full field reference and setup steps are in the ElevenLabs integration guide on SIP.cr.