[asterisk-dev] [Code Review] 4184: app_confbridge: Don't delay playing 'you have been kicked' prompts to end_marked users when there are only end_marked users in the conference

Matt Jordan reviewboard at asterisk.org
Fri Nov 14 14:39:20 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4184/
-----------------------------------------------------------

Review request for Asterisk Developers.


Bugs: ASTERISK-24522
    https://issues.asterisk.org/jira/browse/ASTERISK-24522


Repository: Asterisk


Description
-------

Consider the following:

    A marked user in a conference
    Two or more endmarked users in the conference

When the marked users leaves, we will be in the conf_state_multi_marked state. This currently will traverse the users, kicking out any who have the endmarked flags. When they are kicked, a full ast_bridge_remove is immediately called on the channels. At this time, we also unilaterally set the need_prompt flag.

When the need_prompt flag is set, we then playback a sound to the bridge informing everyone that the leader has left:

	if (need_prompt) {
		/* Play back the audio prompt saying the leader has left the conference */
		if (!ast_test_flag(&user->u_profile, USER_OPT_QUIET)) {
			ao2_unlock(user->conference);
			ast_autoservice_start(user->chan);
			play_sound_file(user->conference,
				conf_get_sound(CONF_SOUND_LEADER_HAS_LEFT, user->b_profile.sounds));
			ast_autoservice_stop(user->chan);
			ao2_lock(user->conference);
		}
	}

If, however, we have a conference full of only endmarked users, this prompt is pointless. They've already been removed from the bridge, and cannot hear the sound being played into a now empty bridge. Instead, they get an odd 5 second wait time until they are fully kicked.

Unfortunately, we do have to keep the bridge locked while we're playing back the 'leader-has-left' prompt if there are wait_marked only users in the conference - so we can't make this behavior nicer easier in other situations. In this one, however, we can make it so that end_marked users immediately here their prompt if possible.


Diffs
-----

  /branches/11/apps/confbridge/conf_state_multi_marked.c 427618 

Diff: https://reviewboard.asterisk.org/r/4184/diff/


Testing
-------

Prior to patch: the marked user leaves the conference, and an end_marked user waits a good 5 seconds or so until getting their prompt that they were kicked.
After patch: the marked user leaves the conference, and an end_marked user hears the kicked prompt quickly.


Thanks,

Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141114/eb448617/attachment.html>


More information about the asterisk-dev mailing list