### Answer
Yes, custom functions work
synchronously during live calls [(1) ](
) [(2) ](
) . When the LLM determines a function is needed, Retell sends a POST request to your specified endpoint with the function name and parameters [(1) ](
) . The agent can receive and use the response immediately during the conversation [(2) ](
) .
How it works:
1. **Agent Decision**: The LLM determines when a function is needed based on conversation context
2. **Parameter Extraction**: The agent extracts required information from the conversation
3. **Function Execution**: Retell calls your function with the extracted parameters
4. **Response Handling**: The function result is processed and incorporated into the conversation
The function calling uses structured JSON to communicate between the LLM and your systems :
json
{
"function": "book_appointment",
"arguments": {
"date": "2024-03-15",
"time": "14:00",
"customer_name": "John Smith"
}
}
Custom functions enable real-time actions like checking availability, booking appointments, processing orders, retrieving information from CRMs, and updating records—all during the live call .