SlaviSavanovic
05/05/2025, 6:59 PMVapi Support Bot
05/05/2025, 7:01 PMcall.monitor.controlUrl in Vapi:
1. The call ID is already included in the controlUrl itself (e.g., https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control), so you don't need to add it separately.
2. For adding messages, use this structure:
javascript
await fetch(call.monitor.controlUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
type: 'add-message',
message: {
role: 'tool',
content: 'Your tool result here'
}
})
});
3. For saying text during a call:
{
"type": "say",
"message": "Welcome to Vapi, this message was injected during the call."
}
Would you like me to provide examples for the other message types like end-call or transfer?
Sources:
- [Discord Channel](https://discord.com/channels/1211482211119796234/1340737584309211136)
- [Vapi Documentation](https://docs.vapi.ai/calls/call-features)
- [Discord Channel](https://discord.com/channels/1211482211119796234/1334251359519641692)Vapi Support Bot
05/05/2025, 7:01 PMSlaviSavanovic
05/05/2025, 7:02 PMKings_big💫
05/05/2025, 7:29 PMKings_big💫
05/05/2025, 7:30 PMSlaviSavanovic
05/06/2025, 4:43 PM