Based on your description, there are several potential issues that could prevent your custom function from executing in the conversation flow:
1. Tool Configuration in State
When you add a tool as “Optional” in a state, the LLM decides whether to call it based on the conversation context and prompt instructions.(1) If the agent is calling end_call immediately, the LLM may be prioritizing that function over your custom function.
2. Prompt Engineering
The effectiveness of function calling depends heavily on how you describe when the function should be called in your prompt.(2) Simply stating “MUST execute” may not be sufficient. You should explicitly describe the conditions under which the function should be invoked.(3)
3. Function Execution Timing
If both send_data_to_make and end_call are available as tools in the same state, the LLM might choose to call end_call first, especially if the conversation context suggests the call should end.(3)
Recommended Solutions:
A. Separate the Functions into Different States
Create a dedicated state for send_data_to_make that transitions to the final state with end_call. This ensures the data-sending function executes before the call ends.(1)
B. Improve Your Prompt
Update your state prompt to be more explicit about when to call the function. For example:
When user provided the city name, please get the weather for that city by calling the `get_weather` function.
(2)
C. Configure Speech Behavior
In your custom function configuration, ensure you’ve properly set “Speak During Execution” and “Speak After Execution” settings.(2) These control whether the agent speaks when the function is called and after it completes.(1)
D. Verify Dynamic Variables
If your custom function uses dynamic variables extracted from the conversation, ensure they’re being mapped correctly. There have been cases where variables extracted as separate values need to be referenced directly (like {{make}}) rather than with dot notation (like {{vehicle.make}}).(4)
E. Check HTTP Method Configuration
Verify that your custom function is configured with the correct HTTP method (POST, GET, PUT, PATCH, or DELETE).(1)(2) There was a reported case where a trailing slash in the URL caused the request to be sent as GET instead of POST.(5)
Recent Platform Issues
Note that there was a reported issue on July 22, 2025, where conversation flow function nodes were not working properly on telephony/voice calls (though they worked fine in text chat).(6) This issue was identified and the team was working on a fix.(6) If you’re experiencing this issue recently, it may be related to that platform issue.
Next Steps:
- Try separating your
send_data_to_make function into its own state before the end-call state
- Review your function’s parameter schema to ensure it’s valid JSON
- Check that your endpoint URL doesn’t have a trailing slash
- Verify your dynamic variable mapping if you’re using extracted variables
If these suggestions don’t resolve the issue, I recommend reaching out through the official support channels: