|
|
|
@ -192,6 +192,7 @@ struct ast_call_queue {
|
|
|
|
|
int servicelevel; /* seconds setting for servicelevel*/
|
|
|
|
|
int callscompletedinsl; /* Number of queue calls answererd with servicelevel*/
|
|
|
|
|
char monfmt[8]; /* Format to use when recording calls */
|
|
|
|
|
int monjoin; /* Should we join the two files when we are done with the call */
|
|
|
|
|
char sound_next[80]; /* Sound file: "Your call is now first in line" (def. queue-youarenext) */
|
|
|
|
|
char sound_thereare[80]; /* Sound file: "There are currently" (def. queue-thereare) */
|
|
|
|
|
char sound_calls[80]; /* Sound file: "calls waiting to speak to a representative." (def. queue-callswaiting)*/
|
|
|
|
@ -905,6 +906,7 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
|
|
|
|
|
char oldcontext[AST_MAX_EXTENSION]="";
|
|
|
|
|
char queuename[256]="";
|
|
|
|
|
char *newnum;
|
|
|
|
|
char *monitorfilename;
|
|
|
|
|
struct ast_channel *peer;
|
|
|
|
|
struct localuser *lpeer;
|
|
|
|
|
int res = 0, bridge = 0;
|
|
|
|
@ -1063,8 +1065,16 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
|
|
|
|
|
}
|
|
|
|
|
/* Begin Monitoring */
|
|
|
|
|
if (qe->parent->monfmt && *qe->parent->monfmt) {
|
|
|
|
|
monitorfilename = pbx_builtin_getvar_helper( peer, "MONITOR_FILENAME");
|
|
|
|
|
if(monitorfilename) {
|
|
|
|
|
ast_monitor_start( peer, qe->parent->monfmt, monitorfilename, 1 );
|
|
|
|
|
} else {
|
|
|
|
|
ast_monitor_start( peer, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 );
|
|
|
|
|
}
|
|
|
|
|
if(qe->parent->monjoin) {
|
|
|
|
|
ast_monitor_setjoinfiles( peer, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* Drop out of the queue at this point, to prepare for next caller */
|
|
|
|
|
leave_queue(qe);
|
|
|
|
|
if( url && !ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
|
|
|
|
@ -1641,6 +1651,8 @@ static void reload_queues(void)
|
|
|
|
|
strncpy(q->context, var->value, sizeof(q->context) - 1);
|
|
|
|
|
} else if (!strcasecmp(var->name, "timeout")) {
|
|
|
|
|
q->timeout = atoi(var->value);
|
|
|
|
|
} else if (!strcasecmp(var->name, "monitor-join")) {
|
|
|
|
|
q->monjoin = ast_true(var->value);
|
|
|
|
|
} else if (!strcasecmp(var->name, "monitor-format")) {
|
|
|
|
|
strncpy(q->monfmt, var->value, sizeof(q->monfmt) - 1);
|
|
|
|
|
} else if (!strcasecmp(var->name, "queue-youarenext")) {
|
|
|
|
|