[asterisk-dev] [Code Review] Add mutestream manager action and MUTESTREAM() dialplan function
Olle E Johansson
oej at edvina.net
Tue Sep 1 13:22:23 CDT 2009
> On 2009-09-01 12:39:27, Russell Bryant wrote:
> > We're close. :-)
Cool
> On 2009-09-01 12:39:27, Russell Bryant wrote:
> > ./res/res_mutestream.c, lines 233-235
> > <https://reviewboard.asterisk.org/r/345/diff/3/?file=6319#file6319line233>
> >
> > If mute_add_audiohook() fails, should we just destroy the datastore and audiohook data here?
And the same in the manager function... ;-)
> On 2009-09-01 12:39:27, Russell Bryant wrote:
> > ./res/res_mutestream.c, lines 164-166
> > <https://reviewboard.asterisk.org/r/345/diff/3/?file=6319#file6319line164>
> >
> > For the "Assumes that the channel is locked" comment, you could use the "\pre" doxygen tag if you'd like. "\pre" is for stating a pre-condition for a function, which is something that must be true before the function is called.
> >
> > Similarly, there is also a "\post" tag for documenting a post-condition.
Done
> On 2009-09-01 12:39:27, Russell Bryant wrote:
> > ./res/res_mutestream.c, lines 139-144
> > <https://reviewboard.asterisk.org/r/345/diff/3/?file=6319#file6319line139>
> >
> > missing channel unlock here
Fixed
> On 2009-09-01 12:39:27, Russell Bryant wrote:
> > ./res/res_mutestream.c, lines 328-332
> > <https://reviewboard.asterisk.org/r/345/diff/3/?file=6319#file6319line328>
> >
> > If either of this interface registrations fail, we should probably return AST_MODULE_LOAD_DECLINE.
res = ast_custom_function_register(&mute_function);
340
341 res |= ast_manager_register2("MuteStream", EVENT_FLAG_SYSTEM, manager_mutestream,
342 "Mute an audio stream", mandescr_mutestream);
343
344 return (res ? AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS);
- Olle E
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/345/#review1033
-----------------------------------------------------------
On 2009-09-01 10:02:06, Olle E Johansson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/345/
> -----------------------------------------------------------
>
> (Updated 2009-09-01 10:02:06)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> When you need to be able to mute incoming or outgoing audio for a channel, this is the function you need.
>
> I am a bit unsure of the unload functionality. What will happen if I unload an audiohook module when a channel is active?
>
> This work is inspired by app_jack.c and func_volume.c
>
>
> Diffs
> -----
>
> ./res/res_mutestream.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/345/diff
>
>
> Testing
> -------
>
> I've tested this in manager and with the dynamic features in features.conf.
>
>
> Thanks,
>
> Olle E
>
>
More information about the asterisk-dev
mailing list