Summary:ASTERISK-13708: [patch] extend / rewrite volume function and audiohook
Reporter:Kaloyan Kovachev (knk)Labels:patch
Date Opened:2009-03-07 23:58:09.000-0600Date Closed:2018-01-02 08:49:49.000-0600
Versions:Frequency of
Environment:Attachments:( 0) audiohook_volume_2.diff
( 1) audiohook_volume_rewrite.diff
Description:the newly added in 1.6.1 function volume creates its own audiohook instead of using the builtin one and also (silently) listens for DTMF to update the volume. This patch adds the DTMF functionality to the bultin audiohook and makes the function using it instead of creating its own and the ability to set custom DTMF and to read the values.
Comments:By: Kaloyan Kovachev (knk) 2009-03-08 01:51:11.000-0600

I have marked this as feature, but its probably better to make it bugfix, because having the DTMF hardcoded in func_folume may cause lots of problems - if a feature contains '*' or '#' the volume will be unexpectedly changed too.

By: Leif Madsen (lmadsen) 2009-07-01 08:38:34

I've upgraded this to "tweak" as that is probably what it is :)

By: Kaloyan Kovachev (knk) 2009-07-01 09:02:35

As 1.6.1 is out, there is already a bug in there - 'volume changed on feature invocation after func_volume is used' :)

By: Kaloyan Kovachev (knk) 2009-11-10 05:48:51.000-0600

as reported on the dev list AST_INLINE_API() is causing the module to fail on load when compiled with DONT_OPTIMIZE. The new version checks the input frame is present before proceeding and 'static inline' is used for the _set _get calls instead of the macro

By: Leif Madsen (lmadsen) 2009-11-10 10:25:58.000-0600

I think that was the issue that was resolved in (and the other RCs released at the same time).

By: Kaloyan Kovachev (knk) 2009-11-10 10:51:01.000-0600

no the crash was a different issue. There is still a possibility (without this change) for a crash if the callback is called with a NULL frame, which may happen when a previous audiohook in the list have failed.
Maybe it will be better to restore the previous frame instead of freeing it on error, but not sure ... in either case checking for NULL frame won't hurt here

By: Corey Farrell (coreyfarrell) 2017-12-14 13:40:29.284-0600

Are you interested in pursuing this further?  If so the patch will need to be rebased so it can apply the the current {{master}} branch and it will need to go through code review.


Thanks for the contribution! If you'd like your contribution to be included faster, you should submit your patch for code review by the Asterisk Developer Community. To do so, please follow the Code Review \[1\] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines \[2\]
* Review the Code Review Checklist \[3\] for common items reviewers will look for
* If necessary, provide tests for the Asterisk Test Suite that verify the correctness of your patch \[4\]

When ready, submit your patch and any tests to Gerrit \[5\] for code review.


\[1\] https://wiki.asterisk.org/wiki/display/AST/Code+Review
\[2\] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
\[3\] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
\[4\] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation
\[5\] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

By: Asterisk Team (asteriskteam) 2018-01-02 08:49:49.499-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines