]> git.ipfire.org Git - thirdparty/asterisk.git/commit
audiohook: add directional awareness
authorMike Bradeen <mbradeen@sangoma.com>
Thu, 29 Sep 2022 20:55:20 +0000 (14:55 -0600)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 11 Oct 2022 13:13:46 +0000 (08:13 -0500)
commitbb44e3edca5ff9a4caaf20609f40873328517030
tree1ea463ab1947ef75eafeb1c269b69ab488427fa8
parent2b930d7c3b093ac5eda2c2c39afde300519c140a
audiohook: add directional awareness

Add enum to allow setting optional direction. If set to only one
direction, only feed matching-direction frames to the associated
slin factory.

This prevents mangling the transcoder on non-mixed frames when the
READ and WRITE frames would have otherwise required it.  Also
removes the need to mute or discard the un-wanted frames as they
are no longer added in the first place.

res_stasis_snoop is changed to use this addition to set direction
on audiohook based on spy direction.

If no direction is set, the ast_audiohook_init will init this enum
to BOTH which maintains existing functionality.

ASTERISK-30252

Change-Id: If8716bad334562a5d812be4eeb2a92e4f3be28eb
include/asterisk/audiohook.h
main/audiohook.c
res/res_stasis_snoop.c