]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
BOUNTY-23
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 24 Sep 2010 21:01:05 +0000 (16:01 -0500)
committerBrian West <brian@freeswitch.org>
Fri, 24 Sep 2010 21:01:05 +0000 (16:01 -0500)
src/mod/applications/mod_voicemail/mod_voicemail.c
src/switch_ivr.c

index 0b1d698b862251c17875163bcb675a8d9d8aae5e..860f89788bd164e0cc43d75f1e14d759d0a0fd82 100644 (file)
@@ -1422,6 +1422,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
        char cid_buf[1024] = "";
 
        if (switch_channel_ready(channel)) {
+               const char *vm_announce_cid = NULL;
 
                switch_snprintf(cid_buf, sizeof(cid_buf), "%s|%s", cbt->cid_number, cbt->cid_name);
 
@@ -1429,7 +1430,13 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
                msg.string_arg = cid_buf;
                msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
                switch_core_session_receive_message(session, &msg);
-
+               
+               if (!zstr(cbt->cid_number) && (vm_announce_cid = switch_channel_get_variable(channel, "vm_announce_cid"))) {
+                       switch_ivr_play_file(session, NULL, vm_announce_cid, NULL);
+                       switch_ivr_sleep(session, 500, SWITCH_TRUE, NULL);
+                       switch_ivr_say(session, cbt->cid_number, NULL, "name_spelled", "pronounced", NULL, NULL);
+               }
+               
                args.input_callback = cancel_on_dtmf;
                
                switch_snprintf(key_buf, sizeof(key_buf), "%s:%s:%s:%s:%s:%s%s%s", profile->listen_file_key, profile->save_file_key,
index 246b18ea4c7e10ffb0968fc0f57c8ab8b4ed7c1e..7e7e8cda2009c2d9a54430fd1e75a024ea10ed5d 100644 (file)
@@ -2261,6 +2261,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_say(switch_core_session_t *session,
                goto done;
        }
 
+       if (!module_name) {
+               module_name = chan_lang;
+       }
+
        if (!(sound_path = (char *) switch_xml_attr(language, "sound-path"))) {
                sound_path = (char *) switch_xml_attr(language, "sound_path");
        }