CDEBUG(call, ast, "Got 'sending complete', but extension '%s' will not match at context '%s' - releasing.\n", ast->exten, ast->context);
cause = 1;
goto release;
+ }
if (!ast_exists_extension(ast, ast->context, ast->exten, 1, call->oad))
{
CDEBUG(call, ast, "Got 'sending complete', but extension '%s' would match at context '%s', if more digits would be dialed - releasing.\n", ast->exten, ast->context);
*/
static void lcr_in_information(struct chan_call *call, int message_type, union parameter *param)
{
+ struct ast_channel *ast = call->ast;
struct ast_frame fr;
char *p;
CDEBUG(call, call->ast, "Incomming information from LCR. (dialing=%d)\n", param->information.id);
- if (!call->ast) return;
+ if (!ast) return;
/* pbx not started */
if (!call->pbx_started)
struct ast_frame *f;
int bridge_id;
- CDEBUG(NULL, ast, "Received briding request from Asterisk.\n");
+ CDEBUG(NULL, NULL, "Received briding request from Asterisk.\n");
/* join via dsp (if the channels are currently open) */
ast_mutex_lock(&chan_lock);
who = ast_waitfor_n(carr, 2, &to);
if (!who) {
- CDEBUG(NULL, ast, "Empty read on bridge, breaking out.\n");
+ CDEBUG(NULL, NULL, "Empty read on bridge, breaking out.\n");
break;
}
f = ast_read(who);
}
- CDEBUG(NULL, ast, "Releasing bride.\n");
+ CDEBUG(NULL, NULL, "Releasing bride.\n");
/* split channels */
ast_mutex_lock(&chan_lock);
return AST_BRIDGE_COMPLETE;
}
-struct ast_channel_tech lcr_tech = {
+static struct ast_channel_tech lcr_tech = {
.type="LCR",
.description="Channel driver for connecting to Linux-Call-Router",
#ifdef TODO
return 0;
}
-struct ast_cli_entry cli_show_lcr =
+static struct ast_cli_entry cli_show_lcr =
{ {"lcr", "show", "lcr", NULL},
lcr_show_lcr,
"Shows current states of LCR core",
"Usage: lcr show lcr\n",
};
-struct ast_cli_entry cli_show_calls =
+static struct ast_cli_entry cli_show_calls =
{ {"lcr", "show", "calls", NULL},
lcr_show_calls,
"Shows current calls made by LCR and Asterisk",
"Usage: lcr show calls\n",
};
-struct ast_cli_entry cli_reload_routing =
+static struct ast_cli_entry cli_reload_routing =
{ {"lcr", "reload", "routing", NULL},
lcr_reload_routing,
"Reloads routing conf of LCR, current uncomplete calls will be disconnected",
"Usage: lcr reload routing\n",
};
-struct ast_cli_entry cli_reload_interfaces =
+static struct ast_cli_entry cli_reload_interfaces =
{ {"lcr", "reload", "interfaces", NULL},
lcr_reload_interfaces,
"Reloads interfaces conf of LCR",
"Usage: lcr reload interfaces\n",
};
-struct ast_cli_entry cli_port_block =
+static struct ast_cli_entry cli_port_block =
{ {"lcr", "port", "block", NULL},
lcr_port_block,
"Blocks LCR port for further calls",
"Usage: lcr port block \"<port>\"\n",
};
-struct ast_cli_entry cli_port_unblock =
+static struct ast_cli_entry cli_port_unblock =
{ {"lcr", "port", "unblock", NULL},
lcr_port_unblock,
"Unblocks or loads LCR port, port is opened my mISDN",
"Usage: lcr port unblock \"<port>\"\n",
};
-struct ast_cli_entry cli_port_unload =
+static struct ast_cli_entry cli_port_unload =
{ {"lcr", "port", "unload", NULL},
lcr_port_unload,
"Unloads LCR port, port is closes by mISDN",
/*
* module loading and destruction
*/
-static int load_module(void)
+int load_module(void)
{
int i;
return 0;
}
-static int unload_module(void)
+int unload_module(void)
{
/* First, take us out of the channel loop */
CDEBUG(NULL, NULL, "-- Unregistering mISDN Channel Driver --\n");
return ASTERISK_GPL_KEY;
}
-#define AST_MODULE "chan_lcr"
-AST_MODULE_INFO( ASTERISK_GPL_KEY,
- AST_MODFLAG_DEFAULT,
- "Channel driver for LCR",
- load_module,
- unload_module,
- reload_module
- );