Seygi
03/10/2025, 4:00 PM/control
endpoint?
I’d love to learn more about the possibilities and the scenarios where this feature can be applied.Seygi
03/10/2025, 7:10 PMSeygi
03/10/2025, 7:10 PMSeygi
03/10/2025, 7:11 PMVapi Support Bot
03/10/2025, 7:12 PM/control
endpoint. Here's what I can share:
## Documentation
You can find the documentation for the Call Control Feature here: [Vapi's Call Features Documentation](https://docs.vapi.ai/calls/call-features)
## Actions with the /control
Endpoint
Based on the documentation, the primary action you can perform is message injection into an ongoing call:
bash
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control' \
-H 'content-type: application/json' \
--data-raw '{
"type": "say",
"message": "Welcome to Vapi, this message was injected during the call."
}'
This allows you to dynamically inject a text message to be spoken during the call.
## Use Cases & Scenarios
The /control
endpoint can be useful in several scenarios:
1. Injecting real-time information into ongoing calls
2. Live adjustments and real-time responses to modify conversation flow
3. Dynamic interactions based on call status - triggering different conversation paths based on caller responses
For example, in customer support scenarios, you could inject pre-defined answers live to reduce call handling time and improve support efficiency.
## Getting Started
To use this feature, you first need to obtain the controlUrl
by sending a POST request to the /call
endpoint. The response will include this URL in the monitor
object.
I should note that the documentation doesn't explicitly list other specific commands or actions beyond the "say" action for injecting messages. If you need more advanced functionality, you might want to explore the documentation further.
Sources:
- [Vapi's Call Features Documentation](https://docs.vapi.ai/calls/call-features)
- [Vapi's Call Control Feature](https://docs.vapi.ai/changelog#advanced-call-control)Seygi
03/10/2025, 11:49 PMShubham Bajaj
03/11/2025, 2:04 PM/control
endpoint allows you to dynamically control ongoing calls. Here's a list of the possible actions you can perform:
## Basic Call Control Actions
1. Say a Message
- Type: say
- Purpose: Inject a message to be spoken during the call
- Example:
json
{
"type": "say",
"message": "Welcome to Vapi, this message was injected during the call."
}
2. Control Assistant State
- Type: control
- Actions:
- `mute-assistant`: Mute the assistant
- `unmute-assistant`: Unmute the assistant
- `say-first-message`: Say the first message (used when video recording is enabled)
- Example:
json
{
"type": "control",
"control": "mute-assistant"
}
3. Phone Call Control
- Type: phone-call-control
- Actions:
- `forward`: Forward the call to another number
- `hang-up`: End the call
- Example:
json
{
"type": "phone-call-control",
"request": "forward",
"destination": {"number": "+1234567890"}
}
4. Add Message to Conversation
- Type: add-message
- Purpose: Add a message to the conversation context
- Example:
json
{
"type": "add-message",
"message": {
"role": "assistant",
"content": "content"
},
"triggerResponseEnabled": true
}
## How to Use Call Control
1. First, obtain the controlUrl
by making a call to the /call
endpoint
2. Once you have the controlUrl
, you can make POST requests to it with the appropriate action payload
3. The actions will be applied in real-time during the ongoing call
## Example Use Cases
- Inject information or instructions during a call
- Mute/unmute the assistant for certain portions of a call
- Forward calls to human agents when necessary
- Hang up calls programmatically
- Add context to the conversation that wasn't provided by the user
## Enabling Call Control
To enable live call control:
1. Set monitorPlan.controlEnabled
to true
in your assistant configuration
2. Obtain the controlUrl
from the call response
3. Send your control commands to that URLSeygi
03/11/2025, 3:58 PMSeygi
03/11/2025, 7:46 PMjson
{
"type": "add-message",
"message": {
"role": "assistant",
"content": "content"
},
"triggerResponseEnabled": true
}
Something like
json
{
"firstName": "Seygi",
"lastName": "Alberto",
"fullName": "Seygi Alberto"
}
My goal is to enrich inbound calls by adding more information about the caller.
I don’t want to use assistant-request
because we don’t want to delay the call while retrieving the caller’s information. Instead, we want to collect and add this information during the ongoing call.Shubham Bajaj
03/13/2025, 7:44 PMSeygi
03/13/2025, 9:36 PMtriggerResponseEnabled
true or false?Kyle Brunker
03/14/2025, 3:51 AM