Assistance Required for Real-Time Data Transmissio...
# support
m
I have created a custom function named "Agendamento" on Vapi.ai, and I am trying to configure it to send information to my webhook in real time during the call. I need assistance with the setup to ensure that the data is sent immediately to my webhook as the conversation progresses, without delay. Could you provide guidance on how to enable this functionality for real-time data transmission?
v
Hi there! 👋 I don't have specific information about your custom "Agendamento" function, but I can definitely help you set up real-time data transmission to your webhook during calls in Vapi.ai! Here's how you can configure your custom function to send data to a webhook in real-time: ## 1. Set up your Server URL First, you'll need to configure a server URL where Vapi will send the function call information. According to the [Vapi documentation](https://docs.vapi.ai/tools/default-tools), this can be done at either: - **Account level**: Set in the Vapi Dashboard for all assistants - **Assistant level**: Specified in the assistant configuration (this overrides the account-level URL) This server URL acts as your webhook endpoint for receiving real-time conversation data. ## 2. Configure your Webhook For your custom function to properly call the webhook, you'll need to specify: - The function name and required endpoint - Necessary parameters (based on your "Agendamento" function needs) - Correct headers and authentication tokens (if required by your webhook) - The appropriate HTTP method (usually POST for webhooks) ## 3. Enable Real-time Data Transmission To enable real-time data transmission during calls, you can: 1. **Configure serverMessages**: Include
"transcript"
in the
serverMessages
configuration to receive real-time transcriptions via webhooks. For example:
Copy code
json
{
  "serverMessages": [
    "transcript",
    "end-of-call-report"
  ]
}
2. **Use assistantOverrides**: When starting a Vapi instance, you can use the
assistantOverrides
parameter with the
variableValues
object to send data to your webhook:
Copy code
javascript
vapiInstance = vapiSDK.run({
  apiKey: apiKey,
  assistant: assistant,
  config: buttonConfig,
  assistantOverrides: {
    variableValues: {
      userId: "yourUserIdHere"
    }
  }
});
## 4. Implement Real-time Handling During the call, you can use the
.send()
method in the Vapi Web SDK to send intermediate messages:
Copy code
javascript
vapi.send({
  type: "add-message",
  message: {
    role: "system",
    content: "Your real-time data here",
  },
});
## 5. Troubleshooting Tips If your webhook isn't receiving data in real-time, check: - Connection issues between Vapi and your webhook - Incorrect webhook URL configuration - Data format mismatches - Missing headers or authentication tokens - Function call parameter errors Is there anything specific about your "Agendamento" function implementation that you'd like me to help with? Sources: - [Vapi documentation](https://docs.vapi.ai/tools/default-tools) - [Discord thread about real-time transcripts](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341440757189578782) - [Discord thread about assistantOverrides](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339495894801711186) - [Discord thread about webhook configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336345690393149452) - [Vapi Web SDK documentation](https://docs.vapi.ai/sdk/web)
v
Hey Matheus, could you help me understand your usage and what you've done until now to make it work? So that I can consider your usage as X and the steps we've taken as Y, and can give you a solution either apart from Y (because until now, the Y number of steps didn't work for you) or can tweak some changes in any of the Y steps so that it works for you.