[asterisk-commits] mmichelson: branch group/CCSS r231193 - /team/group/CCSS/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 25 09:52:09 CST 2009
Author: mmichelson
Date: Wed Nov 25 09:52:07 2009
New Revision: 231193
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=231193
Log:
Put in skeleton for SIP cc monitor callbacks.
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=231193&r1=231192&r2=231193
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Wed Nov 25 09:52:07 2009
@@ -1771,7 +1771,6 @@
return 0;
}
-static void cc_handle_ok(struct sip_pvt *pvt, struct sip_request *req, struct sip_epa_entry *epa_entry);
static void cc_handle_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry);
static const struct epa_static_data cc_epa_static_data = {
@@ -2120,6 +2119,72 @@
for (i = 0; i < ARRAY_LEN(event_state_compositors); i++) {
ao2_ref(event_state_compositors[i].compositor, -1);
}
+}
+static int sip_cc_monitor_init(struct ast_cc_monitor *monitor, const int core_id);
+static int sip_cc_monitor_request_cc(struct ast_cc_monitor *monitor, const int core_id, struct ast_cc_monitor_link *parent_link);
+static int sip_cc_monitor_suspend(struct ast_cc_monitor *monitor, const int core_id);
+static int sip_cc_monitor_status_response(struct ast_cc_monitor *monitor, const int core_id, enum ast_device_state devstate);
+static int sip_cc_monitor_unsuspend(struct ast_cc_monitor *monitor, const int core_id);
+static int sip_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, const int core_id, int *sched_id);
+static void sip_cc_monitor_destructor(void *monitor);
+static void sip_cc_monitor_instance_destructor(const int core_id);
+
+static struct ast_cc_monitor_callbacks sip_cc_monitor_callbacks = {
+ .type = "SIP",
+ .init = sip_cc_monitor_init,
+ .request_cc = sip_cc_monitor_request_cc,
+ .suspend = sip_cc_monitor_suspend,
+ .status_response = sip_cc_monitor_status_response,
+ .unsuspend = sip_cc_monitor_unsuspend,
+ .cancel_available_timer = sip_cc_monitor_cancel_available_timer,
+ .destructor = sip_cc_monitor_destructor,
+ .instance_destructor = sip_cc_monitor_instance_destructor,
+};
+
+static int sip_cc_monitor_init(struct ast_cc_monitor *monitor, const int core_id)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static int sip_cc_monitor_request_cc(struct ast_cc_monitor *monitor, const int core_id, struct ast_cc_monitor_link *parent_link)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static int sip_cc_monitor_suspend(struct ast_cc_monitor *monitor, const int core_id)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static int sip_cc_monitor_status_response(struct ast_cc_monitor *monitor, const int core_id, enum ast_device_state devstate)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static int sip_cc_monitor_unsuspend(struct ast_cc_monitor *monitor, const int core_id)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static int sip_cc_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, const int core_id, int *sched_id)
+{
+ /* XXX STUB */
+ return 0;
+}
+
+static void sip_cc_monitor_destructor(void *monitor)
+{
+ /* XXX STUB */
+}
+
+static void sip_cc_monitor_instance_destructor(const int core_id)
+{
+ /* XXX STUB */
}
/*! \brief Struct to handle custom SIP notify requests. Dynamically allocated when needed */
@@ -27765,6 +27830,9 @@
if (sip_epa_register(&cc_epa_static_data)) {
return AST_MODULE_LOAD_DECLINE;
}
+ if (ast_cc_monitor_register(&sip_cc_monitor_callbacks)) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
/* And start the monitor for the first time */
restart_monitor();
More information about the asterisk-commits
mailing list