mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH is playing.
When MOH is playing to a user in a conference and the user is kicked or hangs up from the conference then the AMI MusicOnHoldStop events didn't happen. (Asterisk v11 AMI event: MusicOnHold, state:Stop) (closes issue ASTERISK-23311) Reported by: Benjamin Keith Ford Review: https://reviewboard.asterisk.org/r/3306/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@410490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -74,6 +74,9 @@ void conf_default_join_waitmarked(struct conference_bridge_user *cbu)
|
|||||||
void conf_default_leave_waitmarked(struct conference_bridge_user *cbu)
|
void conf_default_leave_waitmarked(struct conference_bridge_user *cbu)
|
||||||
{
|
{
|
||||||
conf_remove_user_waiting(cbu->conference_bridge, cbu);
|
conf_remove_user_waiting(cbu->conference_bridge, cbu);
|
||||||
|
if (cbu->playing_moh) {
|
||||||
|
conf_moh_stop(cbu);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void conf_change_state(struct conference_bridge_user *cbu, struct conference_state *newstate)
|
void conf_change_state(struct conference_bridge_user *cbu, struct conference_state *newstate)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ static void join_marked(struct conference_bridge_user *cbu)
|
|||||||
|
|
||||||
static void leave_waitmarked(struct conference_bridge_user *cbu)
|
static void leave_waitmarked(struct conference_bridge_user *cbu)
|
||||||
{
|
{
|
||||||
conf_remove_user_waiting(cbu->conference_bridge, cbu);
|
conf_default_leave_waitmarked(cbu);
|
||||||
if (cbu->conference_bridge->waitingusers == 0) {
|
if (cbu->conference_bridge->waitingusers == 0) {
|
||||||
conf_change_state(cbu, CONF_STATE_EMPTY);
|
conf_change_state(cbu, CONF_STATE_EMPTY);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ static void join_marked(struct conference_bridge_user *cbu)
|
|||||||
static void leave_unmarked(struct conference_bridge_user *cbu)
|
static void leave_unmarked(struct conference_bridge_user *cbu)
|
||||||
{
|
{
|
||||||
conf_remove_user_active(cbu->conference_bridge, cbu);
|
conf_remove_user_active(cbu->conference_bridge, cbu);
|
||||||
|
if (cbu->playing_moh) {
|
||||||
|
conf_moh_stop(cbu);
|
||||||
|
}
|
||||||
|
|
||||||
if (cbu->conference_bridge->waitingusers) {
|
if (cbu->conference_bridge->waitingusers) {
|
||||||
conf_change_state(cbu, CONF_STATE_INACTIVE);
|
conf_change_state(cbu, CONF_STATE_INACTIVE);
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ static void join_marked(struct conference_bridge_user *cbu)
|
|||||||
static void leave_marked(struct conference_bridge_user *cbu)
|
static void leave_marked(struct conference_bridge_user *cbu)
|
||||||
{
|
{
|
||||||
conf_remove_user_marked(cbu->conference_bridge, cbu);
|
conf_remove_user_marked(cbu->conference_bridge, cbu);
|
||||||
|
if (cbu->playing_moh) {
|
||||||
|
conf_moh_stop(cbu);
|
||||||
|
}
|
||||||
|
|
||||||
conf_change_state(cbu, CONF_STATE_EMPTY);
|
conf_change_state(cbu, CONF_STATE_EMPTY);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user