SIP calls with variables
Has anyone had success passing variables through a sip call? I’m running into an issue with SIP headers not appearing as variables.
I’ve gone through the full setup process, including registering my SIP trunk with Twilio. Everything appears to be working on the Twilio side.
I’m using a TwiML Bin like this as a minimal test:
<Dial>
<Sip>sip:my-assistant@sip.vapi.ai?X-testVar=helloWorld&X-customerName=TestCustomer</Sip>
</Dial>
In Wireshark, I confirmed that Twilio is sending the SIP INVITE to sip.vapi.ai with:
X-testVar: helloWorld
X-customerName: TestCustomer
My assistant’s first message is including them. I've tried variations with and without hyphens. I've also tried with other assistants.
Nothing appears in the call transcript or in the Vapi mesage logs.
I’ve tested:
-With X-customerName (camelCase) and X-customer-name (hyphenated)
-Calling via TwiML Bin using <Dial><Sip>
-Verified via .pcap that headers are definitely in the SIP INVITE
-Registered and configured my Twilio SIP trunk to allow calls to Vapi
Is there a known issue with parsing SIP headers in <Dial><Sip> flows? Or is there a specific naming convention or limitation I should be aware of?
I’ve gone through the full setup process, including registering my SIP trunk with Twilio. Everything appears to be working on the Twilio side.
I’m using a TwiML Bin like this as a minimal test:
<Dial>
<Sip>sip:my-assistant@sip.vapi.ai?X-testVar=helloWorld&X-customerName=TestCustomer</Sip>
</Dial>
In Wireshark, I confirmed that Twilio is sending the SIP INVITE to sip.vapi.ai with:
X-testVar: helloWorld
X-customerName: TestCustomer
My assistant’s first message is including them. I've tried variations with and without hyphens. I've also tried with other assistants.
Nothing appears in the call transcript or in the Vapi mesage logs.
I’ve tested:
-With X-customerName (camelCase) and X-customer-name (hyphenated)
-Calling via TwiML Bin using <Dial><Sip>
-Verified via .pcap that headers are definitely in the SIP INVITE
-Registered and configured my Twilio SIP trunk to allow calls to Vapi
Is there a known issue with parsing SIP headers in <Dial><Sip> flows? Or is there a specific naming convention or limitation I should be aware of?