[asterisk-commits] branch bweschke/polycom_acd_functions - r8041 /team/bweschke/polycom_acd_func...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 12 20:03:30 CST 2006


Author: bweschke
Date: Thu Jan 12 20:03:29 2006
New Revision: 8041

URL: http://svn.digium.com/view/asterisk?rev=8041&view=rev
Log:
 Registering the functions that actually do something against the callback pointers.


Modified:
    team/bweschke/polycom_acd_functions/apps/app_queue.c

Modified: team/bweschke/polycom_acd_functions/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/polycom_acd_functions/apps/app_queue.c?rev=8041&r1=8040&r2=8041&view=diff
==============================================================================
--- team/bweschke/polycom_acd_functions/apps/app_queue.c (original)
+++ team/bweschke/polycom_acd_functions/apps/app_queue.c Thu Jan 12 20:03:29 2006
@@ -84,6 +84,7 @@
 #include "asterisk/features.h"
 #include "asterisk/musiconhold.h"
 #include "asterisk/cli.h"
+#include "asterisk/queues.h"
 #include "asterisk/manager.h"
 #include "asterisk/config.h"
 #include "asterisk/monitor.h"
@@ -3610,6 +3611,24 @@
 	return 0;
 }
 
+int cb_pause_queue_member(char *interface)
+{
+	int res;
+
+	res = set_member_paused("", interface, 1);
+
+	return 0;
+}
+
+int cb_unpause_queue_member(char *interface)
+{
+	int res;
+	
+	res = set_member_paused("", interface, 0);
+
+	return 0;
+}
+
 static int handle_add_queue_member(int fd, int argc, char *argv[])
 {
 	char *queuename, *interface;
@@ -3797,6 +3816,7 @@
 {
 	int res;
 
+	ast_uninstall_queuemember_functions();
 	res = ast_cli_unregister(&cli_show_queue);
 	res |= ast_cli_unregister(&cli_show_queues);
 	res |= ast_cli_unregister(&cli_add_queue_member);
@@ -3839,7 +3859,7 @@
 	res |= ast_register_application(app_pqm, pqm_exec, app_pqm_synopsis, app_pqm_descrip) ;
 	res |= ast_register_application(app_upqm, upqm_exec, app_upqm_synopsis, app_upqm_descrip) ;
 	res |= ast_custom_function_register(&queueagentcount_function);
-
+	ast_install_queuemember_functions(cb_pause_queue_member, cb_unpause_queue_member);
 	if (!res) {	
 		reload_queues();
 		if (queue_persistent_members)



More information about the asterisk-commits mailing list