Leo Hackett
05/02/2025, 8:18 PMVapi Support Bot
05/02/2025, 8:20 PMjavascript
// In your Vapi configuration, use the x-vapi-secret header
const transferDestination = {
type: 'sip',
sipUri: 'sip:your-endpoint@domain.com',
sipHeaders: {
'x-vapi-secret': 'your-secret',
'X-FIRST_NAME': '${first_name}'
}
};
This approach should help your custom headers get properly processed for template variables.
Sources:
- [Vapi SIP Documentation](https://docs.vapi.ai/advanced/sip)
- [Discord Discussion](https://discord.com/channels/1211482211119796234/1340958485994803210)Chiranjeet Mishra
05/02/2025, 9:30 PMNir Simionovich (CEO@Cloudonix)
05/03/2025, 5:55 PMsame => n,Dial(SIP/vapi) in Asterisk, it means that your agent is configured as a "client peer" - from Asterisk's perspective, you're not supposed to pass customer SIP headers to it. Remember, Asterisk behaves as a B2BUA server, which means, you need to setup VAPI as a trunk, not as a user - in order to do these fancy things.
For example, in Cloudonix we do it like this:
<Response>
<Dial>
<Header name="X-First-Name" value="John Doe" />
<Header name="X-Zip" value="10010" />
<Header name="X-Phone" value="+12127773456" />
<Service provider="vapi">
+12127128523
</Service>
<Dial>
</Response>
But again, Cloudonix is a different tool completely.