[libpri-commits] rmudgett: branch group/ccss r1399 - in /team/group/ccss: ./ doc/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Wed Dec 23 13:47:28 CST 2009
Author: rmudgett
Date: Wed Dec 23 13:47:26 2009
New Revision: 1399
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1399
Log:
Combine active T_CCBS3 and QSIG_CC_T3 into T_RECALL.
This is similar to the T_SUPERVISION and T_ACTIVATE timers.
Modified:
team/group/ccss/doc/cc_ptmp_agent.fsm
team/group/ccss/doc/cc_ptmp_agent_flattened.fsm
team/group/ccss/doc/cc_qsig_monitor.fsm
team/group/ccss/doc/cc_qsig_monitor_flattened.fsm
team/group/ccss/pri_cc.c
team/group/ccss/pri_internal.h
Modified: team/group/ccss/doc/cc_ptmp_agent.fsm
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/doc/cc_ptmp_agent.fsm?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/doc/cc_ptmp_agent.fsm (original)
+++ team/group/ccss/doc/cc_ptmp_agent.fsm Wed Dec 23 13:47:26 2009
@@ -261,12 +261,13 @@
}
State CC_STATE_WAIT_CALLBACK {
Prolog {
- Action Start_T_CCBS3;
- }
- Epilog {
- Action Stop_T_CCBS3;
- }
- Stimulus CC_EVENT_TIMEOUT_T_CCBS3 {
+ /* Start T_CCBS3 */
+ Action Start_T_RECALL;
+ }
+ Epilog {
+ Action Stop_T_RECALL;
+ }
+ Stimulus CC_EVENT_TIMEOUT_T_RECALL {
Action Pass_Up_CC_Cancel;
Action Send_CCBSErase(T_CCBS3_TIMEOUT);
Next_State CC_STATE_IDLE;
Modified: team/group/ccss/doc/cc_ptmp_agent_flattened.fsm
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/doc/cc_ptmp_agent_flattened.fsm?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/doc/cc_ptmp_agent_flattened.fsm (original)
+++ team/group/ccss/doc/cc_ptmp_agent_flattened.fsm Wed Dec 23 13:47:26 2009
@@ -117,7 +117,8 @@
Action Send_RemoteUserFree;
Action Stop_T_CCBS1;
Action Stop_Extended_T_CCBS1;
- Action Start_T_CCBS3;
+ /* Start T_CCBS3 */
+ Action Start_T_RECALL;
Next_State CC_STATE_WAIT_CALLBACK;
}
}
@@ -216,7 +217,8 @@
}
Action Stop_T_CCBS1;
Action Stop_Extended_T_CCBS1;
- Action Start_T_CCBS3;
+ /* Start T_CCBS3 */
+ Action Start_T_RECALL;
Next_State CC_STATE_WAIT_CALLBACK;
}
Stimulus CC_EVENT_A_BUSY {
@@ -360,10 +362,10 @@
}
}
State CC_STATE_WAIT_CALLBACK {
- Stimulus CC_EVENT_TIMEOUT_T_CCBS3 {
+ Stimulus CC_EVENT_TIMEOUT_T_RECALL {
Action Pass_Up_CC_Cancel;
Action Send_CCBSErase(T_CCBS3_TIMEOUT);
- Action Stop_T_CCBS3;
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
@@ -378,7 +380,7 @@
Test == globalRecall {
Action Send_CCBSStopAlerting;
}
- Action Stop_T_CCBS3;
+ Action Stop_T_RECALL;
Action Reset_A_Status;
Next_State CC_STATE_ACTIVATED;
}
@@ -389,7 +391,7 @@
Test == globalRecall {
Action Send_CCBSStopAlerting;
}
- Action Stop_T_CCBS3;
+ Action Stop_T_RECALL;
Next_State CC_STATE_CALLBACK;
}
Stimulus CC_EVENT_A_STATUS {
@@ -399,7 +401,7 @@
Stimulus CC_EVENT_TIMEOUT_T_SUPERVISION {
Action Pass_Up_CC_Cancel;
Action Send_CCBSErase(T_CCBS2_TIMEOUT);
- Action Stop_T_CCBS3;
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
@@ -407,14 +409,14 @@
Stimulus CC_EVENT_LINK_CANCEL {
Action Pass_Up_CC_Cancel;
Action Send_CCBSErase(Normal_Unspecified);
- Action Stop_T_CCBS3;
- Action Stop_T_SUPERVISION;
- Action Set_Selfdestruct;
- Next_State CC_STATE_IDLE;
- }
- Stimulus CC_EVENT_CANCEL {
- Action Send_CCBSErase(Normal_Unspecified);
- Action Stop_T_CCBS3;
+ Action Stop_T_RECALL;
+ Action Stop_T_SUPERVISION;
+ Action Set_Selfdestruct;
+ Next_State CC_STATE_IDLE;
+ }
+ Stimulus CC_EVENT_CANCEL {
+ Action Send_CCBSErase(Normal_Unspecified);
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
Modified: team/group/ccss/doc/cc_qsig_monitor.fsm
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/doc/cc_qsig_monitor.fsm?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/doc/cc_qsig_monitor.fsm (original)
+++ team/group/ccss/doc/cc_qsig_monitor.fsm Wed Dec 23 13:47:26 2009
@@ -191,10 +191,11 @@
}
State CC_STATE_WAIT_CALLBACK {
Prolog {
- Action Start_QSIG_CC_T3;
+ /* Start QSIG_CC_T3 */
+ Action Start_T_RECALL;
}
Epilog {
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
}
Stimulus CC_EVENT_RECALL {
/* The original call parameters have already been set. */
@@ -204,7 +205,7 @@
Stimulus CC_EVENT_SUSPEND {
Next_State CC_STATE_SUSPENDED;
}
- Stimulus CC_EVENT_TIMEOUT_QSIG_CC_T3 {
+ Stimulus CC_EVENT_TIMEOUT_T_RECALL {
Action Pass_Up_CC_Cancel;
Action Send_CC_Cancel(Q931_ANY_MESSAGE);
Action Hangup_Signaling_Link;
Modified: team/group/ccss/doc/cc_qsig_monitor_flattened.fsm
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/doc/cc_qsig_monitor_flattened.fsm?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/doc/cc_qsig_monitor_flattened.fsm (original)
+++ team/group/ccss/doc/cc_qsig_monitor_flattened.fsm Wed Dec 23 13:47:26 2009
@@ -188,7 +188,8 @@
Action Send_CC_Suspend;
Next_State CC_STATE_SUSPENDED;
}
- Action Start_QSIG_CC_T3;
+ /* Start QSIG_CC_T3 */
+ Action Start_T_RECALL;
Next_State CC_STATE_WAIT_CALLBACK;
}
Stimulus CC_EVENT_SUSPEND {
@@ -240,11 +241,11 @@
Stimulus CC_EVENT_RECALL {
/* The original call parameters have already been set. */
Action Queue_SETUP_Recall;
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
Next_State CC_STATE_CALLBACK;
}
Stimulus CC_EVENT_SUSPEND {
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
/*
* The ccSuspend will be sent in a FACILITY or CONNECT
* message depending upon the CIS call state.
@@ -252,11 +253,11 @@
Action Send_CC_Suspend;
Next_State CC_STATE_SUSPENDED;
}
- Stimulus CC_EVENT_TIMEOUT_QSIG_CC_T3 {
+ Stimulus CC_EVENT_TIMEOUT_T_RECALL {
Action Pass_Up_CC_Cancel;
Action Send_CC_Cancel(Q931_ANY_MESSAGE);
Action Hangup_Signaling_Link;
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
@@ -271,7 +272,7 @@
Test != TRUE {
Action Send_CC_Cancel(Q931_SETUP);
}
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
@@ -284,20 +285,20 @@
/* Received ccCancel */
Action Pass_Up_CC_Cancel;
Action Post_HANGUP_SIGNALING;
- Action Stop_QSIG_CC_T3;
- Action Stop_T_SUPERVISION;
- Next_State CC_STATE_WAIT_DESTRUCTION;
- }
- Stimulus CC_EVENT_CANCEL {
- Test == Get_Signaling_Link_Active;
- Test == TRUE {
- Action Send_CC_Cancel(Q931_ANY_MESSAGE);
- Action Hangup_Signaling_Link;
- }
- Test != TRUE {
- Action Send_CC_Cancel(Q931_SETUP);
- }
- Action Stop_QSIG_CC_T3;
+ Action Stop_T_RECALL;
+ Action Stop_T_SUPERVISION;
+ Next_State CC_STATE_WAIT_DESTRUCTION;
+ }
+ Stimulus CC_EVENT_CANCEL {
+ Test == Get_Signaling_Link_Active;
+ Test == TRUE {
+ Action Send_CC_Cancel(Q931_ANY_MESSAGE);
+ Action Hangup_Signaling_Link;
+ }
+ Test != TRUE {
+ Action Send_CC_Cancel(Q931_SETUP);
+ }
+ Action Stop_T_RECALL;
Action Stop_T_SUPERVISION;
Action Set_Selfdestruct;
Next_State CC_STATE_IDLE;
Modified: team/group/ccss/pri_cc.c
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_cc.c?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/pri_cc.c (original)
+++ team/group/ccss/pri_cc.c Wed Dec 23 13:47:26 2009
@@ -2587,8 +2587,8 @@
case CC_EVENT_TIMEOUT_T_SUPERVISION:
str = "CC_EVENT_TIMEOUT_T_SUPERVISION";
break;
- case CC_EVENT_TIMEOUT_T_CCBS3:
- str = "CC_EVENT_TIMEOUT_T_CCBS3";
+ case CC_EVENT_TIMEOUT_T_RECALL:
+ str = "CC_EVENT_TIMEOUT_T_RECALL";
break;
}
return str;
@@ -2825,54 +2825,70 @@
/*!
* \internal
- * \brief FSM action to stop the PTMP T_CCBS3 timer.
- *
- * \param ctrl D channel controller.
- * \param cc_record Call completion record to process event.
- *
- * \return Nothing
- */
-static void pri_cc_act_stop_t_ccbs3(struct pri *ctrl, struct pri_cc_record *cc_record)
+ * \brief FSM action to stop the T_RECALL timer.
+ *
+ * \param ctrl D channel controller.
+ * \param cc_record Call completion record to process event.
+ *
+ * \return Nothing
+ */
+static void pri_cc_act_stop_t_recall(struct pri *ctrl, struct pri_cc_record *cc_record)
{
PRI_CC_ACT_DEBUG_OUTPUT(ctrl);
- pri_schedule_del(ctrl, cc_record->fsm.ptmp.t_ccbs3);
- cc_record->fsm.ptmp.t_ccbs3 = 0;
-}
-
-/*!
- * \internal
- * \brief T_CCBS3 timeout callback.
+ pri_schedule_del(ctrl, cc_record->t_recall);
+ cc_record->t_recall = 0;
+}
+
+/*!
+ * \internal
+ * \brief T_RECALL timeout callback.
*
* \param data CC record pointer.
*
* \return Nothing
*/
-static void pri_cc_timeout_t_ccbs3(void *data)
+static void pri_cc_timeout_t_recall(void *data)
{
struct pri_cc_record *cc_record = data;
- cc_record->fsm.ptmp.t_ccbs3 = 0;
- q931_cc_timeout(cc_record->master, cc_record, CC_EVENT_TIMEOUT_T_CCBS3);
-}
-
-/*!
- * \internal
- * \brief FSM action to start the PTMP T_CCBS3 timer.
- *
- * \param ctrl D channel controller.
- * \param cc_record Call completion record to process event.
- *
- * \return Nothing
- */
-static void pri_cc_act_start_t_ccbs3(struct pri *ctrl, struct pri_cc_record *cc_record)
-{
+ cc_record->t_recall = 0;
+ q931_cc_timeout(cc_record->master, cc_record, CC_EVENT_TIMEOUT_T_RECALL);
+}
+
+/*!
+ * \internal
+ * \brief FSM action to start the T_RECALL timer.
+ *
+ * \param ctrl D channel controller.
+ * \param cc_record Call completion record to process event.
+ *
+ * \return Nothing
+ */
+static void pri_cc_act_start_t_recall(struct pri *ctrl, struct pri_cc_record *cc_record)
+{
+ int duration;
+
PRI_CC_ACT_DEBUG_OUTPUT(ctrl);
- if (cc_record->fsm.ptmp.t_ccbs3) {
- pri_error(ctrl, "!! T_CCBS3 is already running!");
- pri_schedule_del(ctrl, cc_record->fsm.ptmp.t_ccbs3);
- }
- cc_record->fsm.ptmp.t_ccbs3 = pri_schedule_event(ctrl,
- ctrl->timers[PRI_TIMER_T_CCBS3], pri_cc_timeout_t_ccbs3, cc_record);
+ if (cc_record->t_recall) {
+ pri_error(ctrl, "!! T_RECALL is already running!");
+ pri_schedule_del(ctrl, cc_record->t_recall);
+ }
+ switch (ctrl->switchtype) {
+ case PRI_SWITCH_EUROISDN_E1:
+ case PRI_SWITCH_EUROISDN_T1:
+ duration = ctrl->timers[PRI_TIMER_T_CCBS3];
+ break;
+ case PRI_SWITCH_QSIG:
+ duration = ctrl->timers[PRI_TIMER_QSIG_CC_T3];
+ break;
+ default:
+ /* Timer not defined for this switch type. Should never happen. */
+ pri_error(ctrl, "!! A CC recall timer is not defined!");
+ duration = 0;
+ break;
+ }
+ cc_record->t_supervision = pri_schedule_event(ctrl, duration,
+ pri_cc_timeout_t_recall, cc_record);
}
/*!
@@ -4202,7 +4218,7 @@
pri_cc_act_send_remote_user_free(ctrl, cc_record);
pri_cc_act_stop_t_ccbs1(ctrl, cc_record);
pri_cc_act_stop_extended_t_ccbs1(ctrl, cc_record);
- pri_cc_act_start_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_start_t_recall(ctrl, cc_record);
cc_record->state = CC_STATE_WAIT_CALLBACK;
break;
default:
@@ -4314,7 +4330,7 @@
}
pri_cc_act_stop_t_ccbs1(ctrl, cc_record);
pri_cc_act_stop_extended_t_ccbs1(ctrl, cc_record);
- pri_cc_act_start_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_start_t_recall(ctrl, cc_record);
cc_record->state = CC_STATE_WAIT_CALLBACK;
break;
case CC_EVENT_A_BUSY:
@@ -4488,10 +4504,10 @@
static void pri_cc_fsm_ptmp_agent_wait_callback(struct pri *ctrl, q931_call *call, struct pri_cc_record *cc_record, enum CC_EVENTS event)
{
switch (event) {
- case CC_EVENT_TIMEOUT_T_CCBS3:
+ case CC_EVENT_TIMEOUT_T_RECALL:
pri_cc_act_pass_up_cc_cancel(ctrl, cc_record);
pri_cc_act_send_ccbs_erase(ctrl, cc_record, 2 /* t-CCBS3-timeout */);
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
pri_cc_act_stop_t_supervision(ctrl, cc_record);
pri_cc_act_set_self_destruct(ctrl, cc_record);
cc_record->state = CC_STATE_IDLE;
@@ -4505,7 +4521,7 @@
if (cc_record->option.recall_mode == 0 /* globalRecall */) {
pri_cc_act_send_ccbs_stop_alerting(ctrl, cc_record);
}
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
pri_cc_act_reset_a_status(ctrl, cc_record);
cc_record->state = CC_STATE_ACTIVATED;
break;
@@ -4515,7 +4531,7 @@
if (cc_record->option.recall_mode == 0 /* globalRecall */) {
pri_cc_act_send_ccbs_stop_alerting(ctrl, cc_record);
}
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
cc_record->state = CC_STATE_CALLBACK;
break;
case CC_EVENT_A_STATUS:
@@ -4525,7 +4541,7 @@
case CC_EVENT_TIMEOUT_T_SUPERVISION:
pri_cc_act_pass_up_cc_cancel(ctrl, cc_record);
pri_cc_act_send_ccbs_erase(ctrl, cc_record, 1 /* t-CCBS2-timeout */);
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
pri_cc_act_stop_t_supervision(ctrl, cc_record);
pri_cc_act_set_self_destruct(ctrl, cc_record);
cc_record->state = CC_STATE_IDLE;
@@ -4533,14 +4549,14 @@
case CC_EVENT_LINK_CANCEL:
pri_cc_act_pass_up_cc_cancel(ctrl, cc_record);
pri_cc_act_send_ccbs_erase(ctrl, cc_record, 0 /* normal-unspecified */);
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
pri_cc_act_stop_t_supervision(ctrl, cc_record);
pri_cc_act_set_self_destruct(ctrl, cc_record);
cc_record->state = CC_STATE_IDLE;
break;
case CC_EVENT_CANCEL:
pri_cc_act_send_ccbs_erase(ctrl, cc_record, 0 /* normal-unspecified */);
- pri_cc_act_stop_t_ccbs3(ctrl, cc_record);
+ pri_cc_act_stop_t_recall(ctrl, cc_record);
pri_cc_act_stop_t_supervision(ctrl, cc_record);
pri_cc_act_set_self_destruct(ctrl, cc_record);
cc_record->state = CC_STATE_IDLE;
Modified: team/group/ccss/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/group/ccss/pri_internal.h?view=diff&rev=1399&r1=1398&r2=1399
==============================================================================
--- team/group/ccss/pri_internal.h (original)
+++ team/group/ccss/pri_internal.h Wed Dec 23 13:47:26 2009
@@ -706,7 +706,7 @@
/*! Max time the CCBS/CCNR service will be active. */
CC_EVENT_TIMEOUT_T_SUPERVISION,
/*! Max time to wait for user A to respond to user B availability. */
- CC_EVENT_TIMEOUT_T_CCBS3,
+ CC_EVENT_TIMEOUT_T_RECALL,
};
enum CC_PARTY_A_AVAILABILITY {
@@ -757,8 +757,6 @@
struct {
/*! Extended T_CCBS1 timer id for CCBSStatusRequest handling. */
int extended_t_ccbs1;
- /*! T_CCBS3 timer id. A response to B available timer. */
- int t_ccbs3;
/*! Invoke id for the CCBSStatusRequest message to find if T_CCBS1 still running. */
int t_ccbs1_invoke_id;
/*! Accumulating party A availability status */
@@ -770,8 +768,6 @@
struct {
/*! Q.931 message type the current message event came in on. */
int msgtype;
- /*! QSIG_CC_T3. A response to B available timer. */
- int t_cc_t3;
} qsig;
} fsm;
/*! Received message parameters of interest. */
@@ -814,6 +810,14 @@
* Q.SIG - QSIG_CCBS_T2/QSIG_CCNR_T2
*/
int t_supervision;
+ /*!
+ * \brief Party A response to B availability for recall timer.
+ * \details
+ * This timer is one of the following timer id's:
+ * PTMP - T_CCBS3
+ * Q.SIG - QSIG_CC_T3
+ */
+ int t_recall;
/*! Invoke id for the cc-request message to find if T_ACTIVATE/QSIG_CC_T1 still running. */
int t_activate_invoke_id;
/*! Pending response information. */
More information about the libpri-commits
mailing list