*** apps/app_queue.c.orig 2007-02-28 22:07:03.000000000 +0800 --- apps/app_queue.c 2007-03-15 15:02:17.000000000 +0800 *************** *** 133,138 **** --- 133,139 ---- " 'd' -- data-quality (modem) call (minimum delay).\n" " 'h' -- allow callee to hang up by hitting *.\n" " 'H' -- allow caller to hang up by hitting *.\n" + " 'k' -- allow caller not to hang up when the callee hanged up.\n" " 'n' -- no retries on the timeout; will exit this application and \n" " go to the next step.\n" " 'r' -- ring instead of playing MOH\n" *************** *** 148,154 **** "seconds, checked between each queues.conf 'timeout' and 'retry' cycle.\n" " This application sets the following channel variable upon completion:\n" " QUEUESTATUS The status of the call as a text string, one of\n" ! " TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL\n"; static char *app_aqm = "AddQueueMember" ; static char *app_aqm_synopsis = "Dynamically adds queue members" ; --- 149,155 ---- "seconds, checked between each queues.conf 'timeout' and 'retry' cycle.\n" " This application sets the following channel variable upon completion:\n" " QUEUESTATUS The status of the call as a text string, one of\n" ! " TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL | KEEPALIVE\n"; static char *app_aqm = "AddQueueMember" ; static char *app_aqm_synopsis = "Dynamically adds queue members" ; *************** *** 243,248 **** --- 244,250 ---- QUEUE_JOINUNAVAIL = 4, QUEUE_LEAVEUNAVAIL = 5, QUEUE_FULL = 6, + QUEUE_KEEPALIVE = 7, }; const struct { *************** *** 255,261 **** { QUEUE_LEAVEEMPTY, "LEAVEEMPTY" }, { QUEUE_JOINUNAVAIL, "JOINUNAVAIL" }, { QUEUE_LEAVEUNAVAIL, "LEAVEUNAVAIL" }, ! { QUEUE_FULL, "FULL" }, }; /*! \brief We define a custom "local user" structure because we --- 257,263 ---- { QUEUE_LEAVEEMPTY, "LEAVEEMPTY" }, { QUEUE_JOINUNAVAIL, "JOINUNAVAIL" }, { QUEUE_LEAVEUNAVAIL, "LEAVEUNAVAIL" }, ! { QUEUE_KEEPALIVE, "KEEPALIVE" }, }; /*! \brief We define a custom "local user" structure because we *************** *** 3201,3206 **** --- 3203,3209 ---- char *announceoverride = NULL; char *user_priority; int prio; + int keepalive = 0; char *queuetimeoutstr = NULL; enum queue_result reason = QUEUE_UNKNOWN; *************** *** 3249,3254 **** --- 3252,3259 ---- if (options && (strchr(options, 'r'))) ringing = 1; + if (options && (strchr(options, 'k'))) + keepalive = 1; qe.chan = chan; qe.prio = (int)prio; *************** *** 3343,3348 **** --- 3348,3357 ---- if (!qe.handled) { record_abandoned(&qe); ast_queue_log(queuename, chan->uniqueid, "NONE", "ABANDON", "%d|%d|%ld", qe.pos, qe.opos, (long)time(NULL) - qe.start); + } else if (keepalive) { + ast_log(LOG_WARNING, "QUEUE_KEEPALIVE"); + reason = QUEUE_KEEPALIVE; + res = 0; } } else if (valid_exit(&qe, res)) { ast_queue_log(queuename, chan->uniqueid, "NONE", "EXITWITHKEY", "%s|%d", qe.digits, qe.pos);