{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigzaukaq2jxhi5l732ovekrmcu6t2s2crw4rdozk5dsd2ggedns2m",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mm6pztrxfqx2"
  },
  "path": "/t/sip-refer-silently-failing-fresh-call-id-with-confirmed-current-payload-format/1381263#post_1",
  "publishedAt": "2026-05-19T05:30:49.000Z",
  "site": "https://community.openai.com",
  "tags": [
    "@OpenAI_Support"
  ],
  "textContent": "Thanks for the diagnosis. You were right — the `Missing required parameter: 'session.type'` error came from our `session.update` calls over the WebSocket sideband. The SDK’s `connection.session.update(session={...})` helper doesn’t automatically include `\"type\": \"realtime\"` inside the session object. We’ve patched that in all 3 call sites and verified sessions now run end-to-end without that error.\n\nFresh test call demonstrating the corrected flow but persistent /refer issue:\n\n**call_id** : `rtc_u0_Dh72Y82UgVr8Islheq03l`\n**timestamp** : 2026-05-19 05:12:20 UTC\n\nWhat happened:\n\n  1. `/accept` returned 200 cleanly (using SDK’s `client.realtime.calls.accept()`)\n\n  2. Sideband WebSocket connected (`connect_duration_ms=680`)\n\n  3. `session.update` with `{\"type\": \"realtime\", \"temperature\": 0.8}` accepted with no error\n\n  4. Session ran 50 seconds — agent greeted, transcribed caller turns, responded with audio\n\n  5. Caller asked at 05:12:48: _“OK, got it. Can you please transfer me to a human?”_\n\n  6. Agent spoke the transfer line at 05:12:50\n\n  7. We called `client.realtime.calls.refer(call_id=\"rtc_u0_Dh72Y82UgVr8Islheq03l\", target_uri=\"tel:+61420351258\")` via the official Python SDK **2.36.0**\n\n  8. **`/refer` returned HTTP 200 with empty body at 05:12:54.348 (616ms duration)**\n\n  9. Caller sat in silence for 16 seconds — no SIP REFER ever arrived on the Twilio leg\n\n  10. Twilio reports `DialCallStatus: completed, sip_response_code: 200` at 05:13:10; caller hung up\n\n\n\n\n**Verification we’re on the current payload format:**\n\n  * `/accept`: via SDK’s `client.realtime.calls.accept(call_id, type=\"realtime\", model=..., ...)`. Top-level `type: \"realtime\"` per SDK source.\n\n  * `session.update` over WS: explicitly includes `{\"type\": \"realtime\", ...}` inside the session object.\n\n  * `/refer`: via SDK’s `client.realtime.calls.refer(call_id, target_uri=\"tel:+...\")` — no custom headers, body is `{\"target_uri\": \"tel:+61420351258\"}` per `CallReferParams`.\n\n\n\n\nThe session is unambiguously healthy this time — 50 seconds of normal back-and-forth audio confirms it. `/refer` returns 200 in <700ms but the underlying SIP REFER message never reaches Twilio’s trunk. We can confirm via Twilio’s call event log: no `REFER` event present, only the original `INVITE` and an eventual `BYE` when the caller hangs up.\n\nCould you check server-side handling for this specific call_id? Specifically:\n\n  * Is the SIP REFER actually being generated and sent toward Twilio’s trunk?\n\n  * Are there backend errors after our `/refer` POST that aren’t reflected in the HTTP response?\n\n\n\n\nHappy to provide additional call IDs if that helps.\n\nThanks,\nSP\n@OpenAI_Support",
  "title": "SIP REFER silently failing — fresh call_id with confirmed \"current\" payload format"
}