For your workflow (voice agent answers, looks up caller number, makes an API call, then adjusts language/tone/accent and passes the response to the LLM) :
1.
Custom Function Setup:
- In the dashboard, add a custom function to call your API using the caller’s phone number (available as a dynamic variable) .
- Configure the endpoint, HTTP method, headers, query params, and parameter schema as needed .
2.
Dynamic Variables:
- Extract values from your API response (e.g., language or accent) and save them as dynamic variables, which can be referenced later in the conversation flow .
3.
Controlling Language/Accent:
- Use the dynamic variable from the custom function response to set the agent’s language, tone, or accent in subsequent nodes or prompts. (Direct control of voice features via function response is not explicitly documented, but you can set dynamic variables and use them in prompts or conditions.)
4.
Passing API Response to LLM:
- The custom function’s response can be passed to the LLM by referencing the extracted dynamic variable in your agent’s prompt or as part of the conversation .
If you’re still getting 400 errors, double-check your JSON schema, ensure required fields are present, and that your endpoint is reachable. Also, confirm your headers and authentication are correct .
More details: [Integrate any system with custom function](
)