[svn-commits] wedhorn: trunk r380925 - in /trunk: channels/ configs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 6 00:55:04 CST 2013


Author: wedhorn
Date: Wed Feb  6 00:55:02 2013
New Revision: 380925

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380925
Log:
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)

Modified:
    trunk/channels/chan_skinny.c
    trunk/configs/skinny.conf.sample

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=380925&r1=380924&r2=380925
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Wed Feb  6 00:55:02 2013
@@ -202,7 +202,7 @@
 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 @@
 /*! \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 @@
 	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 @@
 		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));

Modified: trunk/configs/skinny.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/skinny.conf.sample?view=diff&rev=380925&r1=380924&r2=380925
==============================================================================
--- trunk/configs/skinny.conf.sample (original)
+++ trunk/configs/skinny.conf.sample Wed Feb  6 00:55:02 2013
@@ -44,7 +44,7 @@
 ; 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.




More information about the svn-commits mailing list