Wire sip into conversations.sip_outbound_call (stacked on #170) - #171
Conversation
Generated by Fern CLI Version: unknown Generators: - fernapi/fern-python-sdk: 4.64.1
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (19)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe package adds optional SIP transport and media-encryption settings to custom phone-number creation and SIP outbound calls. New request types and public exports support synchronous and asynchronous clients. ChangesSIP trunk configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This PR adds optional SIP transport and media-encryption parameters to existing call setup APIs. No actionable merge-blocking risk remains; it is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The sip param (transport + media_encryption) is typed and documented by the
regeneration but never sent: conversations/{client,raw_client}.py are in
.fernignore (hand-maintained for the custom websocket code), so regen adds the
sip TYPES but can't touch the frozen methods that consume them (cursor bugbot
on this PR's predecessor). Callers passing sip= hit an unexpected-keyword error
and transport/media_encryption never reach the API; Node is unaffected.
Hand-wires sip into the four .fernignore'd conversations methods (sync/async x
raw/public), mirroring how config is threaded. Stacked on the regeneration so
this diff is only the wiring.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d57e139 to
e4216e0
Compare
Stacked on #170 (the SDK regeneration) — this PR is only the manual wiring.
Problem
conversations.sip_outbound_calltypes and documents asipargument (transport + media_encryption) but never accepts or sends it — callers passingsip=get an unexpected-keyword error and their settings never reach the API (cursor bugbot on #170). The TypeScript SDK is unaffected (it rest-spreads the request body).Root cause
conversations/client.pyandraw_client.pyare in.fernignore(hand-maintained for the custom websocket / reconnectable-socket code). #170 regenerates thesiptypes but cannot touch the frozen methods that consume them, so the wiring never lands.This PR
Hand-wires
sipinto the four.fernignore'd conversations methods (sync/async × raw/public), mirroring howconfigis threaded. The added lines are byte-identical to what generation emits for a non-ignored endpoint (verified againstagents.add_custom_phone_numberand a raw local-fs generation). Durable — regen won't clobber hand-maintained files.Verification
sippresent on all foursip_outbound_callsignatures.ConversationsSipOutboundCallRequestSipParamsserializes into the body:{'transport': 'tls', 'media_encryption': 'allowed'}.Merge order: #170 first (regen + version bump 0.32.25 + boilerplate), then this.
🤖 Generated with Claude Code
Note
Low Risk
Narrow SDK client wiring that mirrors the existing
configpattern; no auth or server logic changes.Overview
Fixes a Python SDK gap where
sip_outbound_callcould not acceptsip=even though the API supports trunk settings in the request body (e.g.transport,media_encryption).The optional
sipargument is added to all four hand-maintainedsip_outbound_callentry points (sync/async onclient.pyandraw_client.py), passed through likeconfig, and serialized into the POST JSON under"sip". No websocket or other conversation behavior is changed.Reviewed by Cursor Bugbot for commit 9789d5c. Bugbot is set up for automated code reviews on this repo. Configure here.