https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a feature to detect if a call is complete
# ❓・ai-evy-support
b
@AI Evy is there a feature to detect if a call is complete? eg if the call is hung up or something, reason i am asking is to set up a caller that keeps on calling eg calls 20 people, if 1 hangs up then it calls 1 more next on the list etc
a
Thanks for tagging me @Blekk. I'll look through relevant sources and get back to you shortly.
### Answer --- Yes, you can detect when a call is complete by checking the
disconnection_reason
field on the call object. [(1) ]() Common disconnection reasons that indicate a completed call include: -
user_hangup
– user hung up the call -
agent_hangup
– AI agent hung up the call -
call_transfer
– AI agent transferred the call -
voicemail_reached
– voicemail was reached -
inactivity
– call ended due to silence timeout -
max_duration_reached
– maximum call duration reached You can retrieve this information via the [Get Call API]() or by subscribing to webhooks. For your use case of maintaining a rolling dialer (calling the next person when one call ends) , you'd typically: 1. Subscribe to the
call.ended
webhook event to receive real-time notifications when calls complete 2. Check the
call_status
(e.g.,
ended
,
not_connected
,
error
) and
disconnection_reason
, [(2) ]() 3. Trigger the next outbound call from your backend when you receive the webhook The
call_status
values include
ended
,
not_connected
, and
error
, each paired with specific disconnection reasons. [(1) ]() , [(2) ]()
​ To learn more, see the sources I considered: [[1] Debug call disconnection](https://docs.retellai.com/reliability/debug-call-disconnect) [[2] Update Call](https://docs.retellai.com/api-references/update-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy For my first node in my conversational flow this is my prompt: Greet the caller in a friendly, professional tone and clearly explain the available options. Ask them to choose by pressing a number on their phone. Say something like: "Hi, it’s Emma from Grammar Electrical. Please select an option: Press 1 for a quote request. Press 2 to book a job. Press 3 for invoice queries. Press 4 for anything else." If there’s no input, politely repeat the options once. --- What is happening is that the IVR system before the Ai agent has a little ending that says 'grena' and this is being picked up by my ai agent, and it assumes that the name is Grena, I need to add something in the prompt to NOT COLLECT ANY INFORMATION for ANYTHING, its only purpose is routing the person to the next agent
a
Thanks for the follow-up, @Blekk. I'll get back to you soon.
### Answer --- You can add explicit guardrails to your first node's prompt to prevent the agent from interpreting any background audio or IVR remnants as caller information. [(1) ]() Try restructuring your prompt using sectional formatting:
Copy code
## Identity
You are Emma, a routing assistant for Grammar Electrical.
Your ONLY purpose is to route callers to the correct department.

## Style Guardrails
Be concise: Keep responses under 2 sentences unless explaining complex topics.
Be conversational: Use natural language, contractions, and acknowledge what the caller says.

## Response Guidelines
Do NOT collect, store, or acknowledge any names, personal details, or information from the caller.
Ignore any background noise, fragments, or unclear audio at the start of the call.
Only listen for DTMF tones (1, 2, 3, or 4) or spoken menu choices.

## Task Instructions
Greet the caller and present the menu options:
- Press 1 for a quote request
- Press 2 to book a job
- Press 3 for invoice queries
- Press 4 for anything else

If no valid input is detected, politely repeat the options once.
The key additions are: - Explicitly stating the agent should ignore any background noise or fragments at call start - Instructing it to not collect any names or personal details - Limiting what it listens for to only DTMF tones or spoken menu choices This structured approach with clear guardrails should prevent the agent from misinterpreting "grena" as a caller name.
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy I got a customer asking: Can you confirm how it works from my mobile phone? For example, if someone calls my mobile number and I decline, will that go to AI assistance? Will my phone have any apps to do this, and what will happen if a direct call is missed or declined? How does Retell work with integrating with declined calls and then forwarding to the ai agent as a last resort?
a
Thanks for the follow-up, @Blekk. I'll get back to you soon.
### Answer --- Retell AI itself doesn't provide a mobile app or native integration that sits directly on your personal mobile phone to intercept declined/missed calls. The call forwarding to an AI agent is typically configured at the telephony/carrier level, not within Retell. Here's how it generally works: *The Setup (Outside Retell) * Your mobile carrier or business phone system needs to be configured to forward calls to the AI agent's phone number when: - The call is declined - The call goes unanswered - The line is busy This is standard call forwarding functionality (often called "conditional call forwarding") that you'd set up through your carrier or PBX system. What Retell Handles Once the call is forwarded to a Retell-connected phone number, the AI agent takes over. [(1) ]() Retell supports 24/7 call coverage and can handle overflow calls, after-hours calls, and missed call scenarios. For custom telephony setups, Retell supports SIP trunking where you can configure your telephony provider to route calls to Retell's SIP server. [(2) ]() No Retell Mobile App Required Your customer won't need any apps on their phone. The forwarding happens at the network level before reaching Retell. To implement this, your customer would need to: 1. Set up conditional call forwarding with their carrier to a Retell-connected number 2. Have a Retell agent configured to handle those inbound calls Check out these potentially useful sources for more on telephony setup: [Custom Telephony]() , [Twilio Integration]()
​ To learn more, see the sources I considered: [[1] 2025 B2B Guide to AI Phone Calls & Voice Agents | Retell AI | Retell AI](https://www.retellai.com/blog/b2b-guide-to-ai-phone-calls) [[2] AI Voice Agent + SIP trunk: SIP BYE / end call handling](https://community.retellai.com/t/ai-voice-agent-sip-trunk-sip-bye-end-call-handling/764) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.