#Can I set a tool to agent and cend the call directly from twilio endpoint?
1 messages · Page 1 of 1 (latest)
Short answer: Yes.
-
To let an agent end a phone call: add the End call system tool to the agent. It’s included by default for agents created in the dashboard; for agents created via API/SDK you must add the system tool named end_call. When invoked, it terminates the call. Parameters: reason (required) and message (optional). (elevenlabs.io)
-
To “send” (connect) a Twilio call from your own webhook/endpoint directly to an ElevenLabs agent: use the Register Twilio calls endpoint. Your server receives the call, calls ElevenLabs to register it, and returns the TwiML ElevenLabs provides to Twilio to bridge the call to the agent. Note: when using this method, call transfer is not supported. (elevenlabs.io)
If you meant something different by “cend the call,” let me know and I’ll point you to the exact doc.
Sources:
End call | ElevenLabs Documentation
Register Twilio calls | ElevenLabs Documentation
Is not calling the default tool, and I wonder if I can send myself a end call request to twilio, and not rely on default
Short answer: Yes—there are supported ways to end a call without relying on the agent’s default End Call tool.
-
End Call tool behavior: Agents made in the dashboard include the End Call system tool by default. If you created the agent via API/SDK, you must add the End Call tool yourself for the LLM to be able to hang up. (elevenlabs.io)
-
Control from your app (Enterprise): You can terminate an active call immediately by sending a control command over the real-time monitoring WebSocket:
command_type: "end_call"
This does not require the LLM to call the tool. (elevenlabs.io) -
Control from Twilio side: If you use the Register Twilio Calls pattern, you keep full control of Twilio call routing/handling and return TwiML from your server to connect to the agent. This approach is intended for custom Twilio logic rather than relying on agent tools. (elevenlabs.io)
If you’re on the native Twilio integration and not Enterprise, the publicly documented way to end calls from the agent side is the End Call system tool (i.e., ensure it’s present or customize its trigger conditions). (elevenlabs.io)
If you share which integration you’re using (native vs. register-call) and whether you have Enterprise monitoring, I can point you to the exact setup steps. (elevenlabs.io)
Sources:
End call | ElevenLabs Documentation
Real-time monitoring | ElevenLabs Documentation
Register Twilio calls | ElevenLabs Documentation
End call | ElevenLabs Documentation
Register Twilio calls | ElevenLabs Documentation
The problem is is that the LLM is calling the end call tool when is supposed to hear a "good bye" or relevant, but is repeating itself the last message, like saluting "n" times before actually hangs the call.
And I wanted to be sure that the call close when is calling my external tool(a direct request to twilio with the callID)