/* * Asterisk -- An open source telephony toolkit. * * Copyright (C) 2015, Digium, Inc. * * Tyler Cambron * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact * any of the maintainers of this project for assistance; * the project provides a web site, mailing lists and IRC * channels for your use. * * This program is free software, distributed under the terms of * the GNU General Public License Version 2. See the LICENSE file * at the top of the source tree. */ /*** MODULEINFO res_statsd no extended ***/ #include "asterisk.h" ASTERISK_REGISTER_FILE() #include "asterisk/module.h" #include "asterisk/logger.h" /*** DOCUMENTATION Allow statistics to be passed to the StatsD server from the dialplan. The metric type to be sent to StatsD. The name of the variable to be sent to StatsD. The value of the variable to be sent to StatsD. This dialplan application sends statistics to the StatsD server specified inside of statsd.conf. ***/ static const char app[] = "Statsd"; static int statsd_exec(struct ast_channel *chan, const char *data) { ast_log(LOG_NOTICE, "StatsD application callback is working!\n"); return 0; } static int unload_module(void) { return ast_unregister_application(app); } static int load_module(void) { return ast_register_application_xml(app, statsd_exec); } AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Statsd Dialplan Application");