Getting ListenURL in a tool's webhook during a cal...
# support
s
Hey guys! If my assistant triggers a tool during a call, and the tool has a webhook sent to my Make.com scenario - In that webhook output I see a listenURL field. Can I use that URL to get the mp3 of the call that is ongoing? I mean like a real-time "what has happened so far in the call" kind of thing. I could not open the url afterwards to test it because after the call it is labelled as expired.
v
You can use the
listenUrl
from the webhook to stream the call's audio in real-time, but only while the call is ongoing.
The stream is in raw PCM format, not MP3, and the URL expires after the call ends. Here’s a Node.js example to save the audio during the call:
Copy code
js
const WebSocket = require('ws');
const fs = require('fs');
let pcmBuffer = Buffer.alloc(0);
const ws = new WebSocket('wss://your-listen-url-here');
ws.on('message', (data, isBinary) => {
  if (isBinary) pcmBuffer = Buffer.concat([pcmBuffer, data]);
});
ws.on('close', () => fs.writeFileSync('audio.pcm', pcmBuffer));
Connect to the
listenUrl
during the call to capture audio; you cannot access it after the call ends.
Source: - [Call Listen Feature – Vapi Documentation](https://docs.vapi.ai/calls/call-features#call-listen-feature)
k
Yes, the listenUrl is a WebSocket that streams live call audio in real-time, but it only works during the active call, once the call ends, the URL expires and cannot be used to access past audio.