How Inbound Calls Work
The simplest way to set up inbound calls is to import your credentials and point your telephony provider directly to Ultravox. Just set your telephony provider’s webhook callback tohttps://app.ultravox.ai/api/agents/{agent_id}/telephony_xml to have incoming phone calls automatically create and connect to Ultravox calls.
Alternatively, you can use these steps when routing calls through your own application.
1
User Dials You
User dials your phone number purchased from your telephony provider.
2
Incoming Webhook
Provider routes the call to your configured webhook/application.
3
Create Ultravox Call
Your server creates an Ultravox call and gets a
joinUrl.4
Connect & Answer
Connect the call to your provider using the
joinUrl. The AI agent answers and begins the conversation.Using Template Variables
When you use Agents for creating calls, you can define template variables that get passed in at call creation time. When using simplified incoming call handling (i.e. you have imported your credentials from a supported provider), you can define a mapping from your provider’s requests to template context fields. For example, for Twilio you could add an entry like{"From": "user.phone_number"} to add {"user": {"phone_number": "+15551234567"}} to the template context .
When handling telephony webhooks yourself, this data might come from an IVR or your own application. You then specify it as usual (i.e. via template variables) when creating your Ultravox call, e.g.
Example: Template Context
Next Steps
- Check out the Inbound Call Quickstart
- Learn about Call Transfers to escalate calls to human agents