-
Notifications
You must be signed in to change notification settings - Fork 796
Description
When receiving inbound SIP calls routed through Twilio Elastic SIP Trunking into OpenAI Realtime, the incoming webhook correctly includes call_id, but Twilio's own API (/Calls) does not return the Call SID at all until after a transfer or after the call fully completes.
This means:
You cannot fetch the inbound CallSid from Twilio using
/Calls?From=...&To=...
ParentCallSid is always missing
The call does not appear in Twilio’s Call Logs API in real-time
Only after a SIP REFER transfer or call completion does the CallSid appear
This makes it impossible to interact with Twilio Voice API call control before transfer, even though the call is active and controlled by OpenAI Realtime.
Expected Behavior
Twilio API (/Calls) should expose the inbound SIP CallSid immediately when the call arrives
ParentCallSid should be present if applicable
Searching by From or To should return the inbound call before any transfer occurs
Actual Behavior
/2010-04-01/Accounts/{sid}/Calls.json?From=xxx&To=xxx returns an empty list
ParentCallSid is always null for inbound SIP calls
Twilio only logs the call after a transfer (SIP REFER) or after the call ends
OpenAI Realtime webhook provides call_id, but Twilio API does not return this SID anywhere
Steps to Reproduce
-
Receive inbound SIP call → Twilio SIP trunk → OpenAI Realtime webhook
-
Extract event.data.call_id
-
Query Twilio API:
GET /v1/Calls?From=&To=<trunk_number>
- API returns:
calls: []
-
Attempt to obtain ParentCallSid → always null
-
Perform a SIP REFER transfer → Twilio then creates a child call
-
Only now the call appears in Call Logs
Why This Is a Problem
Cannot inspect or log the inbound call using Twilio APIs
Cannot correlate OpenAI’s call_id with Twilio’s CallSid in real-time
Cannot apply Twilio Voice features before transfer
Makes debugging SIP REFER + Realtime workflows more difficult
Environment
Twilio Elastic SIP Trunking
SIP REFER transfers enabled
OpenAI Realtime API used for call handling
Incoming call webhook configured correctly
Request
Please clarify:
-
Is this missing CallSid exposure for inbound SIP → OpenAI Realtime intentional?
-
Should inbound SIP calls be queryable in the Twilio Calls API before transfer?
-
Is there any supported way to obtain the Twilio CallSid through Twilio API itself, not only via OpenAI’s webhook?