diff --git a/apps/confbridge/conf_state.c b/apps/confbridge/conf_state.c index 5b3893f24d..0eb081f136 100644 --- a/apps/confbridge/conf_state.c +++ b/apps/confbridge/conf_state.c @@ -74,6 +74,9 @@ void conf_default_join_waitmarked(struct conference_bridge_user *cbu) void conf_default_leave_waitmarked(struct conference_bridge_user *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) diff --git a/apps/confbridge/conf_state_inactive.c b/apps/confbridge/conf_state_inactive.c index 31cc6f1701..b0d4ea1ba1 100644 --- a/apps/confbridge/conf_state_inactive.c +++ b/apps/confbridge/conf_state_inactive.c @@ -68,7 +68,7 @@ static void join_marked(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) { conf_change_state(cbu, CONF_STATE_EMPTY); } diff --git a/apps/confbridge/conf_state_single.c b/apps/confbridge/conf_state_single.c index 4dd8d564c2..7a1ebcdedf 100644 --- a/apps/confbridge/conf_state_single.c +++ b/apps/confbridge/conf_state_single.c @@ -72,6 +72,9 @@ static void join_marked(struct conference_bridge_user *cbu) static void leave_unmarked(struct conference_bridge_user *cbu) { conf_remove_user_active(cbu->conference_bridge, cbu); + if (cbu->playing_moh) { + conf_moh_stop(cbu); + } if (cbu->conference_bridge->waitingusers) { conf_change_state(cbu, CONF_STATE_INACTIVE); diff --git a/apps/confbridge/conf_state_single_marked.c b/apps/confbridge/conf_state_single_marked.c index 3a64a74d00..84bff6f18b 100644 --- a/apps/confbridge/conf_state_single_marked.c +++ b/apps/confbridge/conf_state_single_marked.c @@ -71,6 +71,9 @@ static void join_marked(struct conference_bridge_user *cbu) static void leave_marked(struct conference_bridge_user *cbu) { conf_remove_user_marked(cbu->conference_bridge, cbu); + if (cbu->playing_moh) { + conf_moh_stop(cbu); + } conf_change_state(cbu, CONF_STATE_EMPTY); }