From 3a2e1d0337e24a4fb5d4c7518a96fd525d5b4c55 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 30 Mar 2011 10:55:40 -0500 Subject: [PATCH] FS-3176 --comment-only try this patch, native is a special case so use the extension native e.g. en.native --- src/switch_loadable_module.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/switch_loadable_module.c b/src/switch_loadable_module.c index 9804e53238..0c803a71b4 100644 --- a/src/switch_loadable_module.c +++ b/src/switch_loadable_module.c @@ -1995,14 +1995,23 @@ SWITCH_DECLARE(void) switch_say_file(switch_say_file_handle_t *sh, const char *f char buf[256] = ""; int ret; va_list ap; + int native = !strcasecmp(sh->ext, "native"); va_start(ap, fmt); if ((ret = switch_vsnprintf(buf, sizeof(buf), fmt, ap)) > 0) { 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 { - 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); + } } }