https://retellai.com/?utm_source=discord&utm_medium=seo logo
The Retell API sent a call_ended event after 28 se...
# ❓・ai-evy-support
c
@AI Evy The Retell API sent a call_ended event after 28 seconds. The logs show "disconnect from room" which means Retell's WebRTC connection was closed. This is why the AI stopped responding - the call genuinely ended on Retell's servers.
a
Thanks for tagging me @cnwoke24_66267. I'll look through relevant sources and get back to you shortly.
### Answer Based on the information you've provided about the
call_ended
event and "disconnect from room" in your logs, this indicates the WebRTC connection was closed on Retell's side [(1) ]() . When a call disconnects, you can check the
disconnection_reason
field to understand why the call ended [(2) ]() . The
call_ended
webhook event is triggered when a call completes, transfers, or encounters an error, and includes all fields from the call object except
call_analysis
[(1) ]() . Common disconnection reasons include [(2) ]() : -
user_hangup
- user hung up the call -
agent_hangup
- AI agent hung up the call -
inactivity
- call terminated due to long inactivity based on "end_call_after_silence_ms" setting -
max_duration_reached
- call terminated due to maximum duration reached -
error_user_not_joined
- user did not join web call within 30s after calling startWebCall -
error_no_audio_received
- has not received audio from Twilio or web frontend for a while after connection established For web calls specifically, if the user doesn't join within 30 seconds, the call will disconnect with reason
error_user_not_joined
. To investigate further, you can: 1. Check the
disconnection_reason
field in your
call_ended
webhook payload [(1) ]() [(2) ]() 2. Review the call details using the Get Call API with your call_id to see the full disconnect reason [(2) ]() 3. Check the
public_log_url
for detailed request/response information and latency tracking [(3) ]
() If you're experiencing unexpected disconnections, you may also want to verify your LLM WebSocket connection is stable and responding to ping_pong events if you have
auto_reconnect
enabled [(4) ]() [(5) ]() . **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
@AI Evy reply to my last message
a
Thanks for the follow-up, @cnwoke24_66267. I'll get back to you soon.
### Answer Based on your previous message about the
call_ended
event after 28 seconds with "disconnect from room" logs, this indicates the WebRTC connection closed on Retell's side [(1) ]() . To understand why the call ended, check the
disconnection_reason
field in the call object [(2) ]() . The webhook will contain this information in the payload [(1) ]() :
Copy code
json
{
  "event": "call_ended",
  "call": {
    "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
    "disconnection_reason": "user_hangup",
    ...
  }
}
Common disconnection reasons that could explain a 28-second call include [(2) ]() : -
user_hangup
- user hung up the call -
agent_hangup
- AI agent hung up the call -
inactivity
- call terminated due to the "end_call_after_silence_ms" setting -
error_user_not_joined
- user did not join web call within 30s -
error_no_audio_received
- no audio received from the frontend for a while after connection You can retrieve the full call details including the disconnection reason using the Get Call API or by checking your
call_ended
webhook payload [(2) ]() [(1) ]() . The
public_log_url
field in the call object will provide detailed debugging information about the disconnection [(3) ]() [(4) ]() .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[3] Update Call](https://docs.retellai.com/api-references/update-call) [[4] Create Web Call](https://docs.retellai.com/api-references/create-web-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy how do i do this In Retell dashboard, check your agent’s settings: end_call_after_silence_ms: increase to 30000–60000 (30–60s) max_call_duration_ms: set high enough (e.g., 10–15 minutes) Backchannel/barge-in enabled if you want the agent to keep engaging even with small pauses
a
Thanks for the follow-up, @cnwoke24_66267. I'll get back to you soon.
### Answer To configure these agent settings, you can adjust them either through the Retell dashboard or via the API when creating or updating an agent [(1) ]() [(2) ]() . Via API: When creating or updating an agent, you can set these parameters :
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
 apiKey: 'YOUR_RETELL_API_KEY',
}) ;
[(1) ]() **end_call_after_silence_ms**: If users stay silent for a period after agent speech, end the call. The minimum value allowed is 10,000 ms (10 s) . By default, this is set to 600000 (10 min) [(1) ]() [(2) ]() . **max_call_duration_ms**: Maximum allowed length for the call, will force end the call if reached. The minimum value allowed is 60,000 ms (1 min) , and maximum value allowed is 7,200,000 (2 hours) . By default, this is set to 3,600,000 (1 hour) . **enable_backchannel**: Controls whether the agent would backchannel (agent interjects the speaker with phrases like "yeah", "uh-huh" to signify interest and engagement) . Backchannel when enabled tends to show up more in longer user utterances. If not set, agent will not backchannel . **interruption_sensitivity**: Controls how sensitive the agent is to user interruptions. Value ranging from [0,1]. Lower value means it will take longer / more words for user to interrupt agent, while higher value means it's easier for user to interrupt agent. If unset, default value 1 will apply. When this is set to 0, agent would never be interrupted . **Note**: There's a known issue where the
end_call_after_silence_ms
parameter may not override the dashboard timeout setting in some cases [(3) ]() . If you're experiencing this, you may need to adjust both the API parameter and the dashboard setting to ensure they align. **
​ To learn more, see the sources I considered: [[1] List Agents](https://docs.retellai.com/api-references/list-agents) [[2] Get Agent](https://docs.retellai.com/api-references/get-agent) [[3] Issue with end_call_after_silence_ms in create agent](https://discord.com/channels/1186424376300679209/1379512520619982869) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
@AI Evy can a conversational agent send a text message to someone they are on a call with?
a
Thanks for the follow-up, @cnwoke24_66267. I'll get back to you soon.
### Answer ### Answer Yes, a conversational agent can send an SMS to someone they are on a call with using the Send SMS tool [(1) ]() . This tool sends a one-way SMS from the current agent number to the user's number during a phone call . Requirements: - The phone number must have SMS enabled - Currently, only Retell Twilio numbers support SMS capabilities - SMS capabilities are limited to US numbers only [(2) ]() How it works: The agent will tell the user that the SMS is being sent when invoking this tool [(1) ]() . You can configure the SMS content either by writing a prompt to let the agent infer the content, or by using static SMS content with dynamic variable support . To enable SMS: You'll need to go through an application and approval process [(2) ]() : 1. Get approved for a business profile (free) 2. Get approved for a brand ($4 for low-volume or $45 for standard) 3. Get approved for an SMS campaign ($15 one-time fee) This feature enables use cases like sending booking confirmations, payment links, or follow-up instructions while still on a call with the customer [(3) ]() [(4) ]() . **
​ To learn more, see the sources I considered: [[1] Send SMS](https://docs.retellai.com/build/single-multi-prompt/send-sms) [[2] Enable SMS capabilities](https://docs.retellai.com/deploy/enable-sms) [[3] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[4] 7 High-Volume Customer-Service Workflows You Can Fully Automate with Retell's Voice↔SMS Super-Agent in 2025 (Password Resets to Upsell Surveys)](https://www.retellai.com/resources/7-high-volume-customer-service-workflows-automate-retell-voice-sms-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
c
what are retell teilio numbers? if i buy a number through retell, does it automatically make it a twilio number ?
@AI Evy what are retell teilio numbers? if i buy a number through retell, does it automatically make it a twilio number ?
a
Thanks for the follow-up, @cnwoke24_66267. I'll get back to you soon.
### Answer ### Answer Retell Twilio Numbers are phone numbers that Retell AI purchases and manages through their own Twilio account on your behalf [(1) ]() [(2) ]() . When you buy a number through Retell's dashboard, yes, it automatically becomes a "retell-twilio" type number . There are three types of phone numbers in Retell AI [(1) ]() [(2) ]() [(3) ]() : 1.
retell-twilio
- Numbers purchased through Retell's interface, managed by Retell's Twilio account [(1) ]() [(2) ]() 2.
retell-telnyx
- Numbers purchased through Retell's interface, managed by Retell's Telnyx account 3.
custom
- Numbers you bring from your own telephony provider (like your own Twilio, Telnyx, or Vonage account) [(1) ]() [(2) ]() [(4) ]() When you purchase a number directly through Retell, you don't need your own Twilio account - Retell handles the telephony infrastructure for you [(5) ]() . This is the simplest option for getting started . The
phone_number_type
field in the API response will show which type your number is [(1) ]() [(2) ]() :
Copy code
json
{
  "phone_number": "+14157774444",
  "phone_number_type": "retell-twilio",
  "phone_number_pretty": "+1 (415) 777-4444"
}
[(1) ]() , [(2) ]() So to directly answer your question: yes, when you buy a number through Retell's dashboard, it automatically becomes a Retell Twilio number (
retell-twilio
type) [(1) ]() [(2) ]() [(5) ]() . **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.