[asterisk-commits] mmichelson: branch group/CCSS r214695 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 28 14:58:57 CDT 2009


Author: mmichelson
Date: Fri Aug 28 14:58:53 2009
New Revision: 214695

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214695
Log:
Stub for CallCompletionRequest application


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=214695&r1=214694&r2=214695
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Aug 28 14:58:53 2009
@@ -29,6 +29,19 @@
 #include "asterisk/utils.h"
 #include "asterisk/taskprocessor.h"
 #include "asterisk/event.h"
+
+/*** DOCUMENTATION
+	<application name="CallCompletionRequest" language="en_US">
+		<synopsis>
+			Request call completion service for previous call
+		</synopsis>
+		<syntax />
+		<description>
+			<para>Request call completion service for a previously failed
+			call attempt.</para>
+		</description>
+	</application>
+ ***/
 
 /*!
  * \since 1.6.4
@@ -868,6 +881,29 @@
 	return ast_taskprocessor_push(cc_core_taskprocessor, cc_do_state_change, args);
 }
 
+static char *ccreq = "CallCompletionRequest";
+
+static int ccreq_exec(struct ast_channel *chan, const char *data)
+{
+	/* Let's map this shizzle out.
+	 *
+	 * First, let's be sure that the channel is configured to
+	 * use a generic agent, because otherwise, calling this
+	 * application is invalid as all git out.
+	 *
+	 * Then, we neec to find the pending offer which corresponds to
+	 * this device's previous failed attempt.
+	 *
+	 * Once we have that, we can then request a state change to
+	 * the appropriate core instance. Then it's up to the core to
+	 * change states, change the pending offer into a monitor, and
+	 * destroy the pending offer.
+	 */
+	
+	/* STUB */
+	return 0;
+}
+
 int ast_cc_init(void)
 {
 	if (!(pending_cc_offers = ao2_container_alloc(CC_PENDING_OFFER_BUCKETS,
@@ -888,5 +924,6 @@
 		return -1;
 	}
 	ast_log(LOG_NOTICE, "Successfully created CC sched_thread context\n");
-	return 0;
-}
+	return ast_register_application_xml(ccreq_app, ccreq_exec);
+	return 0;
+}




More information about the asterisk-commits mailing list