endCall tool doesn't work as expected.
# support
r
I have this prompt here that for some reasons don't trigger the endCall Tool after making the booking
Copy code
Booking Process:
1)  Listen to what the person is asking and let them know if we can assist.
2)  Ask immediately: "Do you have a preference? If not I can suggest you some."
If no: Use getSlotsOverNDays (3-day window and 3 earliest slots ) and read out the earliest date and 3 earliest slots from the  response
if date or date and time: Use getAvailabilityOnDate → suggest 4 slots for that date. (e.g., "Thursday 6th February: 10 15 AM, 10 30 AM, 10 45 AM, 11 00 AM").
3) Ask user for "Can you confirm [date] at [time]?" (No extra details) → Book via makeBookingtoCalendar (format: 10:00, 14:30). Time Conversions: 2 → 14:00, 6 pm → 18:00, 2:30 pm → 14:30, 2 30 → 14:30.
4) if the response is Your booking is confirmed" use the endCall tool and say "Your all booked in. I am sending a reschedule link via SMS in case something comes up. Have a good day"
else say "There seems to be an issue with the calendar app"
5) on successful booking use endCall to hang up and end the call
here is the call id
083322eb-504e-4cac-9bef-464c27dc9fd6
for reference
v
@Raju I'm glad to assist with the booking process. It seems like you've already made a booking based on the context provided. If the booking was successful and you're looking to trigger the
endCall
tool, I can help with that. However, I don't have the capability to directly interact with the
endCall
tool as it's not listed in the tools I can access. If the
endCall
tool is a function within the
functions
namespace, please provide its exact name or any additional information so I can proceed accordingly. If the
endCall
tool is not accessible to me, you might need to manually trigger it or consult with the support team for further assistance. Please let me know how you would like to proceed or if there is anything else I can help you with!
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
r
Also just for clarity I want to know if the endCall tool is triggered right away or is there supposed to be a slight delay ?
@Vapi i am looking to trigger the endCall tool
v
@Raju Understood. To trigger the
endCall
tool, I would typically need to call the specific function designed to end the call. However, since I don't have the exact name of the function or access to it in my current toolset, I'm unable to execute it directly. If the
endCall
tool is a function within the
functions
namespace that I can access, please provide its exact name. If it's not accessible to me, you might need to trigger it manually or consult with the support team for further assistance. Regarding the timing of the
endCall
trigger, it usually depends on the implementation. Some systems might end the call immediately after the trigger, while others might have a slight delay to allow for any final messages or actions to be completed. If you need specifics on the behavior of the
endCall
tool in your system, please ask support for more info on this.
m
what model are you using?
r
gpt-4o @Mason | Building KOI
@Shubham Bajaj would appreciate your help here. So the issue is i have a tool that i call and i want to bot to end the call after that. I haven't been successful doing so. Please take a look at the call id in the message above
s
@Raju Try this let me know and how it goes.
Copy code
Book via **makeBookingtoCalendar** and map response to {bookCalendarResult}
if {bookCalendarResult} is success then trigger the endCall tool.
10 Views