[asterisk-commits] rmudgett: branch rmudgett/dahdi_ccss r238753 - /team/rmudgett/dahdi_ccss/chan...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 8 16:07:15 CST 2010
Author: rmudgett
Date: Fri Jan 8 16:07:10 2010
New Revision: 238753
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238753
Log:
Filled in agent CCSS callbacks.
Next up is handling agent events from libpri.
Modified:
team/rmudgett/dahdi_ccss/channels/sig_pri.c
Modified: team/rmudgett/dahdi_ccss/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/dahdi_ccss/channels/sig_pri.c?view=diff&rev=238753&r1=238752&r2=238753
==============================================================================
--- team/rmudgett/dahdi_ccss/channels/sig_pri.c (original)
+++ team/rmudgett/dahdi_ccss/channels/sig_pri.c Fri Jan 8 16:07:10 2010
@@ -4251,8 +4251,8 @@
*/
int sig_pri_cc_agent_start_offer_timer(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_start_offer_timer() not written */
- return -1;
+ /* libpri maintains it's own offer timer in the form of T_RETENTION. */
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4272,8 +4272,8 @@
*/
int sig_pri_cc_agent_stop_offer_timer(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_stop_offer_timer() not written */
- return -1;
+ /* libpri maintains it's own offer timer in the form of T_RETENTION. */
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4331,8 +4331,13 @@
*/
int sig_pri_cc_agent_status_req(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_status_req() not written */
- return -1;
+ struct sig_pri_cc_agent_prv *cc_pvt;
+
+ cc_pvt = agent->private_data;
+ ast_mutex_lock(&cc_pvt->pri->lock);
+ pri_cc_status_req(cc_pvt->pri->pri, cc_pvt->cc_id);
+ ast_mutex_unlock(&cc_pvt->pri->lock);
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4361,8 +4366,13 @@
*/
int sig_pri_cc_agent_stop_ringing(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_stop_ringing() not written */
- return -1;
+ struct sig_pri_cc_agent_prv *cc_pvt;
+
+ cc_pvt = agent->private_data;
+ ast_mutex_lock(&cc_pvt->pri->lock);
+ pri_cc_stop_alerting(cc_pvt->pri->pri, cc_pvt->cc_id);
+ ast_mutex_unlock(&cc_pvt->pri->lock);
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4390,8 +4400,13 @@
*/
int sig_pri_cc_agent_party_b_free(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_party_b_free() not written */
- return -1;
+ struct sig_pri_cc_agent_prv *cc_pvt;
+
+ cc_pvt = agent->private_data;
+ ast_mutex_lock(&cc_pvt->pri->lock);
+ pri_cc_b_free(cc_pvt->pri->pri, cc_pvt->cc_id);
+ ast_mutex_unlock(&cc_pvt->pri->lock);
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4414,8 +4429,8 @@
*/
int sig_pri_cc_agent_start_monitoring(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_start_monitoring() not written */
- return -1;
+ /* libpri already knows when and how it needs to monitor Party A. */
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4441,8 +4456,13 @@
*/
int sig_pri_cc_agent_callee_available(struct ast_cc_agent *agent)
{
- /*! \todo BUGBUG sig_pri_cc_agent_callee_available() not written */
- return -1;
+ struct sig_pri_cc_agent_prv *cc_pvt;
+
+ cc_pvt = agent->private_data;
+ ast_mutex_lock(&cc_pvt->pri->lock);
+ pri_cc_remote_user_free(cc_pvt->pri->pri, cc_pvt->cc_id);
+ ast_mutex_unlock(&cc_pvt->pri->lock);
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
@@ -4616,8 +4636,12 @@
*/
int sig_pri_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, const int core_id, int *sched_id)
{
- /*! \todo BUGBUG sig_pri_cc_monitor_cancel_available_timer() not written */
- return -1;
+ /*
+ * libpri maintains it's own available timer as one of:
+ * T_CCBS2/T_CCBS5/T_CCBS6/QSIG_CCBS_T2
+ * T_CCNR2/T_CCNR5/T_CCNR6/QSIG_CCNR_T2
+ */
+ return 0;
}
#endif /* defined(HAVE_PRI_CCSS) */
More information about the asterisk-commits
mailing list