]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_websocket: Fix codec validation and add passthrough option.
authorGeorge Joseph <gjoseph@sangoma.com>
Wed, 17 Sep 2025 13:21:48 +0000 (07:21 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 22 Sep 2025 17:21:43 +0000 (17:21 +0000)
commit896850ca35be6b44c2b8513fd54788bbcccbd973
tree3ab00163072f3ca6d64f2db7b989fc73e533e5ac
parentaf673211346c36d0435a8b2e2af69f6affd8b0f8
chan_websocket: Fix codec validation and add passthrough option.

* Fixed an issue in webchan_write() where we weren't detecting equivalent
  codecs properly.
* Added the "p" dialstring option that puts the channel driver in
  "passthrough" mode where it will not attempt to re-frame or re-time
  media coming in over the websocket from the remote app.  This can be used
  for any codec but MUST be used for codecs that use packet headers or whose
  data stream can't be broken up on arbitrary byte boundaries. In this case,
  the remote app is fully responsible for correctly framing and timing media
  sent to Asterisk and the MEDIA text commands that could be sent over the
  websocket are disabled.  Currently, passthrough mode is automatically set
  for the opus, speex and g729 codecs.
* Now calling ast_set_read_format() after ast_channel_set_rawreadformat() to
  ensure proper translation paths are set up when switching between native
  frames and slin silence frames.  This fixes an issue with codec errors
  when transcode_via_sln=yes.

Resolves: #1462
channels/chan_websocket.c