Skip to content

docs: add Telnyx quickstart and configuration parity#103

Merged
nicolotognoni merged 1 commit into
PatterAI:mainfrom
a692570:telnyx-docs-parity
May 25, 2026
Merged

docs: add Telnyx quickstart and configuration parity#103
nicolotognoni merged 1 commit into
PatterAI:mainfrom
a692570:telnyx-docs-parity

Conversation

@a692570
Copy link
Copy Markdown
Contributor

@a692570 a692570 commented May 25, 2026

Summary

The Patter SDK README currently presents a Twilio-only getting-started experience despite the SDK championing "Twilio + Telnyx parity." This PR corrects that imbalance by adding Telnyx-specific quickstart snippets, environment variables, and softening an outdated recording limitation note.

Changes

  1. Quickstart — env var sections

    • Split the single env var block into labeled Twilio and Telnyx sections, showing TELNYX_API_KEY and TELNYX_CONNECTION_ID.
  2. Quickstart — Python snippet

    • Added a Telnyx Python block mirroring the existing Twilio snippet: from getpatter import Patter, Telnyx, OpenAIRealtime and the 4-line Patter(carrier=Telnyx(), ...) pattern.
  3. Quickstart — TypeScript snippet

    • Added a Telnyx TypeScript block following the same 4-line pattern with new Telnyx().
  4. Configuration → Environment Variables table

    • Added three Telnyx rows:
      • TELNYX_API_KEY
      • TELNYX_CONNECTION_ID
      • TELNYX_PHONE_NUMBER
    • Used the existing table format and the "Yes (Telnyx)" required-cell convention already present elsewhere in the docs.
  5. Telnyx provider note

    • Updated the "Recording is Twilio-only" line to note that recording parity is supported via Telnyx Call Control, with a pointer to the Telnyx portal for configuration.

Scope

  • Only README.md is modified.
  • No source code, tests, or CI changes.,

@nicolotognoni nicolotognoni merged commit 7eb97d1 into PatterAI:main May 25, 2026
nicolotognoni added a commit that referenced this pull request May 25, 2026
…ts (#105)

The ``EmbeddedServer wraps logging callbacks with active-record fallback``
test fired once on PR #103's CI run and once on the post-merge ``main``
run with the same root cause: ``setTimeout(50)`` to drain a
fire-and-forget ``logCallStart`` is not enough on Node 22 (~10 %
failure rate) — the async scheduler defers the atomic-write resolve a
tick longer than on Node 20 where the test was originally tuned.

Replaced the fixed wait with a bounded poll: walk ``tmp`` for
``metadata.json`` every 25 ms up to 2 s, break on first hit. Same
assertion, no behaviour change in the SUT, fast path is unchanged
(the file lands within ~30 ms on both Node versions when the system
is idle).
nicolotognoni added a commit that referenced this pull request May 25, 2026
* feat(recording): Telnyx recording parity (#103)

Bring Telnyx call recording to feature parity with Twilio across
the Python and TypeScript SDKs.

Telnyx Call Control already supports recording via the
 and  REST endpoints.
Both Python and TypeScript stream bridges already POST to these
endpoints when  is passed.  This PR closes the
remaining gaps:

- **Python server**: add a  webhook handler
  that logs the recording URL (mirrors the Twilio
   route and the existing TS handler).
  Tries  → , mp3 then wav.

- **Docs**: remove the "Recording is Twilio-only" claim from all
  three READMEs (root, python/, typescript/).

- **TypeScript inline docs**: update the
  comment to reflect that both Twilio and Telnyx are supported.

- **Tests**: add unit tests for Telnyx bridge recording
  (,
  ).

Files changed:
- libraries/python/getpatter/server.py
- libraries/python/README.md
- libraries/python/tests/unit/test_telnyx_bridge_unit.py
- libraries/typescript/README.md
- libraries/typescript/src/stream-handler.ts
- README.md

No Twilio code paths were modified.  No new dependencies were added
(Telnyx recording is pure httpx, already a base dependency).

* chore(recording): rebase + CHANGELOG + webhook handler tests

Maintainer follow-up on Abhishek's Telnyx recording parity PR (#106):

- Resolved README rebase conflict against post-0.6.2 main. Aligned all
  three READMEs (root, libraries/python, libraries/typescript) on the
  same copy ("Recording parity is supported via Telnyx Call Control;
  consult the Telnyx portal for configuration details.") that #103
  introduced on the root README.
- Added CHANGELOG.md entries under ## Unreleased / ### Added and
  ### Changed (invariant 0 of documentation-best-practices.md).
- Added 4 unit tests in tests/unit/test_server_unit.py covering the new
  call.recording.saved webhook handler:
    * mp3 URL preferred over wav
    * wav fallback when mp3 missing
    * public_recording_urls fallback when recording_urls is empty
    * empty payload still logs call_control_id, returns 200
  The contributor's tests covered the bridge (which was already
  implemented pre-PR); this commit covers the actually new code path.

All tests green: pytest tests/unit/test_server_unit.py
::TestTelnyxRecordingSavedWebhook → 4 passed; existing
TestTelnyxRecording bridge tests → 2 passed.

---------

Co-authored-by: Abhishek <abhishek@telnyx.com>
Co-authored-by: nicolotognoni <nicolo.tognoni1@gmail.com>
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