How can I create new call and add call forwarding?
# support
m
I would like to create/initiate a new outbound calling to my customer and want to make use of call forwarding to my deparment number. And mute assistant. Is it possible? https://docs.vapi.ai/call-forwarding
v
Hi there! 👋 I'd be happy to help you with creating an outbound call, setting up call forwarding, and muting the assistant in Vapi. I can help with all parts of your question using the information I found in Vapi's documentation. ## Creating an Outbound Call To initiate an outbound call to your customer, you'll need to follow these steps: 1. **Create an Assistant**: First, set up an assistant that will handle the call 2. **Get a Phone Number**: Either import an existing number or create a free one through Vapi 3. **Make the Call**: You can do this using the API with a curl command like:
Copy code
bash
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": [
"YOUR_DEPARTMENT_NUMBER" ], "description": "The destination to transfer the call to." } }, "required": [ "destination" ] } } } ] }
Copy code
According 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)
m
@Vapi Support Bot How can I mute the assistant?
v
Hi there! 👋 I'd be happy to explain how you can mute the assistant in Vapi. I can help you with muting the assistant using the information I found in Vapi's documentation. There are two main ways to mute the Vapi assistant: 1. **Using the
assistantOverrides.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.
Copy code
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)
m
How can I add the tool
transferCall
after my create call? @Vapi Support Bot
v
Hi there! 👋 Unfortunately, I wasn't able to find specific information about adding the
transferCall
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:
Copy code
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)
k
checking if this is resolved/solved for you?