]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add new 'change password fail' macro. Same as vm-fail-auth right now until new sound...
authorMichael S Collins <msc@freeswitch.org>
Fri, 27 Jan 2012 23:05:14 +0000 (15:05 -0800)
committerMichael S Collins <msc@freeswitch.org>
Fri, 27 Jan 2012 23:05:14 +0000 (15:05 -0800)
conf/lang/en/vm/sounds.xml
src/mod/applications/mod_voicemail/mod_voicemail.c

index afff3ebb3fb16b5bf8f1db26ff22b7b9377f99c4..976fcde32d7f2a679daace4aaf3568f4f240ac34 100644 (file)
     </input>
   </macro>
 
+  <macro name="voicemail_change_pass_fail">
+    <input pattern="(.*)">
+      <match>
+       <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
+      </match>
+    </input>
+  </macro>
+
   <macro name="voicemail_hello">
     <input pattern="(.*)">
       <match>
index 2ae21ad6a0ae534b74ddf61b0e392c680431a05a..f456ceecc3a74e4a3041ad42824f86c6720998eb 100644 (file)
@@ -990,6 +990,7 @@ typedef enum {
 #define VM_ENTER_PASS_MACRO "voicemail_enter_pass"
 #define VM_FAIL_AUTH_MACRO "voicemail_fail_auth"
 #define VM_CHANGE_PASS_SUCCESS_MACRO "voicemail_change_pass_success"
+#define VM_CHANGE_PASS_FAIL_MACRO "voicemail_change_pass_fail"
 #define VM_ABORT_MACRO "voicemail_abort"
 #define VM_HELLO_MACRO "voicemail_hello"
 #define VM_GOODBYE_MACRO "voicemail_goodbye"
@@ -2195,6 +2196,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
                                                }
                                                
                                                if (fail) {
+                                                       /* add feedback for user - let him/her know that the password they tried to change to is not allowed */
+                                                       /* change the following macro to VM_CHANGE_PASS_FAIL_MACRO when new prompts have been recorded */
                                                        switch_ivr_phrase_macro(session, VM_FAIL_AUTH_MACRO, NULL, NULL, NULL);
                                                } else {
                                                        sql = switch_mprintf("update voicemail_prefs set password='%s' where username='%s' and domain='%s'", buf, myid, domain_name);