[asterisk-commits] oej: branch oej/pinequeue-1.8 r363999 - /team/oej/pinequeue-1.8/apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 26 09:24:22 CDT 2012
Author: oej
Date: Thu Apr 26 09:24:18 2012
New Revision: 363999
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=363999
Log:
Fixing a few minor issues, like hanging up calls waiting in the queue when we have a
configuration with no file names given. Bah. User error. NEXT!
Modified:
team/oej/pinequeue-1.8/apps/app_queue.c
Modified: team/oej/pinequeue-1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinequeue-1.8/apps/app_queue.c?view=diff&rev=363999&r1=363998&r2=363999
==============================================================================
--- team/oej/pinequeue-1.8/apps/app_queue.c (original)
+++ team/oej/pinequeue-1.8/apps/app_queue.c Thu Apr 26 09:24:18 2012
@@ -2690,7 +2690,7 @@
qe->chan->name, qe->parent->name, qe->pos);
}
if (say_thanks) {
- res = play_file(qe->chan, qe->parent->sound_thanks, ringing, NULL);
+ res = play_file(qe->chan, qe->parent->sound_thanks, ringing, NULL);
}
playout:
@@ -3764,9 +3764,6 @@
}
}
}
- if (background_prompts) {
- play_file(qe->chan, NULL, 0, qe->moh);
- }
/* If we received an event from the caller, deal with it. */
if (winner == in) {
@@ -3931,9 +3928,9 @@
}
/* Make a position announcement, if enabled */
- if (qe->parent->announcefrequency &&
- (res = say_position(qe,ringing)))
+ if (qe->parent->announcefrequency && (res = say_position(qe,ringing))) {
break;
+ }
/* If we have timed out, break out */
if (qe->expire && (time(NULL) >= qe->expire)) {
@@ -5962,7 +5959,9 @@
ast_log(LOG_ERROR, "Can't find the ast_sound_ending datastore! on chan %s\n", chan->name);
return 1; /* Why continue, if I can't access the datastore & list? */
}
- ast_debug(2, "---- Aqsi now playing: %d\n", aqsi->now_playing);
+ if (option_debug && !ast_strlen_zero(filename)) {
+ ast_debug(2, "---- Aqsi now playing: %s\n", aqsi->now_playing ? "true" : "false");
+ }
if (aqsi->now_playing == 0) {
playfilename[0] = '\0';
@@ -5982,10 +5981,10 @@
ast_indicate(chan, AST_CONTROL_RINGING);
} else {
if (!ast_test_flag(chan, AST_FLAG_MOH)) {
- ast_moh_start(chan, aqsi->qe->moh, NULL);
+ ast_moh_start(chan, aqsi->qe->moh ? aqsi->qe->moh : NULL, NULL);
}
}
- return -1;
+ return 0;
}
} else {
ast_copy_string(playfilename, filename, sizeof(playfilename));
@@ -5993,7 +5992,7 @@
} else {
if (ast_strlen_zero(filename)) {
ast_debug(3, "--- just checking... No filename and currently playing\n");
- return -1;
+ return 0;
}
}
@@ -6034,8 +6033,6 @@
ast_copy_string(generatordata->filename, playfilename, sizeof(generatordata->filename));
generatordata->chan = chan;
generatordata->aqsi = aqsi;
-
-
/* Starting new generator on channel. */
if (ast_activate_generator(chan, &play_file_gen, generatordata)) {
More information about the asterisk-commits
mailing list