Skip to content

feat: add inject start/stop commands for one-way audio injection#2082

Open
nickakt wants to merge 1 commit intosipwise:masterfrom
nickakt:feature/inject
Open

feat: add inject start/stop commands for one-way audio injection#2082
nickakt wants to merge 1 commit intosipwise:masterfrom
nickakt:feature/inject

Conversation

@nickakt
Copy link

@nickakt nickakt commented Mar 6, 2026

Summary

  • New inject start / inject stop NG protocol commands
  • Mixes audio from a source participant into a destination participant's stream via the audio player, without a full offer/answer exchange
  • Supports cross-call injection via source-call-id (calls are merged internally)
  • inject subscription attribute persisted through Redis for HA failover
  • Audio-only; matches media streams by media-id, index, then type fallback

Protocol

{
  "command": "inject start",
  "call-id": "main-call-id",
  "to-tag": "dst-tag",
  "source-call-id": "src-call-id",
  "source-tag": "src-tag"
}
{
  "command": "inject stop",
  "call-id": "main-call-id",
  "to-tag": "dst-tag",
  "source-call-id": "src-call-id",
  "source-tag": "src-tag"
}

Files changed

  • daemon/call.cmonologue_inject_start / monologue_inject_stop implementation
  • daemon/call_interfaces.c — NG command handlers
  • daemon/control_ng.c — command dispatch
  • daemon/redis.cinject flag persistence
  • include/ — declarations and opmode enum
  • docs/ng_control_protocol.md — documentation

New NG protocol commands that mix audio from a source participant
into a destination participant's stream without a full offer/answer
exchange.

- inject start: creates one-way subscription with audio_player mixing
- inject stop: removes injection and restores original codec routing
- Supports cross-call injection via source-call-id (merges calls internally)
- inject attribute persisted through Redis for HA failover
- Audio-only; matches media by media-id, index, then type fallback
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.

1 participant