--- apps/app_queue.c.before2 Mon Sep 17 18:11:27 2007 +++ apps/app_queue.c Mon Sep 17 18:31:29 2007 @@ -251,6 +251,9 @@ /*! \brief queues.conf [general] option */ static int montype_default = 0; +/*! \brief queues.conf [general] option */ +static int update_cdr = 0; + enum queue_result { QUEUE_UNKNOWN = 0, QUEUE_TIMEOUT = 1, @@ -2685,6 +2688,9 @@ ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n"); } ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s", (long)time(NULL) - qe->start, peer->uniqueid); + if(update_cdr && qe->chan->cdr) + ast_copy_string(qe->chan->cdr->dstchannel, member->membername, sizeof(qe->chan->cdr->dstchannel)); + if (qe->parent->eventwhencalled) manager_event(EVENT_FLAG_AGENT, "AgentConnect", "Queue: %s\r\n" @@ -3806,6 +3812,9 @@ if ((general_val = ast_variable_retrieve(cfg, "general", "monitor-type"))) if (!strcasecmp(general_val, "mixmonitor")) montype_default = 1; + update_cdr = 0; + if ((general_val = ast_variable_retrieve(cfg, "general", "updatecdr"))) + update_cdr = ast_true(general_val); } else { /* Define queue */ /* Look for an existing one */ AST_LIST_TRAVERSE(&queues, q, list) {