]> 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:03 +0000 (08:13 -0500)
commitf61dbd566b29ca1893fe58b10edc888614c4a92f
tree346acb1854a011b2d9aa34be4fc23cca91534511
parentb397dc3ca31548204e7875f65f38988735091a74
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