[asterisk-commits] mmichelson: branch mmichelson/queue_bugbug r395204 - in /team/mmichelson/queu...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 23 16:13:22 CDT 2013
Author: mmichelson
Date: Tue Jul 23 16:13:20 2013
New Revision: 395204
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395204
Log:
Alter debugging messages as appropriate.
Most of the NOTICE level messages I added for debugging have been outright
removed, but others have been morphed into more consumable debug level messages.
Modified:
team/mmichelson/queue_bugbug/apps/app_queue.c
team/mmichelson/queue_bugbug/main/bridging.c
Modified: team/mmichelson/queue_bugbug/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/queue_bugbug/apps/app_queue.c?view=diff&rev=395204&r1=395203&r2=395204
==============================================================================
--- team/mmichelson/queue_bugbug/apps/app_queue.c (original)
+++ team/mmichelson/queue_bugbug/apps/app_queue.c Tue Jul 23 16:13:20 2013
@@ -1920,12 +1920,6 @@
if (!payload) {
return;
}
- if (!caller_snapshot) {
- ast_log(LOG_NOTICE, "I'm sending a NULL CALLER snapshot\n");
- }
- if (!agent_snapshot) {
- ast_log(LOG_NOTICE, "I'm sending a NULL AGENT snapshot\n");
- }
ast_multi_channel_blob_add_channel(payload, "caller", caller_snapshot);
ast_multi_channel_blob_add_channel(payload, "agent", agent_snapshot);
@@ -5200,8 +5194,6 @@
{
struct queue_stasis_data *queue_data = obj;
- ast_log(LOG_NOTICE, "Things bein' destroyed\n");
-
ao2_cleanup(queue_data->member);
ao2_cleanup(queue_data->queue);
ast_string_field_free_memory(&queue_data->caller_optimize);
@@ -5236,9 +5228,7 @@
}
ast_string_field_set(queue_data, caller_uniqueid, ast_channel_uniqueid(qe->chan));
- ast_log(LOG_NOTICE, "Initial caller uniqueid is %s\n", queue_data->caller_uniqueid);
ast_string_field_set(queue_data, agent_uniqueid, ast_channel_uniqueid(peer));
- ast_log(LOG_NOTICE, "Initial agent uniqueid is %s\n", queue_data->agent_uniqueid);
queue_data->queue = queue_ref(qe->parent);
queue_data->starttime = starttime;
queue_data->holdstart = holdstart;
@@ -5306,7 +5296,8 @@
if (!strcmp(enter_blob->channel->uniqueid, queue_data->caller_uniqueid)) {
ast_string_field_set(queue_data, bridge_uniqueid,
enter_blob->bridge->uniqueid);
- ast_log(LOG_NOTICE, "Detected entry into bridge %s\n", queue_data->bridge_uniqueid);
+ ast_debug(3, "Detected entry of caller channel %s into bridge %s\n",
+ enter_blob->channel->name, queue_data->bridge_uniqueid);
}
} else if (ast_blind_transfer_type() == stasis_message_type(msg)) {
struct ast_bridge_blob *blind_blob = stasis_message_data(msg);
@@ -5329,7 +5320,7 @@
ao2_unlock(queue_data);
- ast_log(LOG_NOTICE, "Detected blind transfer in queue %s\n", queue_data->queue->name);
+ ast_debug(3, "Detected blind transfer in queue %s\n", queue_data->queue->name);
ast_queue_log(queue_data->queue->name, caller->uniqueid, queue_data->member->membername, "BLINDTRANSFER", "%s|%s|%ld|%ld|%d",
ast_json_string_get(ast_json_object_get(blind_blob->blob, "exten")),
ast_json_string_get(ast_json_object_get(blind_blob->blob, "context")),
@@ -5346,18 +5337,12 @@
RAII_VAR(struct ast_channel_snapshot *, caller, NULL, ao2_cleanup);
RAII_VAR(struct ast_channel_snapshot *, agent, NULL, ao2_cleanup);
- ast_log(LOG_NOTICE, "Getting a transfer event...\n");
if (atxfer_msg->result == AST_BRIDGE_TRANSFER_FAIL ||
atxfer_msg->dest_type == AST_ATTENDED_TRANSFER_DEST_THREEWAY) {
return;
}
ao2_lock(queue_data);
- ast_log(LOG_NOTICE, "queue bridge id is %s\n", queue_data->bridge_uniqueid);
- ast_log(LOG_NOTICE, "to_transferee bridge id is %s\n", atxfer_msg->to_transferee.bridge_snapshot ?
- atxfer_msg->to_transferee.bridge_snapshot->uniqueid : "NULL");
- ast_log(LOG_NOTICE, "to_transfer_target bridge id is %s\n", atxfer_msg->to_transfer_target.bridge_snapshot ?
- atxfer_msg->to_transfer_target.bridge_snapshot->uniqueid : "NULL");
if ((!atxfer_msg->to_transferee.bridge_snapshot || strcmp(queue_data->bridge_uniqueid,
atxfer_msg->to_transferee.bridge_snapshot->uniqueid)) &&
@@ -5372,7 +5357,7 @@
ao2_unlock(queue_data);
- ast_log(LOG_NOTICE, "Detected attended transfer in queue %s\n", queue_data->queue->name);
+ ast_debug(3, "Detected attended transfer in queue %s\n", queue_data->queue->name);
log_attended_transfer(queue_data, caller, atxfer_msg);
@@ -5404,16 +5389,8 @@
/* We only allow move-swap optimizations, so there had BETTER be a source */
ast_assert(source != NULL);
- /* First going to make sure things are detected properly. */
- ast_log(LOG_NOTICE, "OPTIMIZATION IS HAPPENING. PREPARE FOR DUMPAGE!\n");
- ast_log(LOG_NOTICE, "Local ;1 channel is %s\n", local_one->name);
- ast_log(LOG_NOTICE, "Local ;2 channel is %s\n", local_two->name);
- ast_log(LOG_NOTICE, "Source channel is %s\n", source->name);
-
+ ast_string_field_set(optimization, source_chan_uniqueid, source->uniqueid);
id = ast_json_integer_get(ast_json_object_get(ast_multi_channel_blob_get_json(optimization_blob), "id"));
- ast_log(LOG_NOTICE, "ID for optimization is %u\n", id);
-
- ast_string_field_set(optimization, source_chan_uniqueid, source->uniqueid);
optimization->id = id;
optimization->in_progress = 1;
@@ -5452,11 +5429,11 @@
}
if (is_caller) {
- ast_log(LOG_NOTICE, "Changing caller uniqueid from %s to %s\n",
+ ast_debug(3, "Local optimization: Changing queue caller uniqueid from %s to %s\n",
queue_data->caller_uniqueid, optimization->source_chan_uniqueid);
ast_string_field_set(queue_data, caller_uniqueid, optimization->source_chan_uniqueid);
} else {
- ast_log(LOG_NOTICE, "Changing agent uniqueid from %s to %s\n",
+ ast_debug(3, "Local optimization: Changing queue member uniqueid from %s to %s\n",
queue_data->agent_uniqueid, optimization->source_chan_uniqueid);
ast_string_field_set(queue_data, agent_uniqueid, optimization->source_chan_uniqueid);
}
@@ -5497,12 +5474,13 @@
ao2_unlock(queue_data);
+ ast_debug(3, "Detected hangup of queue %s channel %s\n", reason == CALLER ? "caller" : "agent",
+ channel_blob->snapshot->name);
+
ast_queue_log(queue_data->queue->name, caller->uniqueid, queue_data->member->membername,
reason == CALLER ? "COMPLETECALLER" : "COMPLETEAGENT", "%ld|%ld|%d",
(long) (queue_data->starttime - queue_data->holdstart),
(long) (time(NULL) - queue_data->starttime), queue_data->caller_pos);
-
- ast_log(LOG_NOTICE, "Detected hangup request on channel %s\n", channel_blob->snapshot->name);
send_agent_complete(queue_data->queue->name, caller, agent, queue_data->member,
queue_data->holdstart, queue_data->starttime, reason);
Modified: team/mmichelson/queue_bugbug/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/queue_bugbug/main/bridging.c?view=diff&rev=395204&r1=395203&r2=395204
==============================================================================
--- team/mmichelson/queue_bugbug/main/bridging.c (original)
+++ team/mmichelson/queue_bugbug/main/bridging.c Tue Jul 23 16:13:20 2013
@@ -4863,16 +4863,6 @@
return 0;
}
-
- ast_log(LOG_NOTICE, "Optimization bridge dump\n");
- ast_log(LOG_NOTICE, "dst_channel is %s\n", ast_channel_name(dst_bridge_channel->chan));
- ast_log(LOG_NOTICE, "src_channel is %s\n", ast_channel_name(src_bridge_channel->chan));
- ast_log(LOG_NOTICE, "pvt->owner is %s\n", ast_channel_name(pvt->owner));
- ast_log(LOG_NOTICE, "pvt->chan is %s\n", ast_channel_name(pvt->chan));
- ast_log(LOG_NOTICE, "dst_bridge is %s\n", dst_bridge->uniqueid);
- ast_log(LOG_NOTICE, "pvt->owner bridge is %s\n", ast_channel_internal_bridge(pvt->owner)->uniqueid);
- ast_log(LOG_NOTICE, "pvt->chan bridge is %s\n", ast_channel_internal_bridge(pvt->chan)->uniqueid);
-
other = ast_bridge_channel_peer(src_bridge_channel);
if (other && other->state == AST_BRIDGE_CHANNEL_STATE_WAIT) {
unsigned int id = ast_atomic_fetchadd_int((int *) &optimization_id, +1);
More information about the asterisk-commits
mailing list