Based on the available sources, there was a similar case where webhook URL changes weren’t being applied correctly(1). The Retell support team identified that the old webhook URL was still configured in the settings, not the new one(1).
Here are the troubleshooting steps to resolve this:
Verify your webhook configuration:
- Check that your new webhook URL is correctly saved in Settings → Webhooks(1)
- Ensure your phone number or agent is using the correct agent version that references the updated webhook URL(1)
Secure your webhook endpoint:
When setting up your webhook endpoint, you should verify incoming requests using the Retell signature to prevent unauthorized access(2)(3). Here’s how to implement verification:
// install the sdk: https://docs.retellai.com/get-started/sdk
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express();
app.use(express.json());
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Call started event received", call.call_id);
break;
case "call_ended":
console.log("Call ended event received", call.call_id);
break;
case "call_analyzed":
console.log("Call analyzed event received", call.call_id);
break;
default:
console.log("Received an unknown event:", event);
}
// Acknowledge the receipt of the event
res.status(204).send();
});
(2)
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from retell import Retell
retell = Retell(api_key=os.environ["RETELL_API_KEY"])
@app.post("/check-weather")
async def check-weather(request: Request):
try:
post_data = await request.json()
valid_signature = retell.verify(
json.dumps(post_data, separators=(",", ":"), ensure_ascii=False),
api_key=str(os.environ["RETELL_API_KEY"]),
signature=str(request.headers.get("X-Retell-Signature")),
)
if not valid_signature:
print(
"Received Unauthorized",
post_data["event"],
post_data["data"]["call_id"],
)
return JSONResponse(status_code=401, content={"message": "Unauthorized"})
args = post_data["args"]
if args["city"] == "New York":
return JSONResponse(status_code=200, content={"result": "25f and sunny"})
else:
return JSONResponse(status_code=200, content={"result": "20f and cloudy"})
except Exception as err:
print(f"Error in webhook: {err}")
return JSONResponse(
status_code=500, content={"message": "Internal Server Error"}
)
(3)
You can also secure your server by allowlisting Retell’s IP address: 100.20.5.228(3).
Contact Retell support:
For direct assistance with your specific webhook configuration issue, you can:
The support team can review your agent ID and call logs to identify the root cause, similar to how they resolved the previous caching issue(1).