nietsnie
08/19/2025, 1:16 PMChiranjeet Mishra
08/21/2025, 7:37 AMtransfer-destination-request webhook is triggered correctly when using parameters in your dynamicTransfer function, make sure that the destination is not predetermined and that your webhook URL is configured to handle these requests properly. Here’s a brief guide on setting up dynamic call transfers with parameters:
Example webhook logic:
javascript
app.post('/webhook', (req, res) => {
// Verify signature and process request
const { type, callContext, parameters } = req.body;
if (type !== 'transfer-destination-request') {
return res.status(200).send({ received: true });
}
// Determine routing based on parameters
const { reason } = parameters;
let destination;
if (reason === 'urgent') {
destination = { number: "+1234567890", message: "Urgent support requested." };
} else {
destination = { number: "+0987654321", message: "General support." };
}
res.json({ destination });
});
Following this approach should help in successfully triggering the webhook and processing transfers dynamically using parameters. For more detailed guidance, refer to [Vapi's dynamic call transfers documentation](https://docs.vapi.ai/calls/call-dynamic-transfers).
/simple and bit shortNoah Johnson
08/26/2025, 7:30 PMChiranjeet Mishra
08/28/2025, 4:34 PMNoah Johnson
08/28/2025, 6:24 PMChiranjeet Mishra
09/01/2025, 3:59 PM