[Asterisk-code-review] Implement deaf mode for confbridge (asterisk[master])

Timo Teräs asteriskteam at digium.com
Fri Jun 10 14:37:09 CDT 2016


Timo Teräs has posted comments on this change.

Change subject: Implement deaf mode for confbridge
......................................................................


Patch Set 2:

(3 comments)

https://gerrit.asterisk.org/#/c/2933/2/apps/app_confbridge.c
File apps/app_confbridge.c:

Line 282: 			<parameter name="Channel" required="true" />
> Looks like in the handling of this command (also the undeafen and CLI comma
No limits there I think. This patch originates from 2011 and these features where not present then. Will adjust.


PS2, Line 2097: 	/* Deafen or undeafen yourself */
              : 	user->features.deaf = !user->features.deaf;
              : 	ast_test_suite_event_notify("CONF_DEAF",
              : 		"Message: participant %s %s\r\n"
              : 		"Conference: %s\r\n"
              : 		"Channel: %s",
              : 		ast_channel_name(chan),
              : 		user->features.deaf ? "deafened" : "undeafened",
              : 		user->b_profile.name,
              : 		ast_channel_name(chan));
              : 	if (user->features.deaf) {
              : 		send_deafen_event(user, conference);
              : 	} else {
              : 		send_undeafen_event(user, conference);
              : 	}
> Should just be able to call 'generic_feature_action_helper_user' here inste
Yes, will fix.


https://gerrit.asterisk.org/#/c/2933/2/main/bridge_channel.c
File main/bridge_channel.c:

PS2, Line 975: 	if (fr->frametype == AST_FRAME_VOICE &&
             : 	    (bridge_channel->features && bridge_channel->features->deaf)) {
             : 		short buf[fr->samples];
             : 		struct ast_frame sframe = {
             : 			.frametype = AST_FRAME_VOICE,
             : 			.subclass.format = ast_format_slin,
             : 			.data.ptr = buf,
             : 			.samples = fr->samples,
             : 			.datalen = sizeof(buf),
             : 		};
             : 		memset(buf, 0, sizeof(buf));
             : 		dup = ast_frdup(&sframe);
             : 	} else {
             : 		dup = ast_frdup(fr);
             : 	}
> Can a silence generator on the channel not be used instead?
I suppose yes, I remember copying this code from some existing module back in 2011. Is there perhaps some other place now where I could take a look how it's done?


-- 
To view, visit https://gerrit.asterisk.org/2933
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia2628bdda080fd2b1e914212de50dd26de9d3e96
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Timo Teräs <timo.teras at iki.fi>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Timo Teräs <timo.teras at iki.fi>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list