https://retellai.com/?utm_source=discord&utm_medium=seo logo
How to end a call
# ❓・ai-evy-support
o
@AI Evy How to end a call? the agent has been in a call for almost 30 mins now
a
Thanks for tagging me @omarkadry. I'll look through relevant sources and get back to you shortly.
### Answer You have several options to end a call in Retell AI: ## Built-in Timeout Settings Your agents have automatic timeout controls that should prevent 30-minute calls. You can configure these when creating or updating an agent: - `end_call_after_silence_ms`: Ends the call after a period of silence (minimum 10,000 ms, default 600,000 ms / 10 minutes) [(1) ]() - `max_call_duration_ms`: Maximum allowed call length (minimum 60,000 ms, maximum 7,200,000 ms, default 3,600,000 ms / 1 hour) ## Programmatic End Call You can end calls programmatically using the
end_call
parameter when streaming responses [(2) ]() . However, be aware that there may be timing issues where the call ends before the final AI message is spoken . ## Configuration Example When creating an agent, you can set these timeout values:
Copy code
javascript
const agentResponse = await client.agent.create({
  response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
  voice_id: '11labs-Adrian',
  end_call_after_silence_ms: 600000,
  max_call_duration_ms: 3600000
}) ;
[(1) ]() If your agent has been in a call for 30 minutes despite these settings, check your agent configuration to ensure the timeout parameters are properly set. The default
max_call_duration_ms
is 1 hour, so a 30-minute call would still be within limits unless you've configured shorter durations .
​ To learn more, see the sources I considered: [[1] Create Agent](https://docs.retellai.com/api-references/create-agent) [[2] Calling end_call programatically ends the call before the final AI message is spoken out](https://discord.com/channels/1186424376300679209/1346423473765093376) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
o
I didn't configure it, but I want it to end now, how to end it?