Re: inbound call server request
# support
a
Hi I need help guys, I have been trying to update my phone number in VAPI and I have no squadId or assistant id set for inbound call and set a server url. As per docs I am supposed to get assistant-request request to my server url endpoint. But when I make an inbound call there is no request made to my server url endpoint. Can someone help please?
v
Hi there! 👋 I can help you troubleshoot why your server isn't receiving assistant-request calls. Based on the documentation, here are some key steps to ensure your server URL endpoint is properly configured: 1. Remove any default assistant or squad assignment - This is critical! If you have a default assistant or squad assigned to your phone number, VAPI might not send requests to your server URL. [Make sure to clear these settings](https://docs.vapi.ai/server-url/setting-server-urls). 2. Verify your server endpoint - Ensure your server is properly set up to receive and respond to POST requests. Here's a basic example using Express:
Copy code
javascript
app.post('/assistant-request', (req, res) => {
  // Your logic here
  const response = {
    assistantId: 'your-assistant-id'
    // OR define a complete assistant configuration
  };
  res.json(response);
});
3. Check server accessibility - Make sure your server is publicly accessible and not behind a firewall that would block VAPI's requests. 4. Validate your response format - When VAPI sends a request, your server must respond with a valid assistant configuration:
Copy code
json
{
  "assistant": {
    "id": "assistant-id",
    "model": {
      "provider": "openai",
      "model": "gpt-4",
      "messages": [{ "role": "system", "content": "Your instructions" }]
    }
  }
}
5. Test with logging - Add detailed logging in your server to confirm if requests are arriving but perhaps failing in some way. If you've verified all these steps and still aren't receiving requests, could you share more details about your current configuration? That would help me provide more specific troubleshooting advice. Sources: - [Steps to Configure a Server URL Endpoint in VAPI](https://docs.vapi.ai/server-url/setting-server-urls) - [Example of Inbound Support Configuration](https://docs.vapi.ai/examples/inbound-support)
k
Hey! To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
a
Phone number id: 861d030f-2707-4150-8e45-f922bd90b0cc
No response got from this
I have api logs but no call logs for the inbound call I made
k
Hey, Could you please provide me with a call ID and I can take a look into this further.
a
There is no call ID i could find
9f28cbac-401c-47e0-b6c9-2309ecfb352e
This is the new phone number id
Got this on my twilio logs 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.
k
Seems to be working now.
2 Views