file.c: Add ability to search custom dir for sounds

To better co-exist with sounds files that may be managed by
packages, custom sound files may now be placed in
AST_DATA_DIR/sounds/custom instead of the standard
AST_DATA_DIR/sounds/<lang> directory.  If the new
"sounds_search_custom_dir" option in asterisk.conf is set
to "true", asterisk will search the custom directory for sounds
files before searching the standard directory.  For performance
reasons, the "sounds_search_custom_dir" defaults to "false".

Resolves: #315

UserNote: A new option "sounds_search_custom_dir" has been added to
asterisk.conf that allows asterisk to search
AST_DATA_DIR/sounds/custom for sounds files before searching the
standard AST_DATA_DIR/sounds/<lang> directory.
This commit is contained in:
George Joseph
2023-09-11 08:27:41 -06:00
parent f93138bcad
commit 0e0f99db1d
6 changed files with 49 additions and 16 deletions

View File

@@ -6745,6 +6745,7 @@ static int action_coresettings(struct mansession *s, const struct message *m)
"CoreRealTimeEnabled: %s\r\n"
"CoreCDRenabled: %s\r\n"
"CoreHTTPenabled: %s\r\n"
"SoundsSearchCustomDir: %s\r\n"
"\r\n",
idText,
AMI_VERSION,
@@ -6757,7 +6758,8 @@ static int action_coresettings(struct mansession *s, const struct message *m)
ast_option_maxfiles,
AST_CLI_YESNO(ast_realtime_enabled()),
AST_CLI_YESNO(ast_cdr_is_enabled()),
AST_CLI_YESNO(ast_webmanager_check_enabled())
AST_CLI_YESNO(ast_webmanager_check_enabled()),
AST_CLI_YESNO(ast_opt_sounds_search_custom)
);
return 0;
}