Urgent - Need support for function call
# support
t
I'm not able to run any function calls in my application, I think vapi.on method is not working as expected Please look into it as soon as possbile
v
Hi there! I understand you're having urgent issues with function calls in your application, specifically with the
vapi.on
method. Let me help you troubleshoot this! 🔍 While I don't have specific information about the
vapi.on
method itself, I can definitely help with general function call implementation in Vapi and common issues that might be affecting your application. ## Function Calls in Vapi Vapi fully supports [OpenAI's function calling API](https://docs.vapi.ai/server-url/events), allowing assistants to ping your server to perform actions like sending emails, retrieving information, and more. ## Common Issues & Troubleshooting Several issues could prevent function calls from working properly: 1. **Configuration Issues**: According to [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334114042876264518), function calls may not trigger due to configuration problems within your Vapi setup. 2. **Client-Side SDK Limitations**: You cannot make function calls directly from the client-side SDK. Instead, use client-side events such as
ClientMessageToolCalls
and
ClientMessageToolCallsResult
to update the UI, as mentioned in [Discord conversations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330803502615625738). 3. **Server Processing**: Ensure your server correctly processes HTTP requests and sends appropriate JSON responses. Verify that tools are configured to trigger under the right conditions within your voice application flow. 4. **Function Call Requirements**: For a function to be called properly, you need: - The function name and required endpoint - Necessary parameters - Correct headers and authentication tokens (if required) - Appropriate HTTP method (usually POST for webhooks)
5. **Webhook Issues**: If using webhooks, check your server URL, endpoint configuration, and server logs for errors that might indicate why the tools aren't being called automatically. 6. **SDK Compatibility**: Note that "Vapi blocks doesn't work with the server SDK" according to [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336762229110083675), which might be relevant to your issue. Is there any specific error message you're receiving or could you share more details about your implementation so I can provide more targeted assistance? Sources: - [OpenAI's function calling API](https://docs.vapi.ai/server-url/events) - [Discord discussions on configuration issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334114042876264518) - [Discord conversations on client-side SDK limitations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330803502615625738) - [Discord discussions on SDK compatibility](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336762229110083675)
k
Please provide your call id
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!