Dmytro
03/19/2025, 9:35 AMShubham Bajaj
03/19/2025, 9:53 PMsip:5aafd131-74fc-4bf8-8b67-08ec9e54c3fd@sip.vapi.ai;our_call_id=call_id_1
Use a custom header in your SIP INVITE request:
X-Our-Call-ID: call_id_1
This custom header will be extracted and passed to the assistant as a variable value, which you can then access in your webhooks or assistant logic.
For your specific test call ID (974d4e99-9dee-4466-ae69-2e0ca4f23903), you could set:
X-Our-Call-ID: 974d4e99-9dee-4466-ae69-2e0ca4f23903
We will extract it and make it available as our_call_id in the variableValues object passed to the assistant.
## Accessing SIP Headers as Dynamic Variables
Once you've sent custom SIP headers, they become available as dynamic variables throughout the Vapi ecosystem:
1. In Assistant Prompts: You can access them directly using template syntax like:
Your call ID from your system is: {{our_call_id}}
2. In Webhook Payloads: All your custom SIP headers are included in webhook payloads as part of the variableValues object, making them accessible in:
- Call start events
- End of call reports
- Transcription events
- Server events of all types
- Status updates
3. In Call Metadata: The headers are stored with the call and maintained throughout the call lifecycle
This approach gives you a reliable way to correlate your internal call IDs with Vapi calls across your entire integration.Dmytro
03/20/2025, 11:12 AMKyle
03/22/2025, 4:07 AM