paakaran_
11/20/2025, 5:38 AMAI Evy
11/20/2025, 5:38 AMAI Evy
11/20/2025, 5:38 AMinbound_webhook_url parameter [(1) ]() . This webhook URL is where Retell will send inbound call notifications .
When creating or importing a phone number, the inbound_webhook_url field should be set to your n8n webhook endpoint . According to the documentation, "If set, will send a webhook for inbound calls, where you can to override agent id, set dynamic variables and other fields specific to that call" [(2) ]() .
The key difference you're experiencing between web calls and phone calls likely relates to how the webhook is configured at the phone number level versus the agent level. For phone calls coming through your Twilio number, the webhook needs to be configured on the phone number itself [(1) ]() [(2) ]() .
Check your phone number configuration to ensure the inbound_webhook_url is properly set to your n8n webhook endpoint. You can verify this through the List Phone Numbers API to see the current configuration [(2) ]() .
If you need to update the webhook URL for your imported number, you would need to delete and re-import the number with the correct webhook configuration [(3) ]() .AI Evy
11/20/2025, 5:38 AMAI Evy
11/20/2025, 5:38 AMpaakaran_
11/20/2025, 5:47 AMpaakaran_
11/20/2025, 5:47 AMAI Evy
11/20/2025, 5:47 AMAI Evy
11/20/2025, 5:48 AMfrom_number and to_number [(1) ]() . This webhook is for overriding agent settings or setting dynamic variables for that specific call .
To receive post-call transcripts and analysis, you need to set up a different webhook that listens for the call_analyzed event [(2) ]() . After a call is analyzed, Retell sends a webhook payload that includes the complete call analysis .
The call_analyzed webhook payload looks like this :
json
{
"event_type": "call_analyzed",
"call": {
// Call object with call_analysis field populated
}
}
To configure this webhook, visit the Webhook Configuration section in your Retell dashboard . This is separate from the inbound call webhook you set at the phone number level.
Alternatively, you can retrieve analysis results programmatically using the Get Call API after the call completes [(2) ]() [(3) ]() . The API response includes the call_analysis field with your post-call analysis data [(3) ]() .
Note that post-call analysis fields are not populated for non-connected calls or calls where no conversation happened [(2) ]() .
**AI Evy
11/20/2025, 5:48 AMAI Evy
11/20/2025, 5:48 AMpaakaran_
11/20/2025, 5:49 AMAI Evy
11/20/2025, 5:49 AMAI Evy
11/20/2025, 5:50 AMwebhook_url parameter :
javascript
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
agent_name: 'Jarvis',
webhook_url: '<https://webhook-url-here'>
}) ;
The webhook_url field binds webhook events for that specific agent to your specified URL, and will ignore the account level webhook for this agent . You can set it to null to remove the webhook URL from the agent .
You can also configure a webhook_timeout_ms parameter, which defaults to 10000 milliseconds if not set .
## How Webhooks Work
Webhooks are event-driven messages sent from one system to another in real time [(2) ]() . When a specific event happens—like a user completing a call—your AI voice agent can trigger a webhook to notify another application and pass along relevant data .
The webhook sends JSON-formatted data to your endpoint, and the receiving system uses that data to take action .
For more detailed instructions on setting up webhooks specifically for Twilio-connected agents and receiving post-call analysis, I recommend:
- Visit [Contact Sales]()
- Visit [)
Would you like me to provide a general answer based on my knowledge of webhook configurations?AI Evy
11/20/2025, 5:50 AMAI Evy
11/20/2025, 5:50 AMpaakaran_
11/20/2025, 5:54 AMpaakaran_
11/20/2025, 5:54 AMAI Evy
11/20/2025, 5:54 AMAI Evy
11/20/2025, 5:55 AMwebhook_url parameter to receive call events [(1) ]() . This webhook will receive events for all calls handled by that agent, regardless of whether they come through Twilio or other phone providers .
javascript
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
webhook_url: '<https://webhook-url-here',>
webhook_timeout_ms: 10000
}) ;
The webhook_url binds webhook events for this agent to your specified URL and will ignore the account level webhook for this agent . You can set it to null to remove the webhook URL from the agent .
## Phone Number-Level Webhook
When creating or importing your Twilio number, you can also set an inbound_webhook_url [(2) ]() . This webhook triggers before the call connects and allows you to override agent settings or set dynamic variables for that specific call :
javascript
{
"inbound_webhook_url": "<https://example.com/inbound-webhook%22>
}AI Evy
11/20/2025, 5:55 AMcall_analyzed event at your configured webhook URL after the call completes and analysis is finished.
The agent-level webhook configuration works the same way whether your number is from Twilio, Telnyx, or purchased directly from Retell [(1) ]() .AI Evy
11/20/2025, 5:55 AMAI Evy
11/20/2025, 5:55 AMpaakaran_
11/20/2025, 5:58 AMAI Evy
11/20/2025, 5:58 AMAI Evy
11/20/2025, 5:58 AMPOST the payload to your endpoint with a timeout of 10 seconds [(1) ]() . If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times .
For phone calls specifically, when the call did not connect (like calls with dial_failed, dial_no_answer, dial_busy disconnection reason) , it will not have its call_started webhook triggered . It will still have its call_ended and call_analyzed webhook triggered .
## Check Your Webhook Event Types
Retell AI supports the following webhook events :
- `call_started`: Triggered when a new call begins
- `call_ended`: Triggered when a call completes, transfers, or encounters an error
- `call_analyzed`: Triggered when call analysis is complete
## Workspace-Level vs Agent-Level Webhooks
You can now control webhook timeouts for both workspace-level and agent-level webhooks (default 5s) [(2) ]() . Make sure you've configured the webhook at the correct level for your use case.
## Potential Issues
Since your webhook works for web calls but not phone calls, verify:
1. Your webhook endpoint returns a 2xx status code within the timeout period
2. The phone calls are actually connecting (check the disconnection reason)
3. You're listening for the correct event type (call_ended or call_analyzed for post-call data, not call_started)
If the webhook was not successful after retries, check whether your number has an inbound agent id set [(3) ]() . If it does, the call will connect to that agent . If not, the call will disconnect .AI Evy
11/20/2025, 5:59 AMAI Evy
11/20/2025, 5:59 AMpaakaran_
11/20/2025, 6:02 AMAI Evy
11/20/2025, 6:02 AMAI Evy
11/20/2025, 6:02 AMwebhook_url parameter on your agent is what controls webhook events for all calls handled by that agent .
When you set the webhook_url on an agent, it binds webhook events for that agent to your specified URL and will ignore the account level webhook for this agent .
## Webhook Event Flow
The webhook will POST the payload to your endpoint with a timeout of 10 seconds [(2) ]() . If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times .
For inbound calls specifically:
- call_started is triggered when a new call begins
- call_ended is triggered when a call completes, transfers, or encounters an error
- call_analyzed is triggered when call analysis is complete
**Important**: If the call did not connect (like calls with dial_failed, dial_no_answer, dial_busy disconnection reason) , it will not have its call_started webhook triggered . It will still have its call_ended and call_analyzed webhook triggered .
## Verify Your Configuration
Check your agent's webhook configuration using the Get Agent Versions API to confirm the webhook_url is properly set [(3) ]() . You can also verify your phone number configuration to ensure the inbound_agent_id is correctly bound [(4) ]() .
The inbound_webhook_url on the phone number is different—it's for overridiAI Evy
11/20/2025, 6:02 AMwebhook_url configured (not just the phone number's inbound_webhook_url) [(1) ]()
3. Check that your calls are actually completing successfully (not disconnecting due to dial failures) [(2) ]()
4. Ensure you're listening for call_ended or call_analyzed events for post-call data
If you've confirmed all these settings and the webhook still isn't triggering for phone calls, I recommend:
- Visit [Contact Sales]()
- Visit
Would you like me to provide more details about any specific configuration step?AI Evy
11/20/2025, 6:04 AMAI Evy
11/20/2025, 6:04 AMpaakaran_
11/20/2025, 6:14 AMAI Evy
11/20/2025, 6:14 AMAI Evy
11/20/2025, 6:14 AMAI Evy
11/20/2025, 6:15 AMAI Evy
11/20/2025, 6:15 AMpaakaran_
11/20/2025, 6:16 AMAI Evy
11/20/2025, 6:16 AMAI Evy
11/20/2025, 6:16 AMwebhook_url parameter on your agent to receive call_ended and call_analyzed events :
javascript
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
webhook_url: '<https://webhook-url-here',>
webhook_timeout_ms: 10000
}) ;
[(1) ]()
The webhook_url binds webhook events for this agent to your specified URL and will ignore the account-level webhook for this agent [(1) ]() [(3) ]() [(2) ]() .
## Step 2: Create Your Webhook Endpoint
Set up an HTTP or HTTPS endpoint that accepts POST requests [(4) ]() :AI Evy
11/20/2025, 6:16 AMjavascript
// install the sdk: <https://docs.retellai.com/get-started/sdk>
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Call started event received", call.call_id) ;
break;
case "call_ended":
console.log("Call ended event received", call.call_id) ;
break;
case "call_analyzed":
console.log("Call analyzed event received", call.call_id) ;
break;
default:
console.log("Received an unknown event:", event) ;
}
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;
## Step 3: Test Your Endpoint Locally
Before deploying, test with this CURL command :
curl --location 'localhost:8080/webhook' \
--header 'Content-Type: application/json' \
--data '{
"event": "call_ended",
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"start_timestamp": 1714608475945,
"end_timestamp": 1714608491736,
"disconnection_reason": "user_hangup",
"transcript": "...",
"opt_out_sensitive_data_storage": false
}
}'
## Step 4: Deploy Your Endpoint
Use ngrok to make your local endpoint accessible :
brew install ngrok/ngrok/ngrok
ngrok http <http://localhost:8080>AI Evy
11/20/2025, 6:16 AMinbound_webhook_url on the phone number is different—it triggers before the call connects and provides minimal information like from_number and to_number [(5) ]() [(6) ]() . This is for overriding agent settings, not for receiving post-call data [(5) ]() .
- For post-call transcripts and analysis, you need the agent-level webhook_url to receive call_ended and call_analyzed events [(1) ]() [(3) ]() [(2) ]() .
- Your webhook must return a 2xx status code within 10 seconds, or it will be retried up to 3 times [(4) ]() .
## Webhook Configuration Options
You have two options for registering webhooks :
Option 1: Account-level webhook - Set up through system settings' webhooks tab for events related to any agent under your account .
Option 2: Agent-level webhook - Set up through the agent configuration (as shown above) [(4) ]() [(1) ]() . When set, account-level webhooks will not be triggered for that agent .
---
**AI Evy
11/20/2025, 6:16 AMAI Evy
11/20/2025, 6:16 AMpaakaran_
11/20/2025, 6:32 AMAI Evy
11/20/2025, 6:32 AMAI Evy
11/20/2025, 6:32 AMcall_id using only the from_number, to_number, and agent_id as search parameters.
However, when you create or register a phone call, the API response includes the call_id along with the phone numbers and agent information [(1) ]() [(2) ]() . Here's how the response looks:
json
{
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound"
}
## Alternative Approaches
Since there's no search endpoint with these specific parameters, you would need to:
1. Store the call_id when you receive webhook events (call_started, call_ended, or call_analyzed) , which include both the call_id and phone numbers in the payload
2. Use the List Calls API (if available in your implementation) to retrieve recent calls and filter by phone numbers and agent ID on your end
3. Implement your own mapping in your database that associates phone numbers and agent IDs with call IDs when calls are initiated or when webhook events are received
The call_id is generated by Retell when a call is created or registered [(1) ]() [(3) ]() [(2) ]() , so you'll need to capture it at that point rather than querying for it later using just phone numbers and agent ID.
---
**AI Evy
11/20/2025, 6:33 AMAI Evy
11/20/2025, 6:33 AMpaakaran_
11/20/2025, 6:34 AMpaakaran_
11/20/2025, 6:34 AMAI Evy
11/20/2025, 6:34 AMAI Evy
11/20/2025, 6:35 AMinbound_webhook_url together with a conversation flow agent, the webhook configuration doesn't work properly [(1) ]() . Specifically, if you add a webhook URL to the phone number and then save your conversation agent, the webhook on the phone number is lost . Additionally, the phone number level webhook and agent level webhook cannot be used together, which is critical for receiving post-call events .
Here's what you need to verify:
## Critical Configuration Check
1. **Agent-level webhook**: Ensure your agent has webhook_url configured [(2) ]() [(3) ]() [(4) ]() . This is separate from the phone number's inbound_webhook_url [(5) ]() .
2. **Phone number configuration**: Check that your phone number has the correct inbound_agent_id set [(6) ]() . The phone number should look like this:
json
{
"phone_number": "+14157774444",
"inbound_agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"inbound_webhook_url": "<https://example.com/inbound-webhook%22>
}AI Evy
11/20/2025, 6:35 AMinbound_webhook_url on the phone number triggers before the call connects and provides minimal information like from_number and to_number [(5) ]() . For post-call events (call_ended, call_analyzed) , you must use the agent-level webhook_url [(7) ]() [(8) ]() .
## Webhook Event Behavior
The webhook will POST the payload to your endpoint with a timeout of 10 seconds [(7) ]() . If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times .
When the call did not connect (like calls with dial_failed, dial_no_answer, dial_busy disconnection reason) , it will not have its call_started webhook triggered . It will still have its call_ended and call_analyzed webhook triggered .
## Troubleshooting Steps
Given the known issue with conversation flow agents and phone number webhooks [(1) ]() , try this:
1. Remove the inbound_webhook_url from your phone number entirely
2. Configure only the agent-level webhook_url [(2) ]() [(4) ]()
3. Verify your endpoint returns a 2xx status within 10 seconds [(7) ]()
4. Test an inbound call again
If this still doesn't work after removing the phone number webhook, contact support:
- Visit [Contact Sales]()
- Visit [)
Would you like me to provide a general answer based on my knowledge instead?
**AI Evy
11/20/2025, 6:35 AMAI Evy
11/20/2025, 6:35 AM