https://retellai.com/?utm_source=discord&utm_medium=seo logo
So the problem I'm having is that retell sends web...
# ❓・ai-evy-support
t
So the problem I'm having is that retell sends webhook notification twice after a call has ended. What's really happening @AI Evy
a
Thanks for tagging me @thetechjackie. I'll look through relevant sources and get back to you shortly.
### Answer Based on the webhook documentation, Retell AI has a specific retry mechanism that could explain duplicate notifications [(1) ]() . The webhook system will retry failed webhook deliveries up to 3 times if no success status (2xx) is received within the 10-second timeout . Here are the most likely causes for receiving duplicate webhook notifications: 1. Webhook Endpoint Response Issues If your webhook endpoint doesn't return a 2xx status code within 10 seconds, Retell will retry the webhook up to 3 times . This could result in multiple notifications for the same
call_ended
event . 2. Multiple Event Types Retell AI sends different webhook events for each call : -
call_started
- when a new call begins -
call_ended
- when a call completes, transfers, or encounters an error -
call_analyzed
- when call analysis is complete Make sure you're not confusing
call_ended
and
call_analyzed
webhooks, as both fire after a call ends . To troubleshoot: 1. Ensure your webhook endpoint returns a 2xx status code quickly 2. Check your webhook logs to see if you're receiving retries of the same event 3. Verify you're handling the correct event type in your webhook payload 4. Consider implementing idempotency checks using the
call_id
to prevent duplicate processing The webhook payload includes the event type and call object, so you can use the
call_id
to deduplicate notifications .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
Okay the issue im having is that the webhook has no event type or call_id, why exactly is this happening? @AI Evy
a
Thanks for the follow-up, @thetechjackie. I'll get back to you soon.
### Answer If your webhook is missing the
event
type and
call_id
, this indicates a fundamental issue with how the webhook payload is being received or parsed [(1) ]() . According to the webhook specification, every Retell AI webhook should contain both the event type and call object with the call_id . The expected payload structure is:
Copy code
json
{
 "event": "call_ended",
 "call": {
 "call_type": "phone_call",
 "from_number": "+12137771234",
 "to_number": "+12137771235",
 "direction": "inbound",
 "call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
 "agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
 "call_status": "registered",
 "metadata": {},
 "retell_llm_dynamic_variables": {
 "customer_name": "John Doe"
 },
 "start_timestamp": 1714608475945,
 "end_timestamp": 1714608491736,
 "disconnection_reason": "user_hangup",
 "transcript": "...",
 "transcript_object": [ [Object], [Object], [Object], [Object] ],
 "transcript_with_tool_calls": [ [Object], [Object], [Object], [Object] ],
 "opt_out_sensitive_data_storage": false
 }
}
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Setup guide](https://docs.retellai.com/features/register-webhook) ​
Potential causes for missing event type and call_id: 1. Webhook endpoint parsing issue - Your endpoint might not be correctly parsing the JSON payload [(2) ]() 2. Incomplete webhook registration - The webhook URL might not be properly configured in your agent settings 3. Network/proxy interference - Something between Retell and your endpoint might be modifying the payload 4. Content-Type handling - Your endpoint might not be handling
application/json
content type correctly To troubleshoot: 1. Log the raw request body and headers at your webhook endpoint 2. Verify your webhook endpoint accepts POST requests with
application/json
content type 3. Test your endpoint locally using the provided CURL command from the setup guide 4. Check that your webhook URL is correctly configured in the Retell dashboard If the payload structure is completely different from what's documented, this could indicate you're receiving webhooks from a different source or there's a configuration issue with your webhook setup.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
Okay let's say that I have an agent in German, and I can't speak English to test how it's working. What can I do to solve this issue? @AI Evy
a
Thanks for the follow-up, @thetechjackie. I'll get back to you soon.
### Answer To test a German-speaking agent without speaking German yourself, you have several options: 1. Use the Test Button in Dashboard You can use the Test button in the Global Settings to simulate conversations [(1) ]() . This allows you to test the agent's responses without making actual phone calls. 2. Set Up Multilingual Support You can configure your agent to support multiple languages by setting the language field to
multi
in the Create Agent API [(2) ]() [(3) ]() :
Copy code
json
{
  "language": "multi"
}
The
multi
option enables multilingual support, currently supporting Spanish and English [(3) ]() . However, this may not include German specifically. 3. Available German Language Options You can set the language to German using the language codes available in the API [(2) ]() [(3) ]() : -
de-DE
for German (Germany) 4. Testing Approach Since the language setting determines what language the agent understands (speech-to-text) and influences the default TTS model choice [(4) ]() , you could: - Have a German-speaking colleague test the agent - Use text-to-speech tools to generate German audio for testing - Create simple test phrases in German to verify basic functionality Note on Language Enforcement The language setting will not enforce the agent to generate responses in German - you need to set that in the prompt by adding something like "always respond in German" .
​ To learn more, see the sources I considered: [[1] AI Phone Agents for Multilingual Communication | Retell AI](https://www.retellai.com/blog/how-to-use-ai-phone-agents-for-multilingual-communication) [[2] Create Agent](https://docs.retellai.com/api-references/create-agent) [[3] Create Agent](https://docs.retellai.com/api-references/create-agent) [[4] Set language for your agent](https://docs.retellai.com/agent/language) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.