Merged revisions 262662 via svnmerge from
[asterisk/asterisk.git] / apps / app_meetme.c
index f62b3ac..708779a 100644 (file)
@@ -3471,6 +3471,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
                                                ast_mutex_lock(&conf->listenlock);
                                                if (!conf->transframe[idx]) {
                                                        if (conf->origframe) {
+                                                               if (musiconhold && !ast_dsp_silence(dsp, conf->origframe, &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
+                                                                       ast_moh_stop(chan);
+                                                                       mohtempstopped = 1;
+                                                               }
                                                                if (!conf->transpath[idx]) {
                                                                        conf->transpath[idx] = ast_translator_build_path((1 << idx), AST_FORMAT_SLINEAR);
                                                                }
@@ -3486,11 +3490,6 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
                                                        if ((conf->transframe[idx]->frametype != AST_FRAME_NULL) &&
                                                            can_write(chan, confflags)) {
                                                                struct ast_frame *cur;
-                                                               if (musiconhold && !ast_dsp_silence(dsp, conf->transframe[idx], &confsilence) && confsilence < MEETME_DELAYDETECTTALK) {
-                                                                       ast_moh_stop(chan);
-                                                                       mohtempstopped = 1;
-                                                               }
-
                                                                /* the translator may have returned a list of frames, so
                                                                   write each one onto the channel
                                                                */