DDX
10/23/2025, 7:03 PMVapi Support Bot
10/23/2025, 7:04 PMtransfer_call by using a webhook to set the headers at transfer time. In your webhook handler, extract the dynamic variables from the request context and inject them into the SIP headers before responding. For example:
js
// Node.js/Express example
app.post('/webhook', (req, res) => {
const { id_registro, id_campania } = req.body.context || {};
res.json({
destination: {
type: "number",
number: "+1234567890",
transferPlan: {
sipHeadersInReferToEnabled: true,
sipHeaders: {
"x-id_registro": id_registro,
"x-id_campania": id_campania
}
}
}
});
});
This lets you pass dynamic context to the receiving agent via SIP headers at transfer time. See the [dynamic transfers documentation](https://docs.vapi.ai/calls/call-dynamic-transfers) for more details.
Sources:
- [Dynamic call transfers documentation](https://docs.vapi.ai/calls/call-dynamic-transfers)
- [Changelog: SIP headers in Refer-To URI](https://docs.vapi.ai/changelog/2025/4/29)Vignxt Flow
10/23/2025, 11:31 PMDDX
10/24/2025, 3:35 PMDDX
10/24/2025, 3:35 PMVignxt Flow
10/24/2025, 9:32 PMChiranjeet Mishra
10/27/2025, 6:55 PM{
"type": "transferCall",
"destinations": [
{
"type": "assistantDestination",
"transferPlan": {
"type": "request",
"url": "https://your-server.com/transfer-destination",
"method": "POST"
}
}
]
}
Your server response could look like:
{
"destination": {
"type": "sipDestination",
"sipUri": "sip:agent@your-domain.com",
"headers": {
"X-id-registro": "{{dynamicValue1}}",
"X-id-campania": "{{dynamicValue2}}",
"X-context": "{{anyContextData}}"
}
}
}
Key Benefits
- Your webhook receives the full call context (conversation history, variables, etc.)
- You can compute headers dynamically in real time
- Full control over routing logic and SIP metadata
In short: using the Transfer Destination Request webhook is the cleanest and most flexible way to get dynamic headers into your transfer call flow.