Integrations
Receive Calls on a TryVox Number
Answer calls to your TryVox number with your own application or an AI agent.
Make your TryVox number answer with your own application, so a caller hears your message.
How it works
Caller ──▶ your TryVox number ──▶ TryVox checks where the number is connected
│
┌────────────────────────┼─────────────────────────┐
▼ ▼ ▼
AI agent binding Voice Application SIP trunk
(Vapi, ElevenLabs, …) (your answer_url + VoxML) (your PBX / SIP)A number goes to the first of these it has: an AI agent, then a Voice Application, then a SIP trunk. A number with none of them can't answer calls. This guide sets up a Voice Application. For an AI agent, see the Voice AI guides.
Before you start
- API credentials, approved KYC, and an active TryVox number. See Before any guide.
- A public HTTPS URL that returns VoxML. To test, use
https://api.tryvox.io/voice-test.
Try it
1. Create a Voice Application. It says where TryVox should ask what to do with each call.
curl -X POST https://api.tryvox.io/v1/voice/applications \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{
"name": "Main line",
"answer_url": "https://api.tryvox.io/voice-test"
}'Copy data.id from the response.
2. Connect your number to it. Write the + in the number as is.
curl -X POST "https://api.tryvox.io/v1/account/$TRYVOX_AUTH_ID/numbers/+918045671234/application" \
-u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
-H "Content-Type: application/json" \
-d '{ "application_id": "<application-id>" }'You can do both steps in the dashboard instead: Voice → Call applications, then open the number under Numbers.
3. Call your TryVox number from any phone.
Expected result
You hear "Hello from TryVox. This is a successful test call. Goodbye." and the call ends.
Use your own server
Point answer_url at your backend. TryVox POSTs JSON when the call is answered:
{
"call_uuid": "c7a34e6f-9d1b-4c8e-a5f2-3b9d7e8c1a4f",
"account_id": "TJab12cd34",
"from": "+919812345678",
"to": "+918045671234",
"direction": "inbound",
"status": "answered"
}Reply within 15 seconds with VoxML, for example:
{
"voxml_version": "1.0",
"instructions": [
{ "verb": "Say", "text": "Thanks for calling Acme. Connecting you now.", "language": "en-IN" },
{ "verb": "Dial", "numbers": [{ "number": "+919876543210" }] }
]
}To get call events too, add hangup_url, status_callback_url and webhook_secret to the application. They work exactly as for outbound calls: see Receive Call Events. The platform example server handles inbound events unchanged.
Next step
- Route to an AI agent instead: Vapi, ElevenLabs, Retell, LiveKit, Bolna.
- Every application field: Voice Applications.
Troubleshooting
| Problem | Fix |
|---|---|
409 ALREADY_ASSIGNED on step 2 | The number already has an application. Remove it first with DELETE …/numbers/{e164}/application. |
| The call goes to an AI agent instead | AI agent bindings come first. Disconnect the number under AI Agents. |
| The call is silent or ends at once | The number has no application, AI binding or trunk, or your answer_url returned something that isn't VoxML. |
| "An application error has occurred" | Your answer_url was unreachable, returned an error, or took longer than 15 seconds. |