Multiple call forwarding option?
# support
i
Hi @Vapi @Shubham Bajaj Can I have calls transferred to multiple numbers based on scenarios in lieu of creating squad? Also these blind transfers and the transferee gets call from VAPI number, he cannot see the customer caller ID.
v
@Invorto Hello! Yes, you can have calls transferred to multiple numbers based on different scenarios. This can be done by setting up call routing rules within your voice application. You would define the scenarios and specify which numbers the calls should be transferred to under each scenario. Regarding the caller ID, when using VAPI to transfer calls, the default behavior is that the transferee sees the VAPI number. However, it is possible to configure the caller ID that the transferee sees. This can be done by setting the
from
parameter in your call transfer logic to display either the original caller's number or a different number that you have authorized with your VAPI provider. If you need assistance with setting up these features or have any specific questions about implementing them, please let me know, and I'll be happy to help!
You can continue this conversation by mentioning me in the message.
i
#Conversation flow: 2. Ask: " Please tell how can we help?" -If the response indicates request to connect with accounts, call the transferCall function with +123456789. @Vapi is this a correct syntax to use call transfer function within the prompt?
v
@Invorto The syntax you've provided seems to be part of a conversation flow rather than a direct code or function call. To use the
transferCall
function correctly, you would need to implement it within your voice application's code, following the API's specific syntax and parameters. For example, if you're scripting a conversation flow and want to include a directive to transfer a call when a certain condition is met, you would write the logic in your application to detect the condition (such as the user requesting to connect with accounts) and then execute the
transferCall
function with the appropriate parameters. Here's a more technical representation of how you might call the
transferCall
function:
Copy code
javascript
if (userRequest.includes('connect with accounts')) {
    transferCall('+123456789');
}
Please note that '+123456789' should be replaced with a valid E.164 formatted phone number, and the actual implementation will depend on the programming language and the environment you are using. If you need the call to be transferred based on the scenario you've described, please provide the necessary details or confirm the scenario, and I can assist with that.
i
@Vapi Yes i want to include this logic in the conversation flow.
@Vapi Instructing the Assistant Use the system prompt to guide the assistant on when to utilize each forwarding number. For example: “If the user asks for sales, call the transferCall function with +1234567890." "If the user requests technical support, use the transferCall function with +0987654321.” this is mentioned in your guide
v
@Invorto Thank you for clarifying. Based on the instructions provided, here's how you can proceed: When a user asks for a specific department, you can use the
transferCall
function with the corresponding phone number. For example: - If the user asks to be connected with sales, you would call the
transferCall
function with the number +1234567890. - If the user requests technical support, you would call the
transferCall
function with the number +0987654321. Please let me know how you would like to proceed or if there's a specific scenario you'd like to implement, and I'll be happy to assist you with that.
s
@Invorto can you try rephrasing your words, and it would be good if you can share an example. > Can I have calls transferred to multiple numbers based on scenarios in lieu of creating squad? > ?? > Also these blind transfers and the transferee gets call from VAPI number, he cannot see the customer caller ID. ??
i
@Shubham Bajaj I am trying create bot which can transfer inbound calls to multiple numbers based from the inbound call request. I tried making tool using the code shared in the documentation (documentation->tool calling->example modification). However I have made the necessary changes, yet on postman I am getting error. Shared the code, that I am running on postman. https://cdn.discordapp.com/attachments/1309477700863393853/1310513225749626920/transfercalltoolcalling.txt?ex=67457e0d&is=67442c8d&hm=1bcec4fffdf389793ac3ed31565f31a4b3f9c9db570f4d32f0b911e5db2dea16&
the second question is, if a customer number is transferred to suppose department A, will the department A see the customer phone number on their phone as the one calling as the caller ID? @User
s
By Default it won't show the customer phone number but you can set the caller Id using transferPlan.
Copy code
json
{
  "type": "number",
  "number": "destination-number-here",
  "message": "message-here",
  "callerId": "{{customer.number}}",
  "transferPlan": {
    "mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary",
    "summaryPlan": {
      "enabled": true,
      "messages": []
    }
  }
}
@Invorto remove the square bracket around the function
[
and try to share the complete payload with error message.
i
@Shubham Bajaj
Copy code
{
  "message": "Expected ':' after property name in JSON at position 1836 (line 50 column 32)",
  "error": "Bad Request",
  "statusCode": 400
}
s
Remove the square brackets around function.
i
@Shubham Bajaj picked up the same code from the directory and ran on postman. getting this error. { "message": [ "each value in destinations.number must be a valid phone number in the E.164 format. Hot tip, you may be missing the country code (Eg. US: +1)." ], "error": "Bad Request", "statusCode": 400 } Might add the correct number and run it again to test. I shall reach out after.
this has to be inside the function?
s
Inside the destination.
set the property
numberE164CheckEnabled
to
false
@Invorto check this example curl:-
Copy code
curl -X POST https://api.vapi.ai/tool \
     -H "Authorization: Bearer token-here" \
     -H "Content-Type: application/json" \
     -d '{
  "type": "transferCall",
  "async": false,
  "destinations": [
    {
      "type": "number",
      "number": "+9191xxx95xx5",
      "callerId": "Your-Caller-ID-Here",
      "numberE164CheckEnabled": false,
      "description": "description-of-the-number-here",
      "transferPlan": {
        "mode": "warm-transfer-wait-for-operator-to-speak-first-and-then-say-message",
        "message": "insert-message-here"
      }
    }
  ],
  "function": {
    "name": "customTransferCallFunction"
  }
}'
Do let me know if you require further help.
i
Hi @Shubham Bajaj I am able to receive the inbound call on the twilio number and I am able to forward the calls too, however when I am trying to do the same with non-twilio(local provider) number, the call is not getting connected. I have white listed the IP as well. https://cdn.discordapp.com/attachments/1309477700863393853/1311291242335965216/image.png?ex=674852a2&is=67470122&hm=8a7eb528104e7f685b8d4e95f1db683e80933e62d878c46eef63317543c06fe5&
"Please configure inbound and outbound CLI as following format 08071XXXX4X." This is the message I have received from the SIP provider. @User
s
@Invorto can you share the call id?
i
Since the call was not connected, there is no call ID I can fetch.
s
Hey @Invorto as meeting invite is shared with you, and we will look over the meet.
i
sure.
@Shubham Bajaj Missed today's meeting. Can we reschedule it?
4 Views