]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_websocket: Add media direction.
authorBen Ford <bford@sangoma.com>
Tue, 10 Feb 2026 20:39:56 +0000 (14:39 -0600)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 26 Feb 2026 15:55:56 +0000 (15:55 +0000)
commita79e5ab2e6ed1b16a0c19cb07bb49519261b85a4
treebebcb0f3d0b74587a3f2f152547307b99ec5f652
parent3e3096533e3127155c9d4a2e6846ffdcb212beaf
chan_websocket: Add media direction.

Currently, WebSockets both accept and send media without the option to
disable one or the other. This commit adds the ability to set the media
direction for a WebSocket, making it unidirectional or bidirectional
(the default). Direction is done from the point of view of the
application, NOT Asterisk. The allowed values are 'both', 'in', and
'out'. If media direction is 'both' (the default), Asterisk accepts and
sends media to the application. If it is 'in', Asterisk will drop any
media received from the application. If it is 'out', Asterisk will not
write any media frames to the application.

UserNote: WebSocket now supports media direction, allowing for
unidirectional media. This is done from the perspective of the
application and can be set via channel origination, external media, or
commands sent from the application. Check out
https://docs.asterisk.org/Configuration/Channel-Drivers/WebSocket/ for
more.
channels/chan_websocket.c
res/ari/resource_channels.c