Add Masquerade manager event which trips when a masquerade happens (issue #7840 repor...
[asterisk/asterisk.git] / funcs / func_channel.c
index dd51bb0..2a377b5 100644 (file)
  * 
  */
 
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/module.h"
 #include "asterisk/channel.h"
 #include "asterisk/pbx.h"
@@ -38,6 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/app.h"
 #include "asterisk/indications.h"
 #include "asterisk/stringfields.h"
+
 #define locked_copy_string(chan, dest, source, len) \
        do { \
                ast_channel_lock(chan); \
@@ -169,26 +171,14 @@ static struct ast_custom_function channel_function = {
        .write = func_channel_write,
 };
 
-static char *tdesc = "Channel information dialplan function";
-
-static int unload_module(void *mod)
+static int unload_module(void)
 {
        return ast_custom_function_unregister(&channel_function);
 }
 
-static int load_module(void *mod)
+static int load_module(void)
 {
        return ast_custom_function_register(&channel_function);
 }
 
-static const char *description(void)
-{
-       return tdesc;
-}
-
-static const char *key(void)
-{
-       return ASTERISK_GPL_KEY;
-}
-
-STD_MOD(MOD_1 | NO_USECOUNT, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Channel information dialplan function");