Add Masquerade manager event which trips when a masquerade happens (issue #7840 repor...
[asterisk/asterisk.git] / funcs / func_callerid.c
index 7c2591a..6068739 100644 (file)
@@ -59,7 +59,7 @@ static int callerid_read(struct ast_channel *chan, char *cmd, char *data,
 
                        ast_copy_string(buf, num, len);
                } else {
-                       ast_log(LOG_ERROR, "Unknown callerid data type.\n");
+                       ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
                }
        } else {
                if (!strncasecmp("all", data, 3)) {
@@ -88,7 +88,7 @@ static int callerid_read(struct ast_channel *chan, char *cmd, char *data,
                                ast_copy_string(buf, chan->cid.cid_rdnis, len);
                        }
                } else {
-                       ast_log(LOG_ERROR, "Unknown callerid data type.\n");
+                       ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
                }
        }
 
@@ -125,7 +125,7 @@ static int callerid_write(struct ast_channel *chan, char *cmd, char *data,
                        free(chan->cid.cid_rdnis);
                chan->cid.cid_rdnis = ast_strdup(value);
        } else {
-               ast_log(LOG_ERROR, "Unknown callerid data type.\n");
+               ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
        }
 
        return 0;
@@ -143,26 +143,14 @@ static struct ast_custom_function callerid_function = {
        .write = callerid_write,
 };
 
-static char *tdesc = "Caller ID related dialplan function";
-
-static int unload_module(void *mod)
+static int unload_module(void)
 {
        return ast_custom_function_unregister(&callerid_function);
 }
 
-static int load_module(void *mod)
+static int load_module(void)
 {
        return ast_custom_function_register(&callerid_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, "Caller ID related dialplan function");