Commit graph

63 commits

Author SHA1 Message Date
Abhishek Kumar
ee216c0e40 chore: refactor AGENTS.md 2026-05-20 15:56:52 +05:30
Sabiha Khan
8778bb453e
chore: mandate telnyx signature verification (#319) 2026-05-19 16:50:27 +05:30
Abhishek Kumar
fc04f31639 fix: force FORCE_TURN_RELAY for local IPs in setup 2026-05-16 18:37:38 +05:30
Abhishek
2381a803ad
feat: add openai realtime models (#298)
* feat: add openai realtime models

* chore: bump pipecat

* fix: resample telephony audio for openai realtime

* fix: sampling rate fix for openai realtime

* chore: clean up dead code
2026-05-16 18:05:23 +05:30
Nir Simionovich
7df73beea3
Resolve an issue with direct socket connections using the wrong event… (#289)
* Resolve an issue with direct socket connections using the wrong event data.

* Resolve the formatting issus in the provider file

* chore: fix import ordering with ruff

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Nir Simionovich <nirs@cloudonix.io>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 18:20:14 +05:30
Abhishek Kumar
b728cc4922 chore: fix ARI documentation 2026-05-13 21:53:18 +05:30
Sabiha Khan
ebeffdbc40
fix(ari): pre-register ext channel id and defer bridge to its StasisS… (#284)
* fix(ari): pre-register ext channel id and defer bridge to its StasisStart

Two race conditions in the inbound ARI flow could leave a call silent:

1. Bridging both channels immediately after creating the ext media leg
   raced against the ext channel entering the Stasis application; slow
   chan_websocket handshakes produced "Channel not in Stasis application"
   422 errors on addChannel.

2. Asterisk could fire StasisStart for the ext channel before the
   externalMedia POST response returned, so _is_ext_channel returned
   False and the event was dropped as an unknown outbound call.

Fixes:
- Generate the ext channel id as dograh-ext-<uuid> client-side and pass
  it to Asterisk via the channelId query param. Mark the ext channel,
  set its channel->run mapping, register the pending bridge entry, and
  persist gathered_context.ext_channel_id all before the POST.
- Defer the bridge to a new _complete_bridge_after_ext_ready handler
  triggered by the ext channel's own StasisStart. Both channels are
  guaranteed in Stasis by then, so addChannel cannot 422.
- On POST failure or channelId mismatch, roll back the pending entry
  and ERROR loudly.

* fix: replace in-memory dict with redis storage
2026-05-13 18:33:34 +05:30
Sabiha Khan
b670004725
feat: verify telnyx webhook signature optionally (#279) 2026-05-12 19:47:28 +05:30
Abhishek Sharma
137b5e9f89
Verify Telnyx webhook signatures (#271)
* Verify Telnyx webhook signatures

* feat: harden telnyx webhook signature verification

---------

Co-authored-by: a692570 <a692570@users.noreply.github.com>
Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-05-12 18:37:31 +05:30
Sabiha Khan
a1902829db
fix: prior pre-pr drift check failures (#276)
* fix: prior pre-pr drift check failures

* docs: update api reference openapi json
2026-05-12 14:17:40 +05:30
Sabiha Khan
4a6752e62b
feat(telephony/telnyx): add call transfer via conference bridge (#274)
Conference-based transfer for Telnyx with a two-step flow:
- transfer_call dials the destination with a per-transfer webhook URL.
- On call.answered, the webhook seeds a conference with the destination's
  live call_control_id and publishes DESTINATION_ANSWERED.
- TelnyxConferenceStrategy joins the caller into the conference on
  pipeline teardown (EndTaskReason.TRANSFER_CALL).
- On post-answer destination hangup, the webhook hangs up the caller —
  Telnyx's create_conference doesn't accept end_conference_on_exit on
  the seed leg, so we tear down the bridge ourselves.

TransferContext gains optional workflow_run_id (for webhook→provider
resolution in multi-config orgs) and conference_id (set on answer,
rd by the strategy).

Also fixes the transfer tool's provider lookup to go through
get_telephony_provider_for_run instead of the deprecated org-default
shim, which was returning the wrong provider in multi-config orgs.
2026-05-12 13:44:39 +05:30
Sabiha Khan
01c201bf09
feat: add telnyx webhook api key in telephony config (#270) 2026-05-09 18:03:42 +05:30
Sabiha Khan
d2a119c38a
feat: add headless mode, redesign floating widget, refactor lifecycle callbacks (#268)
* feat: add headless widget for deployment

* feat: call callbacks at the right time

* feat: add onCallConnected & onCallDisconnected callback

* feat: add a button with text for floating widget

* feat: add headless widget for deployment

* feat: call callbacks at the right time

* feat: add onCallConnected & onCallDisconnected callback

* feat: add a button with text for floating widget

* docs: web widget

* fix: format issue in pre-pr drift check

* fix: fix CD to rely on pipecat dev dependey

* chore: update message

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-05-07 12:23:41 +05:30
Abhishek Kumar
31e2c135b0 fix: add missing call_id in gathered_context for telnyx 2026-05-06 19:51:13 +05:30
Abhishek
d4b6afb020
feat: add logs in campaigns for failure or pausing (#265)
* feat: add logs in campaigns on failure

* chore: bump pipecat

* chore: update format.sh

* chore: fix github workflow

* fix: fix formatting errors
2026-05-05 19:23:50 +05:30
Abhishek Kumar
abfb678b4d chore: bump pipecat 2026-05-05 15:59:12 +05:30
Abhishek
0e12c41fc7
chore: bump pipecat version and fix tests (#263)
* chore: bump pipecat version and fix tests

* chore: add github workflow to run tests

* fix: install reqirements.dev.txt in test script

* fix: fix api-test action

* feat: add integration test

* test: add integration tests

* test: add test for function call mute strategy
2026-05-04 21:35:37 +05:30
Abhishek
7fd3b96470
feat: agent stream for cloudonix OPBX (#261)
* feat: agent stream for cloudonix OPBX

* feat: make cloudonix app name optional

* feat: create application while configuring telephony config

* fix: get telephony configuration from stamped workflow run

* fix: fix vobiz hangup URL
2026-05-02 15:53:58 +05:30
Abhishek
14bc66d21d
fix: normalise telnyx event types (#259) 2026-04-30 15:42:55 +05:30
Sabiha Khan
085ab0a7ae
fix: honor telnyxs per-call codec in bidirectional stream (#256)
Telnyx's bidirectional stream uses different codecs per direction:
  - Dograh → Telnyx: what we declare via `stream_bidirectional_codec`
  - Telnyx → Dograh: whatever the PSTN leg negotiated (PCMA for UK,
    Europe, India termination; PCMU for US), announced as
    `media_format.encoding` on the WebSocket start message.

We hardcoded both directions on the serializer to PCMU, so any call
whose PSTN leg used PCMA arrived as A-law bytes that we decoded
through a μ-law table → static for the entire call.

`handle_websocket` now extracts `media_format.encoding` from the
start message and threads it through `transport_kwargs`. The
serializer uses it for the Telnyx → Dograh direction; the
Dograh → Telnyx direction stays pinned to PCMU to match the
unchanged `stream_bidirectional_codec` in the dial/answer payloads.

Note: pipecat's `TelnyxFrameSerializer` names its params from the
call's POV, not Dograh's — `inbound_encoding` is what we send into
the call, `outbound_encoding` is what we receive. Easy to mix up.
2026-04-29 19:20:52 +05:30
Abhishek
e16f6438bd
feat: refactor telephony to support multiple telephony configurations (#251)
Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-04-29 11:39:57 +05:30
dilipevents2007-cpu
2218ba8ad9
feat: add Plivo telephony provider support (#245)
* Add Plivo telephony provider support

* add Plivo telephony UI, fix audio config, and improve inbound call handling

---------

Co-authored-by: Dilip Tiwari <digitalapache20@gmail.com>
Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
Co-authored-by: Abhishek <abhishek@a6k.me>
2026-04-25 20:41:46 +05:30
Abhishek Kumar
e7adbc7bad feat: add default telephony variables 2026-04-02 14:48:13 +05:30
Abhishek Kumar
83f05ab146 fix: send auth credentials with validate service keys 2026-03-27 00:07:38 +05:30
Sabiha Khan
e5e19541c3 fix: imports in telnyx_provider 2026-03-25 19:35:33 +05:30
Sabiha Khan
5b820cb0ba
feat: integrate Telnyx telephony for outbound and inbound calling (#206)
* feat: integrate Telnyx telephony for outbound and inbound calling

* chore: remove redundant code

---------

Co-authored-by: Abhishek <abhishek@a6k.me>
2026-03-25 18:01:41 +05:30
Abhishek Kumar
5114ca5ee7 chore: upgrade pipecat 2026-03-07 14:55:19 +05:30
Sabiha Khan
e4759ac6f2
revert: cloudonix amd (#183) 2026-03-07 09:56:04 +05:30
Sabiha Khan
3c5bc688ed
feat: hang up cloudonix machine answered call if feature flag enabled (#182) 2026-03-06 15:22:44 +05:30
Sabiha Khan
7b77721964
fix: add cloudonix call hangup strategy (#181)
* fix: add cloudonix call hangup strategy

* chore: upgrade pipecat
2026-03-06 13:31:43 +05:30
Abhishek Kumar
3ea235a666 fix: fix circuit breaker failure recording
fix: fix circuit breaker failure recording
chore: provide advanced configuration option in UI for campaigns
2026-03-05 13:43:13 +05:30
Sabiha Khan
628132f29b
feat: add cloudonix amd callback with logs only (#177) 2026-03-05 09:29:04 +05:30
Sabiha Khan
bd07b753cd
feat: tansfer calls with aasterisk (#171)
* feat: tansfer calls with aasterisk

* chore: format code with pre-commit script

* chore: refactor code

* refactor: add call strategies, cleanup transfer events

* fix: docker compose, add missing files from merge conflicts

* chore: update pipecat

* docs: restructure & add mintilify pages for tool

* chore: upgrade pipecat
2026-03-05 09:28:05 +05:30
Sabiha Khan
ad6261333d
chore: add debug log for cloudonix websocket stop event (#176) 2026-03-02 11:07:11 +05:30
Sabiha Khan
13b41437e8
fix: missing call_id in gathered_context (#165) 2026-02-18 21:13:28 +05:30
Abhishek
7552b6c819
feat: add asterisk ARI websocket interface (#159)
* chore: remove old files

* feat: ari outbound dialing

* feat: add websocket configuration for ARI

* feat: handling inbound calls

* delete ext channel from redis on stasis end

* fix: add lock in workflow run update, refactor _handle_stasis_start

* chore: update submodule

---------

Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-02-17 19:32:03 +05:30
Sabiha Khan
c711920165
feat: telephony call transfer (#155)
* transfer call

* fix: ignore completed call status

* chore: refactor telephony

* chore: refactor pipecat engine custom tools and other telephony services

* chore: code refactor

* chore: put back office ambient sound files

* chore: remove transport from engine

* fix: fix alembic revision

* chore: remove set_transferring_call from engine

* fix: send OutputAudio frame and let transport chunk it

* fix: reinstate docker compose

* chore: remove unused transfer-twmil route for caller

* chore: update pipecat submodule

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-02-16 14:33:33 +05:30
Abhishek
b9ddd30813
fix: fix cloudonix call hangup (#154) 2026-02-13 11:44:10 +05:30
Abhishek Kumar
cff9674c9e chore: bump pipecat version 2026-02-11 18:18:32 +05:30
Abhishek Kumar
3cdede0f45 feat: limit campaign concurrency to number of CLIs 2026-02-07 13:45:21 +05:30
Abhishek Kumar
8c42866f80 fix: better error handling for telephony 2026-02-05 14:11:44 +05:30
Abhishek Kumar
e9c5da16c5 fix: add error in cloudonix cdr report 2026-01-29 20:43:53 +05:30
Abhishek
b1c982a52e
fix: add cloudonix CDR handling (#140)
* feat: add cloudonix cdr

* fix: remove org check

---------

Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-01-29 19:06:52 +05:30
Sabiha Khan
4a8e4fe7a1
fix: BACKEND_API_ENDPOINT resolution from env and cloudflared tunnel (#135) 2026-01-29 14:06:08 +05:30
Abhishek
911c5ed416
fix: changes to update pipecat version to 0.0.100 (#122)
* feat: add stt evals

* add smart turn as provider

* chore: remove deprecations

* chore: format files

* fix: remove deprecated UserIdleProcessor

* fix: remove deprecated TranscriptProcessor

* chore: update pipecat submodule

* feat: add evals visualisation

* fix: trigger llm generation on client connected and pipeline started

* chore: update pipecat

* chore: update pipecat submodule

* Add tests

* fix: slow loading of workflow page

* chore: update pipecat submodule

* Show version after release

* Fixes #99

* fix: provider check for websocket connection

* Fixes #107

* Fix #96

* chore: fix documentation

* fix: cloudonix campaign call error

---------

Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-01-23 18:53:59 +05:30
Abhishek Kumar
d35eeb1b7b fix: fix OPENAI_API_KEY bug in retrieval 2026-01-17 18:12:56 +05:30
Sabiha Khan
e2fa4bbb98
feat: handle cloudonix incoming calls (#121) 2026-01-17 14:36:51 +05:30
Sabiha Khan
97fbd9b37b
Feat/inbound telephony (#113)
* feat: inbound telephony (twilio & vobiz)

* chore: add ruff and lint formatting

* fix: add missing cloudonix interface compliance implementation
2026-01-12 10:10:30 +05:30
Abhishek Kumar
04576ac357 fix: llm generation in case of user idle
Send for LLM generation in case of user idle rather than speaking a hardcoded sentence
2026-01-03 16:22:38 +05:30
Nir Simionovich
90b690efff
feat: add cloudonix outbound telephony (#101)
Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-01-03 12:02:21 +05:30