mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 11:29:56 +00:00
FS-3176 --comment-only try this patch, native is a special case so use the extension native e.g. en.native
This commit is contained in:
parent
6e78f6f57e
commit
3a2e1d0337
@ -1995,14 +1995,23 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f
|
|||||||
char buf[256] = "";
|
char buf[256] = "";
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
int native = !strcasecmp(sh->ext, "native");
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
|
||||||
if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
|
if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) {
|
||||||
if (!sh->cnt++) {
|
if (!sh->cnt++) {
|
||||||
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
|
if (native) {
|
||||||
|
sh->stream.write_function(&sh->stream, "file_string://%s", buf);
|
||||||
|
} else {
|
||||||
|
sh->stream.write_function(&sh->stream, "file_string://%s.%s", buf, sh->ext);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
|
if (native) {
|
||||||
|
sh->stream.write_function(&sh->stream, "!%s", buf);
|
||||||
|
} else {
|
||||||
|
sh->stream.write_function(&sh->stream, "!%s.%s", buf, sh->ext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user