bug: {{customer.number}} doesn't return a value in...
# support
k
Hi, when using {{customer.number}} in my prompt it's not returning a value. the agent says your phone number is customer.number. Im using twilio. to re-create, simply create an assistant with a prompt that will confirm the phone number you're calling from. i can see the phone number in the api payload when using a tool, but i don't want to have to make a tool just for this when it should already be integrated as a function normally. searched here on the discord and looks like im not the only one. could we please have this looked at ? thank you
looks like this is isolated to sip/twillio in the logs i see
Copy code
"customer": {
    "name": "caller id name",
    "number": "+19788789998",
    "sip_uri": "sip:+14168789998@46.209.210.177:5060"
  },
(info above has been modified with dummy info) is there a reason we can't retrieve this info? id of the call
686bd4ea-0a88-468e-af7f-746ad9080c04
^^^note that inside this call id i was attempting to use {{customer.sipUri}} which i found out later doesn't exist.
but the result is the same when using {{customer.number}}
k
Make sure you’re explicitly passing the caller’s number in the variableValues during the assistant setup, as it won’t automatically be injected unless provided in the API request.
The SIP call legs not including the caller’s number in the parent leg’s metadata, to resolve this, explicitly pass the caller’s number in the variableValues parameter when initiating the VAPI assistant.
k
could you please provide an example? where may i find the variableValues parameter?
assistant setup?
note that im only using the vapi UI for my assistant, how do i go about passing the caller's number to the vapi assistant?
k
When using only the Vapi UI, you can’t manually set variableValues, but you can reference available fields like {{customer.sip_uri}} in your prompts, or use the API/SDK if you need to explicitly pass the caller’s number.