https://retellai.com/?utm_source=discord&utm_medium=seo logo
: How do we read values from SIP Headers
# ❓・ai-evy-support
d
@AI Evy : How do we read values from SIP Headers?
a
Thanks for tagging me @dazzling_kiwi_86761. I'll look through relevant sources and get back to you shortly.
### Answer For inbound calls, custom SIP headers are automatically received and extracted by Retell AI [(1) ]() . The custom SIP headers (headers that start with
X-
or
x-
) are automatically available in the
call.custom_sip_headers
field and are also automatically added to your collection of dynamic variables . Here's how it works - if this SIP header is received for an inbound call :
Copy code
json
{
 "X-test-header": "something",
 "X-another-header": "something else",
 "from": "1234567890"
 "to": "0987654321"
}
Then your
call.custom_sip_headers
field will contain :
Copy code
json
{
 "test-header": "something",
 "another-header": "something else",
}
You can access these values within your agent by stripping the
X-
or
x-
prefix . The headers are automatically added to your dynamic variables, so you can use them in your agent prompts . If you have existing dynamic variables with the same name for an inbound call, the SIP header value will override the existing value . There's no configuration needed for this feature - it works automatically for inbound calls .
​ To learn more, see the sources I considered: [[1] Set & parse custom SIP headers](https://docs.retellai.com/build/telephony/sip-headers) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.