Transferring call to Different numbers
# support
a
Hey. I'm planning to build an usecase where the assistant will be able to transfer the call to a specific number from a pool of numbers depending on the case. I do see an API to update the tool description of the transfer call. But instead of making the numbers same account wide, I would prefer to do this for a particular assistant, and if possible for a particular call I would like to set a group of numbers where the call can be transferred. Would like to know if that is possible and which APIs etc detailed steps. @Sahil
v
@Aishik Absolutely, I can help guide you through the process of setting up call transfers to specific numbers for a particular assistant or even for a particular call. To achieve this, you would typically use the API endpoint that allows you to update the call transfer settings. However, since you want to customize this on a per-assistant or per-call basis, you would need to specify these details dynamically. Here's how you can do it: 1. For a Specific Assistant: - When creating or updating an assistant, you can specify the transfer settings, including the pool of numbers to which calls can be transferred. This would be part of the assistant's configuration. 2. For a Particular Call: - If you want to set a group of numbers for a particular call, you can use the
/call/phone
endpoint and specify a temporary assistant with the desired transfer settings in the
assistant
field. This temporary assistant would have the transfer numbers configured just for that call. Unfortunately, without direct access to the specific API documentation or endpoints for VAPI, I cannot provide you with the exact API calls or parameters. However, the general approach would be to dynamically set the transfer numbers either in the assistant configuration or as part of the call setup. If you need the exact API endpoints and parameters, you would need to refer to the VAPI documentation or contact support for more detailed information on how to implement this feature. If there's anything else I can assist you with, please let me know!
You can continue this conversation by mentioning me in the message.
s
Copy code
curl -X POST https://api.vapi.ai/call \
     -H "Authorization: Bearer " \
     -H "Content-Type: application/json" \
     -d '{
  "assistant": {
    "model": {
      "provider": "openai",
      "model": "gpt-4o-2024-08-06",
      "tools": [
        {
          "type": "transferCall",
          "async": false,
          "function": {
            "name": "transientTransferCall"
          },
          "destinations": [
            {
              "type": "number",
              "number": "insert-number-here",
              "description": "insert-description-here",
              "message": "insert-message-here"
            }
          ]
        }
      ]
    }
  }
}'
@Aishik you can use transient tools along with the transient assistants and decide numbers to transfer the call to right before the call. Do let me know if you require further help.
a
@Shubham Bajaj thanks for the update. But the above API seems to be for creating an Outbound call. I am specifically looking to add this capability for our inbound calls. Please let me know the detailed steps on how to achieve that. Thanks!
s
1. Assign a server url to the phone number associated with Vapi. 2. Remove any assistantId or SquadId assigned to it. 3. After that, when a call arrives Vapi will send an request to your server url of type
request-assistant
, your supposed to return the assistant to be used for the call. Note this all will be done right before the call.
@Aishik you just have to return an transient assistant for server request of type
request-assistant
.
3 Views