https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> 404 error using custom web ...
# ❓・ai-evy-support
t
@AI Evy 404 error using custom web hook
a
Thanks for tagging me @trill_og.sol. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Debug call disconnection]() * [Register the webhook]() * [Setup WebSocket Server]() * [Troubleshooting Guide]() -----------------------------
### Answer Here are some troubleshooting steps for webhook 404 errors: 1. Test your endpoint locally first before deploying:
Copy code
bash
curl --location 'localhost:8080/webhook' \
--header 'Content-Type: application/json' \
--data '{
  "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": "...",
    "opt_out_sensitive_data_storage": false
  }
}'
[(1)]() 2. Verify your webhook URL format: - Check for trailing slashes - some server setups don't allow trailing slashes [(2)]() - Correct format:
https://example.com/websocket
- Incorrect format:
https://example.com/websocket/
3. For local development testing, you can use ngrok to expose your local endpoint [(1)]() :
Copy code
bash
brew install ngrok/ngrok/ngrok
ngrok http http://localhost:8080
4. Verify requests are coming from Retell by checking the
X-Retell-Signature
header [(3)]() 5. You can also secure your server by allowlisting Retell's IP address:
100.20.5.228
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.