wolfgang074778
08/11/2025, 4:05 PMAI Evy
08/11/2025, 4:06 PMAI Evy
08/11/2025, 4:06 PMcall_started event to trigger your backend logic .
For retrieving previous conversation history, you would need to implement conversation history in your backend [(2) ]() . A simple approach would be to use the call summary from the call_analyzed webhook, store it associated with the phone number, and then use inbound dynamic variables to supply it as a variable into the agent .
The webhook system supports the following event types [(1) ]() :
- `call_started`: Triggered when a new call begins with basic call information
- `call_ended`: Triggered when a call completes with all call object fields
- `call_analyzed`: Triggered when call analysis is complete with full call data including analysis
Latency Considerations:
The webhook has a timeout of 10 seconds . If no success status (2xx) is received within 10 seconds, the webhook will be retried up to 3 times . For optimal performance, Retell AI is optimized for low-latency performance with end-to-end latency typically under 800ms [(3) ]() .
Network requirements for optimal performance include [(4) ]() :
- Latency: <150ms end-to-end
- Bandwidth: 87-100 Kbps per call
- Jitter: <30ms variance
Architecture Guidelines:
For webhook implementation, ensure your endpoint returns a successful status code (2xx) with no body expected [(1) ](httpsAI Evy
08/11/2025, 4:06 PMcall_ended or call_analyzed webhooks, which deliver the same call info as the get call API including the recording URL [(2) ]() .
The webhook payload contains the event type and call object with relevant data [(1) ]() . For conversation history, consider implementing a backend system that stores call summaries and uses dynamic variables to inject previous context into new calls [(2) ]() .AI Evy
08/11/2025, 4:06 PMAI Evy
08/11/2025, 4:06 PMwolfgang074778
08/11/2025, 4:18 PMAI Evy
08/11/2025, 4:18 PMAI Evy
08/11/2025, 4:19 PMjson
{
"inbound_webhook_url": "<https://example.com/inbound-webhook%22>
}
## 2. Webhook Request Structure
When an inbound call arrives, Retell sends a call_inbound event to your webhook [(1) ]() :
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
## 3. Your Webhook Response
Your endpoint can fetch caller information using the from_number and respond with dynamic variables :
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
## 4. Webhook Specifications
- **Timeout**: 10 seconds
- **Retries**: Up to 3 times if unsuccessful
- **Response**: Must return 2xx status code
- **Call State**: Call remains in ringing state until webhook responds
## 5. Fallback Behavior
If the webhook fails after retries, Retell checks if the number has an inbound agent ID set . If yes, it connects to that agent; if not, it disconnects the call .
This approach allows you to personalize each call based on caller history or CRM data before the conversation begins .AI Evy
08/11/2025, 4:19 PMAI Evy
08/11/2025, 4:19 PM