]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_confbridge: Make explicitly stop MOH if a user is kicked or hangs up while MOH...
authorRichard Mudgett <rmudgett@digium.com>
Wed, 12 Mar 2014 18:35:14 +0000 (18:35 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 12 Mar 2014 18:35:14 +0000 (18:35 +0000)
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

apps/confbridge/conf_state.c
apps/confbridge/conf_state_inactive.c
apps/confbridge/conf_state_single.c
apps/confbridge/conf_state_single_marked.c

index 5b3893f24d23de0d11fb39ea8dfdc949cffa903e..0eb081f13627b05d118f80d4a5e14dc72b386551 100644 (file)
@@ -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)
index 31cc6f17019290db4e750d7802646e67c7d1f6e1..b0d4ea1ba11af16a10d20d64504299cb7998c668 100644 (file)
@@ -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);
        }
index 4dd8d564c21423c3cfdf11bf5ba792daa39ecb57..7a1ebcdedfbc4b8e10fb8bdef2feab14d30464f7 100644 (file)
@@ -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);
index 3a64a74d009d2a2e5c0b64b1812b71f05f27b336..84bff6f18b620478dab65d9c5f1eea8ee545689c 100644 (file)
@@ -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);
 }