Mahimai Raja
04/08/2025, 4:42 AMVapi Support Bot
04/08/2025, 4:43 AMbash
curl -X POST https://api.vapi.ai/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"customer": {
"number": "CUSTOMER_PHONE_NUMBER"
},
"assistant": {
"firstMessage": "Hello! This is an automated call."
},
"name": "OutboundCallTest"
}'
According to [Vapi's documentation](https://docs.vapi.ai/quickstart/phone/outbound), you can also use the dashboard to set your assistant as the dialer, set the destination phone number, and make the call.
## Adding Call Forwarding to Department Number
Yes, you can add call forwarding to your department number using the transferCall
function. Here's how:
1. Set up the transferCall tool with your department number as a destination:
```json
{
"tools": [
{
"type": "transferCall",
"destinations": [
{
"type": "number",
"number": "YOUR_DEPARTMENT_NUMBER",
"message": "I am forwarding your call to the department. Please stay on the line."
}
],
"function": {
"name": "transferCall",
"description": "Use this function to transfer the call.",
"parameters": {
"type": "object",
"properties": {
"destination": {
"type": "string",
"enum": [Vapi Support Bot
04/08/2025, 4:43 AMAccording to [Vapi's call forwarding documentation](https://docs.vapi.ai/call-forwarding), you can also use extensions for department numbers by appending the extension to the destination number.
## Muting the Assistant
Yes, you can mute the assistant using the `assistantOverrides.maxDurationSeconds` parameter. This prevents the assistant from interrupting for a specified duration. For example:
```json
"assistantOverrides": {
"maxDurationSeconds": 120
}
According to the information I found, setting this to 120 seconds will ensure the assistant remains silent for 2 minutes.
Alternatively, you can use custom endpointing rules to pause for user input for a specified duration.
Is there anything specific about any of these features you'd like me to explain in more detail?
Sources:
- [Vapi's documentation](https://docs.vapi.ai/quickstart/phone/outbound)
- [Vapi's call forwarding documentation](https://docs.vapi.ai/call-forwarding)Mahimai Raja
04/08/2025, 4:51 AMVapi Support Bot
04/08/2025, 4:52 AMassistantOverrides.maxDurationSeconds
parameter**:
This is the most straightforward method. By setting this parameter to a specific duration (in seconds), you can prevent the assistant from interrupting for that period of time.
json
"assistantOverrides": {
"maxDurationSeconds": 120
}
Setting it to 120 seconds, for example, will ensure the assistant remains silent for 2 minutes.
2. **Using custom endpointing rules**:
You can also use custom endpointing rules to pause for user input for a specified duration. This ensures that the assistant does not respond for that specified time based on IVR phrases.
Is there anything specific about these muting methods you'd like me to explain further?
Source:
- [Discord thread about muting assistant](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335807780287676456)Mahimai Raja
04/08/2025, 6:59 AMtransferCall
after my create call? @Vapi Support BotVapi Support Bot
04/08/2025, 7:01 AMtransferCall
tool after a call has already been created. However, I can share what I know about the transferCall
tool and some general information about modifying call configurations in Vapi.
The transferCall
tool enables call forwarding to predefined phone numbers or assistants, allowing the active call to be redirected based on specific conditions or logic. When setting up a new call, you would typically include this tool in the assistant's configuration before initiating the call.
For modifying existing call configurations, Vapi does have a "PATCHUpdate Call" endpoint:
PATCH https://api.vapi.ai/call/:id
This endpoint requires the call ID as a path parameter and an Authorization header with your Bearer token. The request body can include an optional name
parameter.
While there's no explicit confirmation that you can add the transferCall
tool to an existing call, you might be able to use this update endpoint to modify the call configuration. Alternatively, you could consider:
1. Creating a custom transfer tool with an empty destinations
array
2. Using the ControlUrl to programmatically trigger a transfer
3. Integrating with a custom LLM to invoke the transferCall
function
Would you like me to provide more details about any of these approaches or about how to set up the transferCall
tool when creating a new call?
Sources:
- [Vapi API endpoint for updating calls](https://docs.vapi.ai/api-reference/calls/update)
- [Vapi call forwarding documentation](https://docs.vapi.ai/call-forwarding)Kyle Brunker
04/08/2025, 7:30 PM