Inbound SIP calls do not expose CallSid/ParentCallSid via Twilio API when using OpenAI Realtime cannot obtain SID before transfer
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- api
Research direction
The report names no twilio-python file, test, or entry point; it concerns Twilio Calls API behavior for SIP and OpenAI Realtime. Start by checking whether the client exposes an endpoint or response field relevant to the reported CallSid, then compare the behavior with the documented API. Done would require a maintainer-supported answer or a narrowly identified repository change.
Written by the indexing model from the issue text.
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?
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 815
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twilio/twilio-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
twilio/twilio-python#932 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
twilio/twilio-python#930 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
twilio/twilio-python#925 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
twilio/twilio-python#916 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
twilio/twilio-python#883 · 1 comment ·
All issues in twilio/twilio-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·