--- app_voicemail.c.org 2008-04-27 14:35:58.000000000 -0700 +++ app_voicemail.c 2008-04-27 14:54:29.000000000 -0700 @@ -7023,6 +7023,8 @@ AST_APP_ARG(argv1); ); + int gain; + u = ast_module_user_add(chan); memset(&leave_options, 0, sizeof(leave_options)); @@ -7040,7 +7042,7 @@ } ast_copy_flags(&leave_options, &flags, OPT_SILENT | OPT_BUSY_GREETING | OPT_UNAVAIL_GREETING | OPT_PRIORITY_JUMP); if (ast_test_flag(&flags, OPT_RECORDGAIN)) { - int gain; + /* int gain; */ if (sscanf(opts[OPT_ARG_RECORDGAIN], "%d", &gain) != 1) { ast_log(LOG_WARNING, "Invalid value '%s' provided for record gain option\n", opts[OPT_ARG_RECORDGAIN]); @@ -7091,6 +7093,10 @@ args.argv0 = ast_strdupa(tmp); } + if (option_debug > 2) { + ast_log(LOG_DEBUG, "VM-Recording Gain is: %d \n", gain); + } + res = leave_voicemail(chan, args.argv0, &leave_options); if (res == ERROR_LOCK_PATH) {