From: Damien Wedhorn Date: Wed, 6 Feb 2013 06:55:02 +0000 (+0000) Subject: Reset skinny vmexten and immeddial char on reload. X-Git-Tag: 13.0.0-beta1~2120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44872e797c1208876ba527136c144a3ce686a1b9;p=thirdparty%2Fasterisk.git Reset skinny vmexten and immeddial char on reload. Make skinny reset vmexten and immeddial to '\0' on reload to ensure that it is set to '\0' if the appropriate item is removed/commented in skinny.conf. Also small fix re immeddial char in skinny.conf and add immedial setting to skinny show settings. (closes issue ASTERISK-21037) Reported by: snuffy Tested by: snuffy, myself Patches: immed_dial_fix.diff uploaded by snuffy (license 5024) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380925 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 6b7486e35a..5e18859e94 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -202,7 +202,7 @@ static int keep_alive = 120; static int auth_timeout = DEFAULT_AUTH_TIMEOUT; static int auth_limit = DEFAULT_AUTH_LIMIT; static int unauth_sessions = 0; -static char immed_dialchar = '\0'; +static char immed_dialchar; static char vmexten[AST_MAX_EXTENSION]; /* Voicemail pilot number */ static char used_context[AST_MAX_EXTENSION]; /* placeholder to check if context are already used in regcontext */ static char regcontext[AST_MAX_CONTEXT]; /* Context for auto-extension */ @@ -4361,6 +4361,8 @@ static char *handle_skinny_show_line(struct ast_cli_entry *e, int cmd, struct as /*! \brief List global settings for the Skinny subsystem. */ static char *handle_skinny_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { + char immed_str[2] = {immed_dialchar, '\0'}; + switch (cmd) { case CLI_INIT: e->command = "skinny show settings"; @@ -4382,6 +4384,7 @@ static char *handle_skinny_show_settings(struct ast_cli_entry *e, int cmd, struc ast_cli(a->fd, " Date Format: %s\n", date_format); ast_cli(a->fd, " Voice Mail Extension: %s\n", S_OR(vmexten, "(not set)")); ast_cli(a->fd, " Reg. context: %s\n", S_OR(regcontext, "(not set)")); + ast_cli(a->fd, " Immed. Dial Key: %s\n", S_OR(immed_str, "(not set)")); ast_cli(a->fd, " Jitterbuffer enabled: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_ENABLED))); if (ast_test_flag(&global_jbconf, AST_JB_ENABLED)) { ast_cli(a->fd, " Jitterbuffer forced: %s\n", AST_CLI_YESNO(ast_test_flag(&global_jbconf, AST_JB_FORCED))); @@ -7999,8 +8002,12 @@ static int config_load(void) ast_log(LOG_NOTICE, "Unable to load config %s, Skinny disabled.\n", config); return -1; } + memset(&bindaddr, 0, sizeof(bindaddr)); memset(&default_prefs, 0, sizeof(default_prefs)); + immed_dialchar = '\0'; + memset(&vmexten, '\0', sizeof(vmexten)); + /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); diff --git a/configs/skinny.conf.sample b/configs/skinny.conf.sample index ba8b2d6495..783f65da68 100644 --- a/configs/skinny.conf.sample +++ b/configs/skinny.conf.sample @@ -44,7 +44,7 @@ keepalive=120 ; be available to immediately dial when a pattern than can be dialed has been entered. ; Default is unset, that is no immediated dial key (softbutton still exists). ; -;immeddialkey='#' +;immeddialkey=# ; See https://wiki.asterisk.org/wiki/display/AST/IP+Quality+of+Service for a description of these parameters. ;tos=cs3 ; Sets TOS for signaling packets.