#Can I trigger a tool at the end of a call?

1 messages · Page 1 of 1 (latest)

spice hollyBOT
#
AI-generated Answer for shrey8362

Yes, you can trigger a tool at the end of a call. For example, you can set up a client tool to send an end_call event to your server to handle the call termination. However, there are some considerations:

  1. Timing of the Tool Call: If the tool call event is received before the final audio is sent, you might need to implement a slight delay (e.g., 1-2 seconds) before executing the end_call event. This ensures the final phrase, like "goodbye," is sent before the call ends.

  2. Built-in end_call Tool: ElevenLabs offers a built-in end_call tool, but it is currently only configurable through the web interface and not via the API. If you need this feature through the API, you can share your feedback for future updates.

  3. Custom Tools: If you're using a custom tool to end the call, ensure the setup aligns with your backend logic. Note that custom tools may sometimes result in unexpected behavior, such as repeated audio after the tool invocation.

If you'd like more details or assistance with your specific setup, feel free to provide additional information!

inner obsidian
#

I want that the agen triggers the tool just before the call ends