mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
add switch_separate_file_params function so when using relative paths with bracketed params the full path can be constructed with the params in tact
This commit is contained in:
@@ -5443,10 +5443,20 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
|
||||
|
||||
if (!switch_is_file_path(file)) {
|
||||
if (!say && conference->sound_prefix) {
|
||||
if (!(dfile = switch_mprintf("%s%s%s", conference->sound_prefix, SWITCH_PATH_SEPARATOR, file))) {
|
||||
goto done;
|
||||
char *params_portion = NULL;
|
||||
char *file_portion = NULL;
|
||||
switch_separate_file_params(file, &file_portion, ¶ms_portion);
|
||||
|
||||
if (params_portion) {
|
||||
dfile = switch_mprintf("%s%s%s%s", params_portion, conference->sound_prefix, SWITCH_PATH_SEPARATOR, file_portion);
|
||||
} else {
|
||||
dfile = switch_mprintf("%s%s%s", conference->sound_prefix, SWITCH_PATH_SEPARATOR, file_portion);
|
||||
}
|
||||
|
||||
file = dfile;
|
||||
switch_safe_free(file_portion);
|
||||
switch_safe_free(params_portion);
|
||||
|
||||
} else if (!async) {
|
||||
status = conference_say(conference, file, leadin);
|
||||
goto done;
|
||||
|
||||
Reference in New Issue
Block a user