Ethan Tan
02/16/2025, 5:32 PM{
"name": "sense_a_teaching",
"role": "tool_call_result",
"time": 1739726889788,
"result": "Success.",
"toolCallId": "call_VgZodLjnnmiv2WtmvaoSFv6i",
"secondsFromStart": 48.482
}
But in Make.com I can see that the webhook response had a full **result**:
{
"results": [
{
"toolCallId": "call_VgZodLjnnmiv2WtmvaoSFv6i",
"result": "Ethan's quest for focus can be profoundly aided by understanding 'Being over Doing.' The ability to maintain focus isn't just about techniques, it stems from identity. What if Ethan saw himself not as someone *trying* to focus, but as someone who *is* focused?\\n\\nA practical step: Ethan can kill the identity of 'distracted worker' by literally declaring it dead. \"I AM killing the identity of the unfocused worker.\" Next, Ethan can define and embody the identity of 'focused achiever'. How would a focused achiever schedule their day? How would they react to distractions? By consciously embodying this new identity, he begins to live it. He can try intentional self-dialogue each morning to cultivate who he will be for the world throughout the day ahead. He can then welcome what conflict arrises within.\\n\\nIntense work followed by breaks, then, becomes not a forced strategy, but a natural expression of this new, focused identity. This is sustained focus, born from 'being'.\\n"
}
]
}
Vapi
02/17/2025, 3:41 PMVapi Ticket Bot
02/17/2025, 10:04 PMEthan Tan
02/20/2025, 10:02 AMVapi
02/21/2025, 5:12 AMEthan Tan
02/21/2025, 10:41 AMEthan Tan
02/22/2025, 12:18 AM"serverMessages": [
"phone-call-control"
],
"clientMessages": [
"metadata"
],
Thank you!
Obtaining URLs for Call Control and Listen
To initiate a call and retrieve the listenUrl and controlUrl, send a POST request to the /call endpoint.
Sample Request
curl 'https://api.vapi.ai/call/phone'
-H 'authorization: Bearer YOUR_API_KEY'
-H 'content-type: application/json'
--data-raw '{
"assistantId": "5b0a4a08-133c-4146-9315-0984f8c6be80",
"customer": {
"number": "+12345678913"
},
"phoneNumberId": "42b4b25d-031e-4786-857f-63b346c9580f"
}'
Shubham Bajaj
02/24/2025, 6:16 AMShubham Bajaj
02/24/2025, 6:16 AMtypescript
const assistant = {
monitorPlan: {
listenEnabled: true, // For live audio streaming
controlEnabled: true // For live control capabilitie
}
};
2. When creating a phone call, you'll receive a response that includes monitor URLs:
// call.monitor.listenUrl - WebSocket URL for live audio
// call.monitor.controlUrl - HTTPS URL for live control
3. To control the call, you can send messages to the controlUrl:
typescript
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'
}
})
});
Shubham Bajaj
02/24/2025, 6:17 AMEthan Tan
03/03/2025, 10:01 AMtype will always be "add-message"
the message field will have 2 items, role and content.
**vapi.send({
type: "add-message",**
message: {
role: "system",
content: "The user has pressed the button, say peanuts",
},
});
Possible values for role are system, user, assistant, tool or function.
---Ethan Tan
03/05/2025, 10:07 AMShubham Bajaj
03/05/2025, 1:25 PMShubham Bajaj
03/11/2025, 3:36 AM