aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 22:23:23 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 22:23:23 +0000
commitfbfb0841f879f857918fa24007ea929ca638d3a1 (patch)
tree5281331140cd0ab63c087b82928815743a8103d7 /apps
parentab988b3042d02d8579615d2c243f9343ba85c86f (diff)
Add the ability to play an announcement to queue caller just before bridging
Issue 7479, patch by tristan_mahe. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73549 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 4547b3ad5..bc4d1243d 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -383,6 +383,7 @@ struct call_queue {
char sound_lessthan[80]; /*!< Sound file: "less-than" (def. queue-lessthan) */
char sound_seconds[80]; /*!< Sound file: "seconds." (def. queue-seconds) */
char sound_thanks[80]; /*!< Sound file: "Thank you for your patience." (def. queue-thankyou) */
+ char sound_callerannounce[80]; /*!< Sound file: Custom announce for caller, no default */
char sound_reporthold[80]; /*!< Sound file: "Hold time" (def. queue-reporthold) */
char sound_periodicannounce[MAX_PERIODIC_ANNOUNCEMENTS][80];/*!< Sound files: Custom announce, no default */
@@ -740,6 +741,7 @@ static void init_queue(struct call_queue *q)
q->context[0] = '\0';
q->monfmt[0] = '\0';
q->periodicannouncefrequency = 0;
+ q->sound_callerannounce[0] = '\0'; /* Default, don't announce the caller that he has been answered */
ast_copy_string(q->sound_next, "queue-youarenext", sizeof(q->sound_next));
ast_copy_string(q->sound_thereare, "queue-thereare", sizeof(q->sound_thereare));
ast_copy_string(q->sound_calls, "queue-callswaiting", sizeof(q->sound_calls));
@@ -895,6 +897,8 @@ static void queue_set_param(struct call_queue *q, const char *param, const char
ast_copy_string(q->sound_lessthan, val, sizeof(q->sound_lessthan));
} else if (!strcasecmp(param, "queue-thankyou")) {
ast_copy_string(q->sound_thanks, val, sizeof(q->sound_thanks));
+ } else if (!strcasecmp(param, "queue-callerannounce")) {
+ ast_copy_string(q->sound_callerannounce, val, sizeof(q->sound_callerannounce));
} else if (!strcasecmp(param, "queue-reporthold")) {
ast_copy_string(q->sound_reporthold, val, sizeof(q->sound_reporthold));
} else if (!strcasecmp(param, "announce-frequency")) {
@@ -2627,6 +2631,13 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
ast_hangup(peer);
return -1;
}
+
+ /* Play announcement to the caller telling it's his turn if defined */
+ if (!ast_strlen_zero(qe->parent->sound_callerannounce)) {
+ if (play_file(qe->chan, qe->parent->sound_callerannounce))
+ ast_log(LOG_WARNING, "Announcement file '%s' is unavailable, continuing anyway...\n", qe->parent->sound_callerannounce);
+ }
+
/* Begin Monitoring */
if (qe->parent->monfmt && *qe->parent->monfmt) {
if (!qe->parent->montype) {