Skip to content

docs(plivo): add Plivo to per-SDK carrier docs + sweep stale Twilio/Telnyx mentions#122

Merged
nicolotognoni merged 1 commit into
PatterAI:mainfrom
amalshaji-plivo:docs/plivo-carrier-pages
May 29, 2026
Merged

docs(plivo): add Plivo to per-SDK carrier docs + sweep stale Twilio/Telnyx mentions#122
nicolotognoni merged 1 commit into
PatterAI:mainfrom
amalshaji-plivo:docs/plivo-carrier-pages

Conversation

@amalshaji-plivo
Copy link
Copy Markdown
Contributor

Summary

The merged Plivo carrier PR (#121) updated docs/concepts.mdx but missed the dedicated per-SDK carrier pages and a long tail of "Twilio or Telnyx" sentences scattered across the doc site. This PR closes both gaps — 15 files, all docs, no code.

Per-SDK carrier pages (docs/{python,typescript}-sdk/carrier.mdx)

New ## Plivo section in each, mirroring the existing Twilio / Telnyx sections:

  • construction example (env-fallback and explicit auth_id/auth_token)
  • params table + namespaced form (Python)
  • serve() auto-config behaviour — creates a Plivo Application + links the number; manage_webhook=False / manageWebhook: false opts out
  • TS-only "how caller / callee reach the agent" section — WSS query string + extraHeaders fallback (mirrors the existing Telnyx explainer)
  • wire format and parity gains: pinned mulaw 8 kHz, native DTMF send over the WS, Speak-API voicemail drop, async AMD wiring, hangup_url status callback
  • V3 signature spec — POST url + sorted_post_params + "." + nonce vs GET url + "." + nonce, HMAC-SHA256, key rotation
  • four new rows in the Webhook Endpoints table: voice, status, amd, transfer

Also corrected the opening capability summary — recording is no longer "Twilio-only" (Telnyx parity landed in #106, Plivo has the Record API too). Replaced with a call-out for native DTMF send as the Plivo-specific parity gain over Twilio Media Streams.

Wider sweep — stale carrier-pair-only mentions

File Change
docs/concepts.mdx Diagram (anatomy of a call) + Carrier setup card label
docs/home/index.mdx Landing-page supported-carriers line
docs/python-sdk/overview.mdx + typescript-sdk/overview.mdx Prerequisites + "How Patter runs"
docs/python-sdk/local-mode.mdx + typescript-sdk/local-mode.mdx Opening blurb + graceful-shutdown step
docs/python-sdk/reference.mdx WEBHOOK_VERIFICATION error-code row
docs/python-sdk/tracing.mdx patter.cost.telephony_minutes span emitters
docs/python-sdk/providers/elevenlabs-convai.mdx + typescript-sdk/providers/elevenlabs-convai.mdx Pricing carve-out
docs/python-sdk/tts.mdx + typescript-sdk/tts.mdx .for_twilio() factories now noted to apply unchanged to Plivo (same mulaw 8 kHz wire) — no method rename
docs/integrations/openclaw.mdx Page description + configure-telephony skill row

docs/docs.json needs no change — it only references the single carrier page per SDK, not per-carrier subpages.

🤖 Generated with Claude Code

…x-only mentions

The merged Plivo carrier PR (PatterAI#121) updated ``docs/concepts.mdx`` but
missed the dedicated per-SDK carrier pages and a long tail of one-line
"Twilio or Telnyx" references scattered across the doc site. This PR
closes both gaps.

Per-SDK carrier pages (``docs/{python,typescript}-sdk/carrier.mdx``)
-------------------------------------------------------------------
New ``## Plivo`` section in each, mirroring the Twilio/Telnyx sections:

* construction example (env-fallback and explicit auth_id/auth_token)
* params table (auth_id / auth_token), namespaced form for Python
* ``serve()`` auto-config behaviour (creates a Plivo Application + links
  the number, with ``manage_webhook=False`` / ``manageWebhook: false``
  opt-out)
* TS-only "how caller / callee reach the agent" section — WSS query
  string + ``extraHeaders`` fallback (mirrors the existing Telnyx
  explainer)
* wire format and parity gains — pinned mulaw 8 kHz, native DTMF send
  over the WS, Speak-API voicemail drop, async AMD wiring, hangup_url
  status callback
* V3 signature spec — POST vs GET algorithm, HMAC-SHA256, rotation
* four new rows in the "Webhook Endpoints" table (voice, status, amd,
  transfer)

Also corrected the opening capability summary: recording is no longer
"Twilio-only" — Telnyx parity landed in PatterAI#106 and Plivo also has it via
the Record API. Updated to call out **native DTMF send** as the
Plivo-specific parity gain.

Wider sweep
-----------
Updated stale "Twilio or Telnyx" / "Twilio + Telnyx" / "Twilio /
Telnyx" mentions in:

* ``docs/concepts.mdx`` — the "anatomy of a call" diagram and the
  "Carrier setup" card label.
* ``docs/home/index.mdx`` — landing-page supported-carriers line.
* ``docs/python-sdk/overview.mdx`` + ``typescript-sdk/overview.mdx`` —
  prerequisites + "How Patter runs".
* ``docs/python-sdk/local-mode.mdx`` + ``typescript-sdk/local-mode.mdx``
  — opening blurb and graceful-shutdown step.
* ``docs/python-sdk/reference.mdx`` — ``WEBHOOK_VERIFICATION`` error code.
* ``docs/python-sdk/tracing.mdx`` — telephony-minutes span emitters.
* ``docs/python-sdk/providers/elevenlabs-convai.mdx`` +
  ``typescript-sdk/providers/elevenlabs-convai.mdx`` — pricing carve-out.
* ``docs/python-sdk/tts.mdx`` + ``typescript-sdk/tts.mdx`` — ``.for_twilio()``
  factories: noted that Plivo uses the same mulaw 8 kHz wire so the
  factory applies unchanged, no rename needed.
* ``docs/integrations/openclaw.mdx`` — description + ``configure-telephony``
  skill row.

``docs/docs.json`` needs no change — it only references the single
``carrier`` page per SDK, not per-carrier subpages.
amalshaji-plivo added a commit to amalshaji-plivo/Patter that referenced this pull request May 29, 2026
…ging keywords

A sweep for places where Twilio/Telnyx are still hardcoded as the only
two carriers, after PatterAI#121 (carrier code) and PatterAI#122 (carrier docs).

Dashboard UI — real user-visible bug
-------------------------------------
``dashboard-app/src/lib/mappers.ts:mapCarrier`` had:

  if (provider.toLowerCase().includes('telnyx')) return 'telnyx';
  return 'twilio';

…so a Plivo call (whose ``telephonyProvider: 'plivo'`` field doesn't
contain "telnyx") rendered as **Twilio** in every dashboard panel.

The fix introduces a single per-carrier registry as the source of truth
and extracts the two display patterns into purpose-built components:

* ``CARRIERS: { label, dotClass }`` in ``mappers.ts`` — adding a new
  carrier is one struct entry. ``CallCarrier`` derives from its keys
  (``keyof typeof CARRIERS``) and ``mapCarrier`` validates against a
  ``Set`` built from ``Object.keys(CARRIERS)`` so the union, the runtime
  check, and the metadata never drift apart.
* ``CarrierChip`` and ``CarrierBadge`` (new ``components/CarrierBadge.tsx``)
  are the only places that know how to *render* a carrier — the four
  panels that used to each carry inline ternaries / inline hex styles
  now just drop in the component. Future per-carrier styling lives in
  one file.
* ``.swatch.tw / .tx / .pl`` CSS rules added in ``dashboard.css`` so the
  swatch shares the existing ``.car-dot.*`` palette via a shared
  selector — JS no longer carries hex values.
* ``CallTable`` now types its local ``Call.carrier`` as the imported
  ``CallCarrier`` instead of an inline literal union — addresses the
  pre-existing TODO at ``mappers.ts:9``.

As a side-effect, this fixes a pre-existing bug where the Cost and
Metrics panel swatches were hardcoded Twilio red (``#cc0000``) for every
carrier — Telnyx calls already displayed with a Twilio-coloured swatch.

Packaging keywords
------------------
Added ``"plivo"`` to ``libraries/python/pyproject.toml`` and
``libraries/typescript/package.json`` keywords.

Per-library READMEs
-------------------
``libraries/python/README.md`` and ``libraries/typescript/README.md``
were missing every Plivo reference. Updated env-var table, "Other
carriers" prose, ``Patter`` constructor type signature, API table, flat
re-exports list.

Root README
-----------
"How It Works" ASCII table, ``configure-telephony`` skill row, and
``ring_timeout`` mapping prose all now include Plivo and its
``/webhooks/plivo/status`` callback path.

Verification
------------
* ``tsc --noEmit`` (dashboard) — clean.
* ``vitest run`` (dashboard) — 8/8 passed.
@nicolotognoni nicolotognoni merged commit 2b89d8e into PatterAI:main May 29, 2026
9 checks passed
nicolotognoni pushed a commit to amalshaji-plivo/Patter that referenced this pull request May 29, 2026
…ging keywords

A sweep for places where Twilio/Telnyx are still hardcoded as the only
two carriers, after PatterAI#121 (carrier code) and PatterAI#122 (carrier docs).

Dashboard UI — real user-visible bug
-------------------------------------
``dashboard-app/src/lib/mappers.ts:mapCarrier`` had:

  if (provider.toLowerCase().includes('telnyx')) return 'telnyx';
  return 'twilio';

…so a Plivo call (whose ``telephonyProvider: 'plivo'`` field doesn't
contain "telnyx") rendered as **Twilio** in every dashboard panel.

The fix introduces a single per-carrier registry as the source of truth
and extracts the two display patterns into purpose-built components:

* ``CARRIERS: { label, dotClass }`` in ``mappers.ts`` — adding a new
  carrier is one struct entry. ``CallCarrier`` derives from its keys
  (``keyof typeof CARRIERS``) and ``mapCarrier`` validates against a
  ``Set`` built from ``Object.keys(CARRIERS)`` so the union, the runtime
  check, and the metadata never drift apart.
* ``CarrierChip`` and ``CarrierBadge`` (new ``components/CarrierBadge.tsx``)
  are the only places that know how to *render* a carrier — the four
  panels that used to each carry inline ternaries / inline hex styles
  now just drop in the component. Future per-carrier styling lives in
  one file.
* ``.swatch.tw / .tx / .pl`` CSS rules added in ``dashboard.css`` so the
  swatch shares the existing ``.car-dot.*`` palette via a shared
  selector — JS no longer carries hex values.
* ``CallTable`` now types its local ``Call.carrier`` as the imported
  ``CallCarrier`` instead of an inline literal union — addresses the
  pre-existing TODO at ``mappers.ts:9``.

As a side-effect, this fixes a pre-existing bug where the Cost and
Metrics panel swatches were hardcoded Twilio red (``#cc0000``) for every
carrier — Telnyx calls already displayed with a Twilio-coloured swatch.

Packaging keywords
------------------
Added ``"plivo"`` to ``libraries/python/pyproject.toml`` and
``libraries/typescript/package.json`` keywords.

Per-library READMEs
-------------------
``libraries/python/README.md`` and ``libraries/typescript/README.md``
were missing every Plivo reference. Updated env-var table, "Other
carriers" prose, ``Patter`` constructor type signature, API table, flat
re-exports list.

Root README
-----------
"How It Works" ASCII table, ``configure-telephony`` skill row, and
``ring_timeout`` mapping prose all now include Plivo and its
``/webhooks/plivo/status`` callback path.

Verification
------------
* ``tsc --noEmit`` (dashboard) — clean.
* ``vitest run`` (dashboard) — 8/8 passed.
nicolotognoni pushed a commit that referenced this pull request May 29, 2026
…ging keywords (#123)

A sweep for places where Twilio/Telnyx are still hardcoded as the only
two carriers, after #121 (carrier code) and #122 (carrier docs).

Dashboard UI — real user-visible bug
-------------------------------------
``dashboard-app/src/lib/mappers.ts:mapCarrier`` had:

  if (provider.toLowerCase().includes('telnyx')) return 'telnyx';
  return 'twilio';

…so a Plivo call (whose ``telephonyProvider: 'plivo'`` field doesn't
contain "telnyx") rendered as **Twilio** in every dashboard panel.

The fix introduces a single per-carrier registry as the source of truth
and extracts the two display patterns into purpose-built components:

* ``CARRIERS: { label, dotClass }`` in ``mappers.ts`` — adding a new
  carrier is one struct entry. ``CallCarrier`` derives from its keys
  (``keyof typeof CARRIERS``) and ``mapCarrier`` validates against a
  ``Set`` built from ``Object.keys(CARRIERS)`` so the union, the runtime
  check, and the metadata never drift apart.
* ``CarrierChip`` and ``CarrierBadge`` (new ``components/CarrierBadge.tsx``)
  are the only places that know how to *render* a carrier — the four
  panels that used to each carry inline ternaries / inline hex styles
  now just drop in the component. Future per-carrier styling lives in
  one file.
* ``.swatch.tw / .tx / .pl`` CSS rules added in ``dashboard.css`` so the
  swatch shares the existing ``.car-dot.*`` palette via a shared
  selector — JS no longer carries hex values.
* ``CallTable`` now types its local ``Call.carrier`` as the imported
  ``CallCarrier`` instead of an inline literal union — addresses the
  pre-existing TODO at ``mappers.ts:9``.

As a side-effect, this fixes a pre-existing bug where the Cost and
Metrics panel swatches were hardcoded Twilio red (``#cc0000``) for every
carrier — Telnyx calls already displayed with a Twilio-coloured swatch.

Packaging keywords
------------------
Added ``"plivo"`` to ``libraries/python/pyproject.toml`` and
``libraries/typescript/package.json`` keywords.

Per-library READMEs
-------------------
``libraries/python/README.md`` and ``libraries/typescript/README.md``
were missing every Plivo reference. Updated env-var table, "Other
carriers" prose, ``Patter`` constructor type signature, API table, flat
re-exports list.

Root README
-----------
"How It Works" ASCII table, ``configure-telephony`` skill row, and
``ring_timeout`` mapping prose all now include Plivo and its
``/webhooks/plivo/status`` callback path.

Verification
------------
* ``tsc --noEmit`` (dashboard) — clean.
* ``vitest run`` (dashboard) — 8/8 passed.
nicolotognoni added a commit that referenced this pull request May 29, 2026
…upport (#124)

#123 landed Plivo support in the dashboard UI (CarrierBadge + cost/live/
metrics panel mappers) and added the "plivo" package keyword, but merged
without a CHANGELOG entry. Backfill it under ## Unreleased per the
contemporaneous-changelog rule. Docs-only PRs #119/#122 are exempt.
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