### Answer
When implementing custom functions, there are a few key things to verify:
Verify Request Signature
Make sure to verify that requests are coming from Retell by checking the X-Retell-Signature header [(1)](
) . This is important for security and proper function execution.
Test Function Implementation
The LLM Playground allows you to test your AI agents without making actual calls [(2)](
) . However, in real voice calls, there may be additional considerations:
1. Function response timing - Voice calls require proper handling of streaming responses [(3)](
)
2. Request verification - Verify the request signature in your endpoint implementation [(1)](
)
Example verification code:
javascript
import { Retell } from "retell-sdk";
this.app.post("/check-weather", async (req: Request, res: Response) => {
if (
!Retell.verify(
JSON.stringify(req.body),
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) {
console.error("Invalid signature");
return;
}