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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 4 16:32:22 CST 2009


Author: mmichelson
Date: Fri Dec  4 16:32:18 2009
New Revision: 233354

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233354
Log:
Fix a bit of bad logic in the initial handler.


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=233354&r1=233353&r2=233354
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Fri Dec  4 16:32:18 2009
@@ -23524,20 +23524,15 @@
 
 	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");
 	} 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");
 	} else {
 		transmit_response(pvt, "400 Bad Request", req);
 	}
 
 	ast_xml_free_text(basic_status);
-
-	/* It's possible to get a PUBLISH before we have sent a NOTIFY that a callee is
-	 * available. If that is the case, this call to ast_cc_agent_caller_busy will not
-	 * have any effect. We handle that case properly, though, in the SIP agent's recall
-	 * callback.
-	 */
-	ast_cc_agent_caller_busy(agent->core_id, "Received PUBLISH stating SIP caller is busy");
 	ast_xml_close(pidf_doc);
 	return 0;
 }




More information about the asterisk-commits mailing list