https://retellai.com/?utm_source=discord&utm_medium=seo logo
a
@AI Evy Hi!!! Can a bot trigger a webhook during a call?
a
Thanks for tagging me @alisaochka. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Webhook](https://www.retellai.com/glossary/webhook) [[3] Retell AI Webhooks | AI Voice Agents With Live Data | Retell AI](https://www.retellai.com/blog/retell-ai-webhooks-feature) ​
### Answer --- Yes, Retell AI supports webhook events that are triggered during and after calls [(1) ]() . The platform supports three main webhook event types : -
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 Webhooks allow your AI voice agents to take real-world actions and integrate with other systems in real-time [(2) ]() . When specific events happen during a call, your AI agent can trigger a webhook to notify another application and pass along relevant data . The webhook system uses HTTP POST requests with a 10-second timeout and will retry up to 3 times if no success status (2xx) is received [(1) ]() . Webhooks are triggered in order but are non-blocking - for example, if the
call_started
webhook fails, the
call_ended
webhook can still be triggered . For security, Retell AI includes an
x-retell-signature
header in webhook requests that allows you to verify the authenticity of the request [(3) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the feedback, glad I was helpful.
a
@AI Evy We also need to pass variables into the call, is that possible?
a
Thanks for the follow-up, @alisaochka. I'll get back to you soon.
### Answer Yes, you can pass variables into calls using dynamic variables [(1) ]() [(2) ]() . Retell AI supports this through several methods: For Inbound Calls: You can set dynamic variables through the inbound call webhook response [(1) ]() :
Copy code
json
{
 "call_inbound": {
 "override_agent_id": "agent_12345",
 "override_agent_version": 1,
 "dynamic_variables": {
 "customer_name": "John Doe"
 },
 "metadata": {
 "random_id": "12345"
 }
 }
}
For Outbound Calls: You can pass dynamic variables directly when creating the call using the
retell_llm_dynamic_variables
parameter [(3) ]() . For outbound calls, since your application already knows the number it's calling, you can fetch the required details and pass them in the create phone call API . For Web Calls: You can include dynamic variables when creating a web call [(2) ]() :
Copy code
json
{ "customer_name": "John Doe" }
Dynamic variables are key-value pairs of strings that inject into your Response Engine prompt and tool description . They allow you to personalize conversations based on caller information or other contextual data [(1) ]() .
​ To learn more, see the sources I considered: [[1] Inbound call webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Create Web Call](https://docs.retellai.com/api-references/create-web-call) [[3] Outbound webhook url](https://discord.com/channels/1186424376300679209/1285612548628025394) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy are mid-call webhook triggers are supported?
a
Thanks for the follow-up, @alisaochka. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Calling Webhooks In The Middle of A Call](https://discord.com/channels/1186424376300679209/1376986877927886979) ​
### Answer Based on the available documentation, Retell AI does not support mid-call webhook triggers in the traditional sense [(1) ]() . The webhook events are designed to trigger at specific call lifecycle points : -
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 However, if you need to interact with external systems during a call, you should use custom functions (also called tool calling) instead [(2) ]() . Custom functions allow the AI agent to call external APIs and retrieve data in real-time during the conversation . As one community member explained: "you'll have a list-products custom function, and when posting it, format it using the json parameters, the llm will know where it grabbed the data from" . The function can be called whenever needed during the call based on the conversation flow . This approach allows you to: - Search for available products during the call - Match leads to specific products based on their responses - Get real-time data and inject it as variables during the conversation So while mid-call webhooks aren't supported, custom functions provide the real-time integration capabilities you're likely looking for during active calls .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.