diff -Naur asterisk-1.6.2.16-rc1-orig/apps/app_dial.c asterisk-1.6.2.16-rc1/apps/app_dial.c --- asterisk-1.6.2.16-rc1-orig/apps/app_dial.c 2010-11-24 12:03:16.000000000 -0500 +++ asterisk-1.6.2.16-rc1/apps/app_dial.c 2010-12-21 00:13:06.000000000 -0500 @@ -1456,7 +1456,7 @@ call is actually dialed */ /* make sure the priv-callerintros dir actually exists */ - snprintf(pa->privintro, sizeof(pa->privintro), "%s/sounds/priv-callerintros", ast_config_AST_DATA_DIR); + snprintf(pa->privintro, sizeof(pa->privintro), "%s/priv-callerintros", ast_config_AST_SOUND_DIR); if ((res = ast_mkdir(pa->privintro, 0755))) { ast_log(LOG_WARNING, "privacy: can't create directory priv-callerintros: %s\n", strerror(res)); return -1; diff -Naur asterisk-1.6.2.16-rc1-orig/build_tools/make_defaults_h asterisk-1.6.2.16-rc1/build_tools/make_defaults_h --- asterisk-1.6.2.16-rc1-orig/build_tools/make_defaults_h 2008-01-24 17:58:10.000000000 -0500 +++ asterisk-1.6.2.16-rc1/build_tools/make_defaults_h 2010-12-21 00:13:06.000000000 -0500 @@ -21,6 +21,7 @@ #define DEFAULT_DATA_DIR "${INSTALL_PATH}${ASTDATADIR}" #define DEFAULT_KEY_DIR "${INSTALL_PATH}${ASTDATADIR}/keys" +#define DEFAULT_SOUND_DIR "${INSTALL_PATH}${ASTDATADIR}/sounds" #define DEFAULT_SPOOL_DIR "${INSTALL_PATH}${ASTSPOOLDIR}" #define DEFAULT_TMP_DIR "${INSTALL_PATH}${ASTSPOOLDIR}/tmp" diff -Naur asterisk-1.6.2.16-rc1-orig/include/asterisk/paths.h asterisk-1.6.2.16-rc1/include/asterisk/paths.h --- asterisk-1.6.2.16-rc1-orig/include/asterisk/paths.h 2007-12-20 04:55:05.000000000 -0500 +++ asterisk-1.6.2.16-rc1/include/asterisk/paths.h 2010-12-21 00:13:06.000000000 -0500 @@ -35,5 +35,6 @@ extern const char *ast_config_AST_RUN_GROUP; extern const char *ast_config_AST_RUN_USER; extern const char *ast_config_AST_SYSTEM_NAME; +extern const char *ast_config_AST_SOUND_DIR; #endif /* _ASTERISK_PATHS_H */ diff -Naur asterisk-1.6.2.16-rc1-orig/main/app.c asterisk-1.6.2.16-rc1/main/app.c --- asterisk-1.6.2.16-rc1-orig/main/app.c 2010-05-17 14:44:53.000000000 -0400 +++ asterisk-1.6.2.16-rc1/main/app.c 2010-12-21 00:13:06.000000000 -0500 @@ -481,7 +481,7 @@ if (filename[0] == '/') { ast_copy_string(tmpf, filename, sizeof(tmpf)); } else { - snprintf(tmpf, sizeof(tmpf), "%s/%s/%s", ast_config_AST_DATA_DIR, "sounds", filename); + snprintf(tmpf, sizeof(tmpf), "%s/%s", ast_config_AST_SOUND_DIR, filename); } if ((fd = open(tmpf, O_RDONLY)) < 0) { ast_log(LOG_WARNING, "Unable to open file '%s': %s\n", tmpf, strerror(errno)); diff -Naur asterisk-1.6.2.16-rc1-orig/main/asterisk.c asterisk-1.6.2.16-rc1/main/asterisk.c --- asterisk-1.6.2.16-rc1-orig/main/asterisk.c 2010-11-29 02:27:09.000000000 -0500 +++ asterisk-1.6.2.16-rc1/main/asterisk.c 2010-12-21 00:13:06.000000000 -0500 @@ -233,6 +233,7 @@ char agi_dir[PATH_MAX]; char run_dir[PATH_MAX]; char key_dir[PATH_MAX]; + char sound_dir[PATH_MAX]; char config_file[PATH_MAX]; char db_path[PATH_MAX]; @@ -256,6 +257,7 @@ const char *ast_config_AST_AGI_DIR = cfg_paths.agi_dir; const char *ast_config_AST_KEY_DIR = cfg_paths.key_dir; const char *ast_config_AST_RUN_DIR = cfg_paths.run_dir; +const char *ast_config_AST_SOUND_DIR = cfg_paths.sound_dir; const char *ast_config_AST_DB = cfg_paths.db_path; const char *ast_config_AST_PID = cfg_paths.pid_path; @@ -2860,6 +2862,7 @@ ast_copy_string(cfg_paths.pid_path, DEFAULT_PID, sizeof(cfg_paths.pid_path)); ast_copy_string(cfg_paths.socket_path, DEFAULT_SOCKET, sizeof(cfg_paths.socket_path)); ast_copy_string(cfg_paths.run_dir, DEFAULT_RUN_DIR, sizeof(cfg_paths.run_dir)); + ast_copy_string(cfg_paths.sound_dir, DEFAULT_SOUND_DIR, sizeof(cfg_paths.sound_dir)); ast_set_default_eid(&ast_eid_default); @@ -2909,6 +2912,8 @@ ast_copy_string(cfg_paths.run_dir, v->value, sizeof(cfg_paths.run_dir)); } else if (!strcasecmp(v->name, "astmoddir")) { ast_copy_string(cfg_paths.module_dir, v->value, sizeof(cfg_paths.module_dir)); + } else if (!strcasecmp(v->name, "astsounddir")) { + ast_copy_string(cfg_paths.sound_dir, v->value, sizeof(cfg_paths.sound_dir)); } } diff -Naur asterisk-1.6.2.16-rc1-orig/main/file.c asterisk-1.6.2.16-rc1/main/file.c --- asterisk-1.6.2.16-rc1-orig/main/file.c 2010-10-06 09:48:27.000000000 -0400 +++ asterisk-1.6.2.16-rc1/main/file.c 2010-12-21 00:13:06.000000000 -0500 @@ -245,7 +245,7 @@ /*! * \brief construct a filename. Absolute pathnames are preserved, - * relative names are prefixed by the sounds/ directory. + * relative names are prefixed by the ast_config_AST_SOUND_DIR directory. * The wav49 suffix is replaced by 'WAV'. * Returns a malloc'ed string to be freed by the caller. */ @@ -262,8 +262,8 @@ fn = NULL; } } else { - if (asprintf(&fn, "%s/sounds/%s.%s", - ast_config_AST_DATA_DIR, filename, ext) < 0) { + if (asprintf(&fn, "%s/%s.%s", + ast_config_AST_SOUND_DIR, filename, ext) < 0) { ast_log(LOG_WARNING, "asprintf() failed: %s\n", strerror(errno)); fn = NULL; } diff -Naur asterisk-1.6.2.16-rc1-orig/Makefile asterisk-1.6.2.16-rc1/Makefile --- asterisk-1.6.2.16-rc1-orig/Makefile 2010-12-07 17:40:45.000000000 -0500 +++ asterisk-1.6.2.16-rc1/Makefile 2010-12-21 00:16:31.000000000 -0500 @@ -59,6 +59,7 @@ export ASTSBINDIR export AGI_DIR export ASTCONFPATH +export ASTSOUNDDIR export OSARCH # Operating system export PROC # Processor type @@ -166,6 +167,7 @@ ASTCONFPATH=$(ASTETCDIR)/asterisk.conf MODULES_DIR=$(ASTLIBDIR)/modules AGI_DIR=$(ASTDATADIR)/agi-bin +ASTSOUNDDIR=$(ASTDATADIR)/sounds # If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file HTTP_DOCSDIR=/var/www/html @@ -698,6 +700,7 @@ echo "astspooldir => $(ASTSPOOLDIR)" ; \ echo "astrundir => $(ASTVARRUNDIR)" ; \ echo "astlogdir => $(ASTLOGDIR)" ; \ + echo "astsounddir => $(ASTSOUNDDIR)" ; \ echo "" ; \ echo "[options]" ; \ echo ";verbose = 3" ; \