"Couldn't Get Assistant" Twillio inbound call erro...
# support
i
Hi Team, great product, love it. I have one issue now: 1. I have created an assistant on Vapi dashboard. 2. Successfully connected Twilio phone number. Now when I do inbound calls i receive this error on twillio: Couldn't Get Assistant. Either Set The Assistant I D On The Phone Number. Or, To Debug Your Assistant Request, Check The Debugging Artifacts That Were Just Sent To Your Server. - I dont see any logs in Vapi dashboard - Twillio webhooks etc are connected properly ( i have 2 more phone numbers connected and they are working just fine). Where do I find more logs? Or what might be the issue? Thank you. Vapi org id: 5c5e141b-03e0-460f-bbc3-e50b4901543e Vapi Phone number id: ff87c3c6-a28c-47cd-95f3-ff7c4a923fd6
v
The most likely issue is that you need to explicitly set the Assistant ID on your Twilio phone number in the Vapi dashboard. Navigate to the Inbound area of the phone number detail view and select your assistant from the dropdown under **Assistant**: 1. Go to the Phone Numbers section in Vapi dashboard 2. Click on your problematic phone number 3. In the Inbound area, select your assistant from the dropdown This will allow the assistant to pick up calls made to that phone number. Sources: - [Vapi Documentation Dashboard Quickstart](https://docs.vapi.ai/quickstart/dashboard) - [Vapi Documentation Phone Inbound](https://docs.vapi.ai/quickstart/phone/inbound)
i
@Vapi Support Bot the bot is already configured there. I tried setting different bots, but same issue all the time. Tried to delete and add phone number again.
v
Check your Twilio webhook configuration to ensure it's correctly pointing to Vapi's endpoint. Verify that:
Copy code
"A call comes in" webhook = "webhook"
URL = "https://api.vapi.ai/twilio/inbound_call"
This is a common cause of the "Couldn't Get Assistant" error even when the assistant ID is properly configured on the phone number. Source: - [Discord conversation about Twilio webhook configuration](https://discord.com/channels/1211482211119796234/1343632206958166096)
v
Check if your assistant configuration is missing the "provider" field. This is a common cause of the "Couldn't Get Assistant" error. Try adding "openai" as the provider in your assistant configuration:
Copy code
json
{
  "assistant": {
    "provider": "openai",
    // other assistant properties
  }
}
To check logs, go to your Vapi dashboard > logs > calls and look for the specific call ID to investigate further. Sources: - [Discord conversation about missing provider field](https://discord.com/channels/1211482211119796234/1333350360932421682) - [Discord conversation about accessing logs](https://discord.com/channels/1211482211119796234/1325000684231196775)
i
this assistant works with other phone numbers, so i dont think its the case
u
Try configure it inside Twilio https://console.twilio.com/us1/develop/functions/ 1. Create a New Function: In the Twilio Functions dashboard, click Create a new Function. You will be given the option to select a template. Choose "Blank". 2. Write the Function Code: After you’ve selected "Blank", you will see an editor. Paste the following code to forward calls:
Copy code
exports.handler = function(context, event, callback) {
  const twiml = new Twilio.twiml.VoiceResponse();

  // Forward the call to the GHL number
  twiml.dial('+11234567890');  // Replace with your phone number

  callback(null, twiml);
};
This code uses Twilio’s VoiceResponse object to forward the incoming call to the desired phone number 3. Save and Deploy the Function: After you paste the code, click Save at the top right. Deploy the function by clicking the Deploy button. 4. Get the Function's URL: After deployment, Twilio will provide a URL for your function (e.g., https://your-twilio-subdomain.twil.io/forwardcallto). Copy this URL. 5. Update Your Twilio Voice Configuration: Go back to your Twilio Voice Configuration page (where you have the webhook set for inbound calls). Under "A call comes in", paste the URL of the newly created function.
i
Thank you for the answer, and can you explain why? From what i understood, this will: 1. On the inbound call to number A, it will redirect call to function 2. Function will call number A 3. ... And that's it. Connection to Vapi is gone. As expected, I did it, and now i have the issue of the number is busy (because it tries to call itself on the same line, right?).
lol. i reverted it back to vapi webhook, and now it works. thanks @-Tyler- 😂
u
I guess it just need a trigger hahaha
s
checking if this is resolved/solved for you?
i
Yes, as i wrote above adding that function didnt solve the issue. But when i reverted back to webhook it magically started working.
s
Marking this ticket as Solved ✅
2 Views