I m using Vapi to create a lawyer agent. I’m currently facing two issues:
When the user ends the call, I need to extract the user_id.
I also need to extract the call_id.
I am using Node.js to build this, but unfortunately, I’m running into a lot of issues. Below is my code:
Currently, my clients want to view call logs and access the call audio file. However, Vapi does not support fetching call logs directly using the session_id.
That means I need to store the call_id whenever a call is made or ended, along with the user_id, so that later I can show:
Which user made the call (user_id)
Which call it belongs to (call_id)
Call details (logs, recordings, etc.)
Right now, the issue I’m facing is how to extract both user_id and call_id correctly when the call ends.