|
@@ -260,6 +260,7 @@ static pv_export_t pvars[] = {
|
|
|
{{0, 0}, 0, 0, 0, 0, 0, 0, 0}
|
|
|
};
|
|
|
|
|
|
+#ifdef STATISTICS
|
|
|
static stat_export_t statistics[] = {
|
|
|
{"keepalive_endpoints", STAT_NO_RESET, &keepalive_endpoints},
|
|
|
{"registered_endpoints", STAT_NO_RESET, ®istered_endpoints},
|
|
@@ -267,6 +268,7 @@ static stat_export_t statistics[] = {
|
|
|
{"dialog_endpoints", STAT_NO_RESET, &dialog_endpoints},
|
|
|
{0, 0, 0}
|
|
|
};
|
|
|
+#endif
|
|
|
|
|
|
struct module_exports exports = {
|
|
|
"nat_traversal", // module name
|
|
@@ -1785,11 +1787,13 @@ mod_init(void)
|
|
|
keepalive_params.callid_counter = rand();
|
|
|
keepalive_params.from_tag = rand();
|
|
|
|
|
|
+#ifdef STATISTICS
|
|
|
// we need the statistics initialized before restoring the keepalive state
|
|
|
if (register_module_stats(exports.name, statistics) < 0) {
|
|
|
LM_ERR("failed to initialize module statistics\n");
|
|
|
return -1;
|
|
|
}
|
|
|
+#endif /*STATISTICS*/
|
|
|
|
|
|
// create hash table to hold NAT contacts
|
|
|
nat_table = HashTable_new();
|