[asterisk-commits] mmichelson: branch group/CCSS r247038 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 16 17:10:57 CST 2010


Author: mmichelson
Date: Tue Feb 16 17:10:53 2010
New Revision: 247038

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247038
Log:
Take advantage of printfedness in chan_sip


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=247038&r1=247037&r2=247038
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Tue Feb 16 17:10:53 2010
@@ -2083,7 +2083,7 @@
 
 	agent_pvt->offer_timer_id = -1;
 
-	return ast_cc_failed(agent->core_id, "SIP agent offer timer expired");
+	return ast_cc_failed(agent->core_id, "SIP agent %s's offer timer expired", agent->device_name);
 }
 
 static int sip_cc_agent_start_offer_timer(struct ast_cc_agent *agent)
@@ -2140,7 +2140,8 @@
 	 * the caller as busy
 	 */
 	if (!agent_pvt->is_available) {
-		return ast_cc_agent_caller_busy(agent->core_id, "Caller is busy, reporting to the core");
+		return ast_cc_agent_caller_busy(agent->core_id, "Caller %s is busy, reporting to the core",
+				agent->device_name);
 	}
 	/* Otherwise, we transmit a NOTIFY to the caller and await either
 	 * a PUBLISH or an INVITE
@@ -13784,7 +13785,8 @@
 			/* And we need to let the CC core know that the caller is attempting
 			 * his recall
 			 */
-			ast_cc_agent_recalling(agent->core_id, "SIP caller is attempting recall");
+			ast_cc_agent_recalling(agent->core_id, "SIP caller %s is attempting recall",
+					agent->device_name);
 			if (cc_recall_core_id) {
 				*cc_recall_core_id = agent->core_id;
 			}
@@ -19617,7 +19619,7 @@
 		 * us that it has accepted our CC request. We need to alert the core of this
 		 * development
 		 */
-		ast_cc_monitor_request_acked(monitor_instance->core_id, "SIP endpoint accepted request");
+		ast_cc_monitor_request_acked(monitor_instance->core_id, "SIP endpoint %s accepted request", monitor_instance->device_name);
 		transmit_response(pvt, "200 OK", req);
 		ao2_ref(monitor_instance, -1);
 		return 0;
@@ -22268,10 +22270,12 @@
 
 	if (!strcmp(basic_status, "open")) {
 		agent_pvt->is_available = TRUE;
-		ast_cc_agent_caller_available(agent->core_id, "Received PUBLISH stating SIP caller is available");
+		ast_cc_agent_caller_available(agent->core_id, "Received PUBLISH stating SIP caller %s is available",
+				agent->device_name);
 	} else if (!strcmp(basic_status, "closed")) {
 		agent_pvt->is_available = FALSE;
-		ast_cc_agent_caller_busy(agent->core_id, "Received PUBLISH stating SIP caller is busy");
+		ast_cc_agent_caller_busy(agent->core_id, "Received PUBLISH stating SIP caller %s is busy",
+				agent->device_name);
 	} else {
 		ast_log(LOG_NOTICE, "BS basic content?\n");
 		transmit_response(pvt, "400 Bad Request", req);
@@ -22512,14 +22516,15 @@
 		/* We got sent a SUBSCRIBE and found an agent. This means that CC
 		 * is being canceled.
 		 */
-		ast_cc_failed(agent->core_id, "CC is being canceled\n");
+		ast_cc_failed(agent->core_id, "CC is being canceled by %s", agent->device_name);
 		transmit_response(p, "200 OK", req);
 		ao2_ref(agent, -1);
 		return 0;
 	}
 
 	agent_pvt->subscribe_pvt = dialog_ref(p, "SIP CC agent gains reference to subscription dialog");
-	ast_cc_agent_accept_request(agent->core_id, "SIP caller has requested CC via SUBSCRIBE");
+	ast_cc_agent_accept_request(agent->core_id, "SIP caller %s has requested CC via SUBSCRIBE",
+			agent->device_name);
 	p->subscribed = CALL_COMPLETION;
 
 	/* We don't send a response here. That is done in the agent's ack callback or in the




More information about the asterisk-commits mailing list