[asterisk-commits] mmichelson: branch group/CCSS r217234 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 8 16:04:21 CDT 2009
Author: mmichelson
Date: Tue Sep 8 16:04:20 2009
New Revision: 217234
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217234
Log:
Further unstub the state change function.
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=217234&r1=217233&r2=217234
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Tue Sep 8 16:04:20 2009
@@ -1168,7 +1168,8 @@
* call monitor's unsuspend callback.
*/
if (core_instance->current_state == CC_CALLER_REQUESTED) {
- /* Do 1 */
+ core_instance->current_state = args->state;
+ core_instance->agent->callbacks->ack(core_instance->agent);
} else if (core_instance->current_state == CC_CALLER_BUSY) {
/* Do 2 */
} else {
@@ -1180,7 +1181,17 @@
*/
if (core_instance->current_state != CC_ACTIVE) {
ast_log(LOG_NOTICE, "Invalid state change request. Cannot go from %d to %d\n", core_instance->current_state, args->state);
- }
+ break;
+ }
+ core_instance->current_state = args->state;
+ if (core_instance->agent->callbacks->status_request(core_instance->agent) == AST_DEVICE_NOT_INUSE) {
+ ast_log(LOG_NOTICE, "Both parties are ready, let's try that recall\n");
+ ast_cc_request_state_change(CC_RECALLING, core_instance->core_id, "Both parties are available\n");
+ } else {
+ ast_log(LOG_NOTICE, "Caller has become busy, so we must begin monitoring him\n");
+ ast_cc_request_state_change(CC_CALLER_BUSY, core_instance->core_id, "Caller is busy\n");
+ }
+ break;
case CC_CALLER_BUSY:
/* Callee was available, but caller was busy, call agent's begin_monitoring callback
* and call monitor's suspend callback.
More information about the asterisk-commits
mailing list