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.

(cherry picked from commit 0e0f99db1d)
This commit is contained in:
George Joseph
2023-09-11 08:27:41 -06:00
committed by Asterisk Development Team
parent 69338381ea
commit dadbaed6f5
6 changed files with 49 additions and 16 deletions

View File

@@ -126,6 +126,10 @@ documentation_language = en_US ; Set the language you want documentation
; housekeeping AMI and ARI channel events. This can
; reduce the load on the manager and ARI applications
; when the Digium Phone Module for Asterisk is in use.
;sounds_search_custom_dir = no; This option, if enabled, will
; cause Asterisk to search for sounds files in
; AST_DATA_DIR/sounds/custom before searching the
; normal directories like AST_DATA_DIR/sounds/<lang>.
; Changing the following lines may compromise your security.
;[files]