Skip to content

Wire sip into conversations.sip_outbound_call (stacked on #170) - #171

Merged
arunwpm-work merged 4 commits into
mainfrom
fix/wire-sip-outbound-call
Aug 24, 2026
Merged

Wire sip into conversations.sip_outbound_call (stacked on #170)#171
arunwpm-work merged 4 commits into
mainfrom
fix/wire-sip-outbound-call

Conversation

@arunwpm-work

@arunwpm-work arunwpm-work commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Stacked on #170 (the SDK regeneration) — this PR is only the manual wiring.

Problem

conversations.sip_outbound_call types and documents a sip argument (transport + media_encryption) but never accepts or sends it — callers passing sip= 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.py and raw_client.py are in .fernignore (hand-maintained for the custom websocket / reconnectable-socket code). #170 regenerates the sip types but cannot touch the frozen methods that consume them, so the wiring never lands.

This PR

Hand-wires sip into the four .fernignore'd conversations methods (sync/async × raw/public), mirroring how config is threaded. The added lines are byte-identical to what generation emits for a non-ignored endpoint (verified against agents.add_custom_phone_number and a raw local-fs generation). Durable — regen won't clobber hand-maintained files.

Verification

  • sip present on all four sip_outbound_call signatures.
  • ConversationsSipOutboundCallRequestSipParams serializes into the body: {'transport': 'tls', 'media_encryption': 'allowed'}.
  • Diff is exactly the two files / wiring lines; the custom websocket code is untouched.

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 config pattern; no auth or server logic changes.

Overview
Fixes a Python SDK gap where sip_outbound_call could not accept sip= even though the API supports trunk settings in the request body (e.g. transport, media_encryption).

The optional sip argument is added to all four hand-maintained sip_outbound_call entry points (sync/async on client.py and raw_client.py), passed through like config, 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.

fern-api Bot added 2 commits August 24, 2026 05:59
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-python-sdk: 4.64.1
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a7b3faae-b102-4c22-81b6-bf7d3518c446

📥 Commits

Reviewing files that changed from the base of the PR and between 1729f51 and d57e139.

📒 Files selected for processing (19)
  • src/phonic/__init__.py
  • src/phonic/agents/__init__.py
  • src/phonic/agents/client.py
  • src/phonic/agents/raw_client.py
  • src/phonic/agents/requests/__init__.py
  • src/phonic/agents/requests/agents_add_custom_phone_number_request_sip.py
  • src/phonic/agents/types/__init__.py
  • src/phonic/agents/types/agents_add_custom_phone_number_request_sip.py
  • src/phonic/agents/types/agents_add_custom_phone_number_request_sip_media_encryption.py
  • src/phonic/agents/types/agents_add_custom_phone_number_request_sip_transport.py
  • src/phonic/conversations/__init__.py
  • src/phonic/conversations/client.py
  • src/phonic/conversations/raw_client.py
  • src/phonic/conversations/requests/__init__.py
  • src/phonic/conversations/requests/conversations_sip_outbound_call_request_sip.py
  • src/phonic/conversations/types/__init__.py
  • src/phonic/conversations/types/conversations_sip_outbound_call_request_sip.py
  • src/phonic/conversations/types/conversations_sip_outbound_call_request_sip_media_encryption.py
  • src/phonic/conversations/types/conversations_sip_outbound_call_request_sip_transport.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The 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.

Changes

SIP trunk configuration

Layer / File(s) Summary
Agents SIP request contract
src/phonic/agents/types/*, src/phonic/agents/requests/*, src/phonic/agents/__init__.py, src/phonic/__init__.py
Adds SIP transport and media-encryption types, request parameters, Pydantic models, and lazy public exports.
Agents phone-number API wiring
src/phonic/agents/client.py, src/phonic/agents/raw_client.py
Adds optional sip settings to synchronous and asynchronous custom phone-number methods. The raw clients serialize the settings into request bodies.
Conversations SIP request contract
src/phonic/conversations/types/*, src/phonic/conversations/requests/*, src/phonic/conversations/__init__.py, src/phonic/__init__.py
Adds SIP outbound-call types, request parameters, Pydantic models, and lazy public exports.
Conversations outbound-call API wiring
src/phonic/conversations/client.py, src/phonic/conversations/raw_client.py
Adds optional sip settings to synchronous and asynchronous SIP outbound-call methods. The raw clients serialize the settings into request bodies.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to d57e1

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)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 19 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding SIP support to conversations.sip_outbound_call.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wire-sip-outbound-call

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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>
@arunwpm-work
arunwpm-work changed the base branch from main to fern-bot/2026-08-24_04-13-03_916 August 24, 2026 21:54
@arunwpm-work
arunwpm-work force-pushed the fix/wire-sip-outbound-call branch from d57e139 to e4216e0 Compare August 24, 2026 21:54
@arunwpm-work arunwpm-work changed the title Wire sip into conversations.sip_outbound_call (fix .fernignore'd drop) Wire sip into conversations.sip_outbound_call (stacked on #170) Aug 24, 2026

@qionghuang6 qionghuang6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muy bien

@arunwpm-work
arunwpm-work changed the base branch from fern-bot/2026-08-24_04-13-03_916 to main August 24, 2026 22:00
@arunwpm-work
arunwpm-work merged commit ce74c6c into main Aug 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants