Hangup Methods
Dialgen offers two methods for intelligent call termination:
Silence Detection
Automatically end calls when no audio is detected:
- Unit: Seconds
- Default: 10
- Recommended: 8-15 seconds
How It Works
- Timer starts when agent finishes speaking
- Timer resets if user speaks
- If timer reaches threshold, call ends
- Hangup message plays (if configured)
- Call terminates
Recommended Timeouts
| Use Case | Timeout |
|---|
| Quick inquiries | 8-10s |
| Standard support | 10-15s |
| Complex consultations | 15-20s |
Too short may disconnect during natural pauses. Too long wastes time and credits.
Prompt-Based Detection
Add hangup logic to your agent prompt:
HANGUP RULES:
- End the call when the customer says "goodbye," "that's all," or "thank you, bye"
- End when the customer confirms their issue is resolved
- End when the customer says they have no more questions
- Always thank the customer before ending
Example Prompt
You are a customer support agent for Acme Corp.
Your goal is to help customers and resolve their issues.
HANGUP DETECTION:
A conversation is complete when:
1. The customer explicitly says they want to end the call
2. The customer confirms their issue is fully resolved
3. The customer says they have no further questions
When ending the call:
- Thank the customer for calling
- Confirm their issue is resolved
- Offer to help again in the future
- Say goodbye warmly
Prompt-based detection relies on AI interpretation and may not be 100% accurate. Test thoroughly.
Hangup Messages
Configure a custom closing message:
{
"hangupMessage": "Thank you for calling Acme Corp, {name}. Have a wonderful day!"
}
Available Variables
{name} - Contact’s name
{company} - Contact’s company
{email} - Contact’s email
- Any custom metadata variables
Examples
Professional:
Thank you for your time, {name}. If you need further assistance, please don't hesitate to call us back.
Friendly:
Thanks so much for chatting with me today, {name}! Have an awesome day!
Multilingual (Spanish):
Gracias por llamar, {name}. ¡Que tenga un excelente día!
Combining Methods
Use both silence detection and prompt-based hangup:
{
"silenceTimeout": 12,
"hangupMessage": "Thank you for calling, {name}!"
}
HANGUP RULES:
- End when customer says goodbye or confirms they're done
- End when issue is fully resolved
- If there's silence for more than 10 seconds, ask: "Are you still there? Is there anything else I can help with?"
Benefits
- Silence detection: Catches abandoned calls
- Prompt-based: Natural, context-aware endings
- Hangup message: Professional closing
Hangup Status Codes
Track why calls ended:
| Status | Description |
|---|
COMPLETED | Call ended normally |
USER_HANGUP | User hung up |
SILENCE | Ended due to silence timeout |
TIMEOUT | Reached maximum duration |
FAILED | Technical error |
Status codes are available in call metrics and webhook payloads.
Troubleshooting
Calls Ending Too Early
Solutions:
- Increase silence timeout to 15-20 seconds
- Make hangup conditions more specific
- Review call recordings
Calls Running Too Long
Solutions:
- Decrease silence timeout to 8-10 seconds
- Add explicit hangup conditions to prompt
- Implement duration limits
Next Steps