Commit graph

544 commits

Author SHA1 Message Date
Mohamed Mamdouh
b5a192557b fix: use system role for user-idle prompt injections
The UserIdleHandler injected its "are you still there?" and disconnect
prompts as role="user" messages. These are agent-side directives, not
user utterances, so they should be injected as role="system" to avoid
polluting the conversation transcript with fake user turns and to read
correctly by the LLM. Updated the realtime append tests to match.

Also forward ports 3000 (UI) and 8000 (API) in the devcontainer so the
running services are reachable from the host.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 13:39:19 +01:00
Abhishek
97d7103480
feat: add a start docker script (#426)
Adds a start docker script so that we have required values like OSS_JWT_SECRET at runtime
2026-06-11 11:51:30 +05:30
Mubashir R
a81cccc68b
fix(telephony): handle Cloudonix CDR webhooks missing session/disposition (#407)
* fix(telephony): handle Cloudonix CDR payloads missing session/disposition

The /cloudonix/cdr webhook is a public, unauthenticated endpoint that parses
arbitrary external JSON. It dereferenced cdr_data.get("session").get("token")
unconditionally, so a partial or malformed CDR payload that omits "session"
(or sends "session": null) raised AttributeError -> HTTP 500. The existing
"Missing call_id field" guard right below it was unreachable because the crash
happened first.

StatusCallbackRequest.from_cloudonix_cdr had the same fragility plus a second
one: data.get("disposition", "") returns None when the key is present-but-null,
and None.upper() then crashed.

Navigate both fields defensively so missing/null values fall through to the
intended graceful error path instead of crashing. Adds regression tests
covering missing session, null session, null disposition, and the well-formed
mapping path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: harden cloudonix cdr session validation

* chore: renamed test path

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-06-10 17:49:36 +05:30
Manasseh
e79c3e26f0
feat: add Cartesia Sonic 3.5 TTS model (#423) 2026-06-10 15:18:13 +05:30
Abhishek Kumar
91ac460799 chore: finish renaming UserConfiguration 2026-06-09 16:30:03 +05:30
Abhishek
cdbd06c8d9
feat: add config v2 to simplify billing (#428)
* feat: add model config v2

* chore: centralize user org selection

* chore: move preferences to platform settings

* fix: decouple org preference and ai model preferences
2026-06-09 16:10:26 +05:30
Abhishek Kumar
49e68b49d5 fix: harden the postgres default password 2026-06-05 14:30:02 +05:30
Abhishek Kumar
418592178c chore: update docs for pre-call data fetch 2026-06-05 14:16:56 +05:30
Abhishek Kumar
79ff04d8a9 fix: harden vobiz signature verification
Fixes #327
2026-06-05 12:14:37 +05:30
Sabiha Khan
2326a2f65a
chore(main): release dograh 1.34.0 (#389) 2026-06-03 21:41:13 +05:30
nuthalapativarun
dace4a7efc
fix: add CORS preflight handler and ACAO header for embed config endpoint (#403)
* fix: add CORS preflight handler and ACAO header for embed config endpoint

The GET /public/embed/config/{token} endpoint is fetched by external
websites (third-party embed sites). The global CORSMiddleware only covers
first-party origins, so external origins received no Access-Control-Allow-
Origin header, causing browser preflight failures.

Add an OPTIONS /config/{token} handler that validates the origin against the
token's allowed_domains list and returns the appropriate CORS headers.
Also inject Access-Control-Allow-Origin into the GET response via FastAPI's
response parameter so the actual request succeeds cross-origin.

Closes #383

* fix: complete public embed CORS handling

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-03 21:27:44 +05:30
Abhishek
cdb27c1d4f
fix: use runtime BACKEND_URL for proxying (#411)
* fix: use runtime BACKEND_URL for proxying

Fixes #400

* chore: run formatter
2026-06-03 18:47:04 +05:30
developer603
acc2ef9e96
fix: make email lookup case-insensitive in get_user_by_email (#397)
* fix: make email lookup case-insensitive in get_user_by_email

Email addresses are case-insensitive in practice, but get_user_by_email
compared with an exact `UserModel.email == email` predicate. A user who
signed up as "User@example.com" could not be found when logging in as
"user@example.com" (and vice-versa), so the same person could fail to log
in — or be treated as a brand-new account — depending only on how their
client capitalized the address.

Compare on `func.lower(UserModel.email) == func.lower(email)` so lookups
are robust to capitalization. Minimal and backwards-compatible: it works
with existing mixed-case rows immediately, with no migration required.

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

* fix: enforce case-insensitive user emails

---------

Co-authored-by: developer603 <vrramsolutions@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-02 13:43:20 +05:30
Abhishek Kumar
8b9059fbe2 chore: format release please changelogs 2026-06-02 13:42:55 +05:30
shiminshen
51ab9303ec
fix(webrtc): enforce embed allowed-domain policy on public signaling websocket (#388)
The public WebRTC signaling WebSocket (`/public/signaling/{session_token}`)
validated only the session token and its expiry, not the embed token's
allowed-domain policy that the HTTP embed endpoints already enforce. A leaked
or replayed session token could therefore attach to the signaling path from
an arbitrary origin.

Validate the request origin against `embed_token.allowed_domains` (reusing the
existing `validate_origin` helper) before the signaling handoff, rejecting
disallowed origins with a 1008 close — mirroring the HTTP embed endpoints.

Closes #330

Co-authored-by: shiminshen <16914659+shiminshen@users.noreply.github.com>
2026-06-02 13:10:30 +05:30
shiminshen
37e7f4d2e6
fix(telephony): resolve transfer context via call-sid index instead of KEYS scan (#387)
Transfer-context lookup by original_call_sid ran
`redis.keys("transfer:context:*")` and iterated every match — an O(N)
blocking scan on call-control hot paths, duplicated across the ARI
manager and the Twilio/Telnyx conference strategies.

Maintain a `transfer:by_call_sid:{original_call_sid}` -> transfer_id
secondary index, written and cleared alongside the context in
store/remove, and resolve lookups with a direct GET. Route the
Twilio/Telnyx strategies through the manager so the lookup lives in one
place (also dropping per-call ad-hoc Redis connections).

Closes #328

Co-authored-by: shiminshen <16914659+shiminshen@users.noreply.github.com>
2026-06-02 12:56:05 +05:30
Vishal Dhateria
7ba95c0fbe
feat: add Azure AI multi-provider support (TTS, STT, Embeddings, Realtime) (#381)
* feat: add Azure AI multi-provider support (TTS, STT, Embeddings, Realtime)

Enables Azure AI services across all model layers so users with Azure
credits can consolidate billing on a single provider.

- Voice (TTS): AzureSpeechTTSConfiguration via azure_speech provider
- Transcriber (STT): AzureSpeechSTTConfiguration via azure_speech provider
- Embedding: AzureOpenAIEmbeddingsConfiguration via azure provider
- Realtime: AzureRealtimeLLMConfiguration via azure_realtime provider

New files:
- api/services/pipecat/realtime/azure_realtime.py
- api/services/gen_ai/embedding/azure_openai_service.py
- api/tests/test_azure_speech_service_factory.py

The UI picks up all four providers automatically from the schema —
no frontend changes required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: add validation for URL and params

---------

Co-authored-by: Vishal Dhateria <vishal@finela.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-02 12:50:00 +05:30
developer603
8a4a2e25db
feat: allow overriding base URL of OpenAI STT and TTS (#377)
Mirrors the LLM treatment from #368 for the OpenAI STT and OpenAI TTS
providers. Users running OpenAI-compatible self-hosted services (vLLM,
Speaches, llama.cpp, custom proxies) can now point Dograh at them via
the OpenAI provider with `base_url`, instead of being forced onto the
Speaches provider as a workaround.

Changes:

* `registry.py` — add `base_url` field (default `https://api.openai.com/v1`)
  to `OpenAISTTConfiguration` and `OpenAITTSService`, identical in shape
  to the existing `OpenAILLMService.base_url` from #368.

* `service_factory.py` — in the OPENAI branches of `create_stt_service`
  and `create_tts_service`, lift `base_url` off the user config, run it
  through `_validate_runtime_service_url`, and forward it as a kwarg to
  `OpenAISTTService` / `OpenAITTSService` (both already accept it). Same
  pattern as the LLM branch.

* `test_user_configured_service_url_security.py` — adds four runtime
  validation tests covering private-IP rejection and localhost rejection
  in SaaS mode for both STT and TTS. Existing OSS-mode permissiveness
  is unchanged (DEPLOYMENT_MODE=oss skips the validator, as before).

No schema migration needed — Pydantic populates the default; existing
configurations without `base_url` continue to talk to api.openai.com.

`check_validity.py` requires no edits because the per-service validation
loop already iterates `("base_url", "endpoint")` via `getattr`, and the
`_check_openai_api_key` dispatcher already routes OPENAI providers
through the base_url-aware code path (introduced in #368) for STT and
TTS too.

Tests pass locally:

    pytest api/tests/test_user_configured_service_url_security.py
    23 passed in 4.80s   (19 existing + 4 new)

Co-authored-by: developer603 <developer603@users.noreply.github.com>
2026-06-02 12:06:58 +05:30
Matt Van Horn
dd85c4a1b4
fix: support object and array parameters in custom HTTP tools (#373)
* fix: support object and array parameters in custom HTTP tools

* feat(ui): expose object and array types in the custom tool parameter editor

* fix: error handling and schema generation

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-06-02 11:35:38 +05:30
Abhay Babbar
98d2b24cba
Add Sarvam LLM, update Sarvam STT models, expose usage_info on run detail (#351)
* Add Sarvam LLM provider, update Sarvam STT models, expose usage_info on run detail.
Depends on pipecat PR dograh-hq/pipecat#43 for STT string language support.
Submodule bump will follow after that merges.

* test: cover Sarvam STT language mapping; link Sarvam docs

---------

Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
2026-06-01 10:29:31 +05:30
Abhishek Kumar
13b30dee9e chore: release sdks 2026-05-31 17:13:42 +05:30
Abhishek Kumar
fcb7004c7a feat: create tools using MCP 2026-05-31 16:50:44 +05:30
Abhishek
5c29b6ed94
feat: add mcp guides for various topic and stages for bot building (#380) 2026-05-31 16:07:32 +05:30
Abhishek Kumar
0962c4678f fix: retry for ffmpeg during github action 2026-05-31 16:05:24 +05:30
Abhishek Kumar
0c0b8383bf fix: fix rtf logs and gemini live turn taking 2026-05-31 16:05:03 +05:30
Sabiha Khan
25751efe3c
chore(main): release dograh 1.33.0 (#376) 2026-05-31 13:22:18 +05:30
Abhishek Kumar
c586d02d5d feat: abort immediately on max call duration exceed 2026-05-31 13:21:37 +05:30
Abhishek Kumar
78ba62e185 feat: banner if API is not reachable 2026-05-31 13:05:22 +05:30
PK
ba342b66a7
Update README.md 2026-05-31 09:18:33 +05:30
Abhishek
8f10bcade3 fix: store channel id in gathered context for ARI outbound 2026-05-29 17:07:58 +00:00
Abhishek
5ef3be92b5
chore: update pipecat to 1.3.0 (#379)
* chore: rename PipelineTask to PipelineWorker

* fix: fix tests

* chore: update pipecat submodule

* fix: fix anyio same task cancellation scope
2026-05-29 16:19:42 +05:30
Abhishek Kumar
e695436fb3 fix: fix inbound for Cloudonix with softphone 2026-05-28 19:49:41 +05:30
Sabiha Khan
c4da6d6537
chore(main): release dograh 1.32.0 (#343) 2026-05-28 13:43:50 +05:30
Abhishek
fa2939e98f
fix: speed up multi arch build (#372)
* Speed up multi-arch Docker builds

* Remove temporary Docker workflow branch trigger
2026-05-28 13:43:33 +05:30
Abhishek Kumar
93edef35e8 fix: fix 1008 policy violation issue on ElevenLabs 2026-05-28 11:03:45 +05:30
Abhishek
b891091e0e
fix: fix service key validation in OSS (#371)
Fixes #303
2026-05-28 08:09:35 +05:30
nuthalapativarun
7eecadd8d6
fix: abort docker compose when OSS_JWT_SECRET is unset (#356)
Using :-ChangeMeInProduction silently starts the stack with a known
public signing key. Switch to :? so docker compose up exits with a
clear error when the variable is not provided.
2026-05-27 16:51:20 +05:30
Sabiha Khan
9e12d96ebb docs(asterisk-ari): add required TLS config for Dograh Cloud and reload/codec notes 2026-05-27 16:19:30 +05:30
nuthalapativarun
92c8dadd34
docs: clarify Asterisk ARI WebSocket URI for Dograh Cloud vs self-hosted (#358)
Add tabbed examples showing wss://api.dograh.com URI for Dograh Cloud
and ws://your-dograh-host for self-hosted. Users were confused about
the correct URI when using the managed cloud offering.
2026-05-27 15:52:13 +05:30
Abhishek Kumar
6f79bd67eb fix: harden CORS origin allow list
Fixes #322
2026-05-27 15:36:48 +05:30
Abhishek Kumar
6d78537297 chore: remove unused smart_turn service
Fixes #323, #324, #325.
2026-05-27 09:49:36 +00:00
nuthalapativarun
573dd68d76
fix: run api container as non-root dograh user (#360)
* fix: run api container as non-root dograh user

The runner stage had no USER directive, causing the API process to run
as root inside the container. Add a system user/group and transfer
ownership of /app before switching to it, so the container process
runs with minimal privileges.

* fix: chown /app and use COPY --chown for non-root runner

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

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 15:00:45 +05:30
nuthalapativarun
62d3749219
feat: add copy-to-clipboard button for inbound webhook URL (#359)
* feat: add copy-to-clipboard button for inbound webhook URL

Users setting up inbound telephony had no easy way to copy the
webhook URL to paste into their provider dashboard. Add a copyable
inbound webhook URL display in the configuration detail card,
following the existing Configuration ID copy button pattern.

* fix: use NEXT_PUBLIC_BACKEND_URL if provided

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-05-27 14:56:02 +05:30
nuthalapativarun
afd7fd37da
chore: upgrade Next.js in evals/visualizer from 16.1.4 to 16.2.6 (#361)
* chore: upgrade Next.js in evals/visualizer from 16.1.4 to 16.2.6

Resolves multiple security advisories in Next.js 16.1.4 including
middleware/proxy bypass, SSRF, DoS, and XSS issues. The evals
visualizer is an internal dev tool with no external exposure, but
keeping dependencies current reduces supply-chain risk.

* fix: remove redundancy in choice of package manager to avoid drift

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-05-27 14:26:08 +05:30
Sabiha Khan
1e8f832bcc docs: add github trending badge in README 2026-05-27 14:13:15 +05:30
nuthalapativarun
5b61ad645f
feat: stamp API key into model override at save time to survive global provider change (#362)
* fix: stamp API key into model override at save time to survive global provider change

When a workflow overrides the TTS/LLM/STT provider to match the current
global config, the override dict only stores model/voice fields, not the
API key. If the global config later switches to a different provider, the
override can no longer inherit the API key and calls fail.

Fix: enrich_overrides_with_api_keys() copies the global provider's API
key (and other secret fields) into the override dict at workflow-save
time, making the override self-contained regardless of future global
config changes.

* feat: add test coverage and masking logic

---------

Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-05-27 14:01:14 +05:30
Abhishek
8a58b0992d
feat: allow overriding base URL of OpenAI models (#368)
* Add OpenAI-compatible API option in model configuration

Backend-only cherry-pick from 20617db37a.

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: harden the base url settings in SaaS mode

---------

Co-authored-by: Chris Briddock <briddockchristopher@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-27 13:07:45 +05:30
Abhishek
9675151549
feat: add delete button in an edge in workflow builder (#366)
* Added delete option for edge between two nodes

* Removed extra stack dump file

* chore: advance pipecat submodule to include MiniMax LLM service

* updated pipecat to c771a50e

* fix: simplify edge delete to match node and Backspace UX

Drop the confirmation dialog: node delete and Backspace-on-edge both
delete immediately and rely on undo/redo. The trash button should
behave the same way.

Match the GenericNode toolbar pattern by always rendering the trash
and pencil buttons (no readOnly gate); the edit dialog already
disables Save in readOnly. Wrap the two buttons in a flex container
with a small gap so they don't sit flush against each other.

Revert the manual package-lock version bump; that field is owned by
release-please.

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

* fix: don't auto-save on edge delete

Persisting the workflow is a separate intent from "delete this edge",
the same way it's separate from "delete this node" (useNodeHandlers
doesn't auto-save either). The Save button in the edit dialog conveys
the save semantics; trash buttons shouldn't piggy-back on them.

After this, all delete paths (node toolbar trash, edge toolbar trash,
Backspace on node, Backspace on edge) mark the workflow dirty and
leave persistence to Cmd+S or the header Save button.

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

---------

Co-authored-by: XI <xman.india@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 19:00:01 +05:30
Abhishek Kumar
3df5730076 feat: add transcript and recording public URLs in API 2026-05-26 15:11:56 +05:30
Abhishek Kumar
7810923bca chore: return formatted transcript url
- Return formatted transcript and recording URL
- Harden campaign dispatcher logic
2026-05-26 13:24:12 +05:30