]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3215
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 1 Apr 2011 15:35:20 +0000 (10:35 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 1 Apr 2011 15:35:20 +0000 (10:35 -0500)
src/mod/applications/mod_dptools/mod_dptools.c

index 42c1203380a937d2e07f8d8b8d82782c539e63df..f2da2c5d7d0cc4c79e89cfe4a054d9d71d693779 100755 (executable)
@@ -2078,7 +2078,7 @@ SWITCH_STANDARD_APP(play_and_get_digits_function)
                                                           prompt_audio_file, bad_input_audio_file, var_name, digit_buffer, sizeof(digit_buffer), digits_regex, digit_timeout);
 }
 
-#define SAY_SYNTAX "<module_name>:<lang> <say_type> <say_method> [<say_gender>] <text>"
+#define SAY_SYNTAX "<module_name>[:<lang>] <say_type> <say_method> [<say_gender>] <text>"
 SWITCH_STANDARD_APP(say_function)
 {
        char *argv[5] = { 0 };
@@ -2094,6 +2094,11 @@ SWITCH_STANDARD_APP(say_function)
 
                switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "");
 
+               /* Set default langauge according to the <module_name> */
+               if (!strchr(argv[0], ':')) {
+                       argv[0] = switch_core_session_sprintf(session, "%s:%s", argv[0], argv[0]);
+               }
+
                switch_ivr_say(session, (argc == 4) ? argv[3] : argv[4], argv[0], argv[1], argv[2], (argc == 5) ? argv[3] : NULL ,&args);
        } else {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Usage: %s\n", SAY_SYNTAX);