markqlogan
03/03/2025, 10:20 PMVapi Support Bot
03/03/2025, 10:22 PMsay
method with the endCallAfterSpoken
parameter set to true
to provide a closing statement before ending the call. This way, the agent can inform the user that the call is about to end, ensuring a smoother transition rather than an abrupt cutoff.
For example, you could set up a message like, "Your call will be ending soon. Is there anything else I can assist you with?" This can be scheduled to trigger just before the maximum duration is reached.
If you need more details on how to implement this, feel free to ask! ๐
Sources:
- [Vapi Call Management Features](https://docs.vapi.ai/calls/call-features)
- [Graceful Call Termination](https://discord.com/channels/1211482211119796234/1211483291191083018/1336004944150401166)
- [Configuring Vapi Voice AI Agents](https://discord.com/channels/1211482211119796234/1211483291191083018/1344633027925377064)markqlogan
03/04/2025, 7:52 PMVapi Support Bot
03/04/2025, 7:52 PMmaxDurationSeconds
parameter effectively. While the platform does not provide real-time tracking of the call duration, you can set up a mechanism to trigger a warning message just before the maximum duration is reached.
Hereโs how you can do it:
1. **Set the Maximum Duration**: First, ensure that you have defined the maxDurationSeconds
for your calls. This parameter determines how long a call can last before it is automatically terminated.
2. **Schedule a Warning Message**: You can use the say
method to schedule a warning message that will be sent to the user shortly before the call ends. For example, if your maximum duration is set to 1800 seconds (30 minutes), you could schedule a warning to be sent at 29 minutes.
Hereโs a sample implementation:
json
{
"actions": [
{
"say": "Your call will be ending in one minute. Is there anything else I can assist you with?",
"endCallAfterSpoken": false
}
]
}
3. **Triggering the Warning**: You can programmatically determine when to send this warning based on the maxDurationSeconds
. For instance, if you set a timer or a countdown in your application, you can trigger the warning message when the call duration reaches a certain threshold (e.g., 29 minutes).
4. **Graceful Call Termination**: After the warning message is delivered, you can then use the say
method again with endCallAfterSpoken
set to true
to gracefully end the call after the user has had a chance to respond.
By implementing this approach, you can ensure that the call does not end abruptly and that the user is informed before the call concludes.
If you need further assistance with the implementation or have more questions, feel free to ask! ๐
Sources:
- [Vapi Call Management Features](https://docs.vapi.ai/calls/call-features)Vapi Support Bot
03/04/2025, 7:52 PMmarkqlogan
03/04/2025, 10:25 PMVapi Support Bot
03/04/2025, 10:26 PMsay
action to inject messages into the call. This allows you to communicate specific instructions or information dynamically during the conversation. For example:
json
{
"actions": [
{
"say": "Welcome to Vapi, this message was injected during the call."
}
]
}
2. **Real-Time Audio Streaming**: The platform allows for streaming the call's audio data in real-time, which can be useful for monitoring or recording purposes.
3. **Event Hooks**: You can set up event hooks to trigger actions based on call events, such as when a call is ending. This allows for more complex interactions, like transferring calls or executing specific commands based on the call's status.
Regarding updating call metadata, the documentation does not explicitly mention the ability to update metadata directly through call control. The focus is more on operational control and interaction during the call rather than modifying metadata. However, you can manage certain aspects of the call through the API, but it may not cover all metadata updates.
If you have any specific use cases in mind or need further clarification, feel free to ask! ๐
Sources:
- [Detailed Report on Call Control Actions in the Vapi Voice AI Platform](https://docs.vapi.ai/calls/call-features)
- [Vapi Call Management Features](https://docs.vapi.ai/calls/call-features)
- [Event Hooks in Vapi](https://docs.vapi.ai/changelog/2025/2/17)Kyle Brunker
03/05/2025, 4:27 PM