[svn-commits] mmichelson: branch group/CCSS r231615 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Nov 30 15:12:01 CST 2009


Author: mmichelson
Date: Mon Nov 30 15:11:59 2009
New Revision: 231615

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231615
Log:
Fill in the sip_cc_agent_recall function.


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=231615&r1=231614&r2=231615
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Mon Nov 30 15:11:59 2009
@@ -3453,7 +3453,18 @@
 
 static int sip_cc_agent_recall(struct ast_cc_agent *agent)
 {
-	/* Here, we need to send a NOTIFY with the "open" state */
+	struct sip_cc_agent_pvt *agent_pvt = agent->private_data;
+	/* If we have received a PUBLISH beforehand stating that the caller in question
+	 * is not available, we can save ourself a bit of effort here and just report
+	 * 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");
+	}
+	/* Otherwise, we transmit a NOTIFY to the caller and await either
+	 * a PUBLISH or an INVITE
+	 */
+	transmit_cc_notify(agent, agent_pvt->subscribe_pvt, CC_READY);
 	return 0;
 }
 




More information about the svn-commits mailing list