app_confbridge: Don't play leader leaving prompt if no one will hear it
authorMatthew Jordan <mjordan@digium.com>
Mon, 17 Nov 2014 03:08:11 +0000 (03:08 +0000)
committerMatthew Jordan <mjordan@digium.com>
Mon, 17 Nov 2014 03:08:11 +0000 (03:08 +0000)
commitfc2279afea8656e624470b2f40e0e69f6a5f6130
tree3ca0492d5cd36423572019f89ce585e262b7e6d1
parent656601d8c4118c0adcf77560894a7a54f2b434d9
app_confbridge: Don't play leader leaving prompt if no one will hear it

Consider the following:
- A marked user in a conference
- One or more end_marked only 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 end_marked
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; however, no one is left in the
bridge. This causes some odd behaviour for the end_marked users - they are
stuck waiting for the bridge to be unlocked. This results in them waiting for
5 or 6 seconds of dead air before hearing that they've been kicked.

Unfortunately, we do have to keep the bridge locked while we're playing back
the 'leader-has-left' prompt. If there are any wait_marked users in the
conference, this behaviour can't be easily changed - but we do make the case
of the end_marked users better with this patch.

Review: https://reviewboard.asterisk.org/r/4184/

ASTERISK-24522 #close
Reported by: Matt Jordan
........

Merged revisions 428077 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 428078 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428079 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/confbridge/conf_state_multi_marked.c