unwilling-turquoise•6mo ago
call_id
Is there a way in which we can also sent the call_id of the call during the tool call, while the call is ongoing??
11 Replies
Yes, the
You can access it like this in your handler: Just extract it from the
call_id is included in the tool call payload sent to your server during an ongoing call.You can access it like this in your handler: Just extract it from the
"call" object in the incoming request and use it as needed in your tool logic.
Source:
- Custom Tools Documentation⤵️ Mention @Vapi Support Bot for follow-ups 🐥
unwilling-turquoiseOP•6mo ago
This is how the tool call is made but i dont see the call_id??

unwilling-turquoiseOP•6mo ago
@Vapi Team ???
ambitious-aqua•6mo ago
Yes, Vapi includes the call_id in live tool calls via the controlUrl and webhooks, so you can use it during an ongoing call without needing to send it manually..
ambitious-aqua•6mo ago
unwilling-turquoiseOP•6mo ago
But How do i do it in the prompt ?? ??
ambitious-aqua•6mo ago
You can reference {{call.id}} directly in your prompt, and Vapi will automatically inject the live call ID during the call, making it available for tools like transferCall without needing to pass it manually..
unwilling-turquoiseOP•6mo ago
@Kings_big💫 I tried that still doesnt work
id remained null
@Vapi
@Duckie ??
ambitious-aqua•6mo ago
{{call.id}} only works inside assistant prompts during live calls, it won’t auto-fill in tool calls, so you need to either reference it in the prompt or pass it manually from a webhook..
unwilling-turquoiseOP•6mo ago
@Kings_big💫 @Shubham Bajaj how do i reference it in the vapi prompt in vapi dashboard??
Just use the dynamic variable {{call.id}} inside the assistant prompt.