#Where exactly can I find incoming SIP headers in my agent's session? Are they available in session
1 messages · Page 1 of 1 (latest)
Short answer: No. Incoming SIP headers are not exposed as a raw list in an agent session. They aren’t included in the session’s “conversation_initiation_metadata” event or the conversation “metadata” you can fetch via the Conversations API.
What is available instead:
- You can pass custom SIP headers (e.g., X-CALL-ID, X-CALLER-ID) on the INVITE. ElevenLabs extracts these and surfaces their values to your agent as system dynamic variables and in the pre‑call webhook; Twilio’s call SID is also supported via sip.twilio.callSid as a fallback. (elevenlabs.io)
- System dynamic variables include telephony fields such as the caller’s number (system__caller_id) and Twilio call SID (system__call_sid on Twilio calls). Use these inside prompts/tools; there is no documented way to retrieve the full raw SIP headers. (elevenlabs.io)
- The session-init payload (conversation_initiation_metadata) only contains items like conversation_id and audio formats, not SIP headers. (elevenlabs.io)
- The Conversations API “metadata” object exposes timing and similar fields (e.g., start_time_unix_secs, call_duration_secs), not raw SIP headers. (elevenlabs.io)
If you need specific SIP header values during the call, include them on the INVITE as custom headers and consume them via your pre‑call webhook and/or map them into dynamic variables for the agent. (elevenlabs.io)
Sources:
SIP trunking | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Client events | ElevenLabs Documentation
Get conversation details | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
If headers aren't automatically available, how can I request that specific SIP headers be exposed to my agent during runtime?
Short answer: include the SIP values you need in recognized headers on the INVITE, or ask Support to map your provider’s identification headers.
What’s supported today
- Add these headers on your inbound SIP INVITE: X-CALL-ID and X-CALLER-ID. When present, ElevenLabs surfaces caller_id and/or call_id to your pre‑call webhook and as system dynamic variables available to the agent at runtime. (elevenlabs.io)
- If you’re using Twilio SIP, sip.twilio.callSid is auto‑recognized as a fallback. (elevenlabs.io)
- System dynamic variables (e.g., system__caller_id) are how agents consume such metadata during prompts/tools. (elevenlabs.io)
If you need other headers
- For provider‑specific call/caller identification headers that differ from the above, contact ElevenLabs Support to enable/mapping so they’re exposed to your agent. (elevenlabs.io)
Optional (Twilio inbound flows)
- You can enable the conversation‑initiation webhook for inbound Twilio calls; ElevenLabs will POST caller_id/called_number/call_sid to your endpoint, and you can return dynamic_variables for the agent’s runtime. (elevenlabs.io)
Sources:
SIP trunking | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
SIP trunking | ElevenLabs Documentation
Twilio personalization | ElevenLabs Documentation
Explain and guide me through "consume them via your pre‑call webhook and/or map them into dynamic variables for the agent."