[asterisk-dev] [RFC] Audiohooks
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Sun Mar 1 18:58:12 CST 2009
On Sunday 01 March 2009 06:35:52 Kaloyan Kovachev wrote:
> Hello list,
> there are two volume audiohooks: inside the audiohooks.c which is still
> unused (i think) and another one in function volume. The difference is that
> the function allows the volume to be adjusted during the call (not
> specified in the description) with '*' and '#'.
> I am about to try and remove the duplication, but i would like get some
> comments on the direction:
> 1. Just remove the audiohook from main as it is not used
> 2. Leave the audiohook in main making it available to all users of
> audiohooks.h and just call it from the function
> 3. Convert the function to res_volume together with the audiohook and add
> cli and manager commands
>
> My personal vote is for 3. so it can be used as optional from other modules
> too, but as it will take more time and changes, wouldn't want to do it, if
> it is unacceptable/wrong.
>
> If 3. is the way to go, the same can be done for the wishper_file too, by
> leaving in the audiohooks.c only the API and not adding a bunch of hooks
> there that someone may (not) need
I'd go with 4: add an API to manipulate those values to audiohook.h
implemented in audiohook.c and adjust func_volume to point to that API.
If you wanted to add manager commands, I'd do so directly in audiohook.c,
with no need for a resource module. I'd also avoid the CLI command, as it is
of limited usefulness.
--
Tilghman
More information about the asterisk-dev
mailing list