]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODAPP-394
authorMathieu Rene <mrene@avgs.ca>
Fri, 5 Feb 2010 08:27:20 +0000 (08:27 +0000)
committerMathieu Rene <mrene@avgs.ca>
Fri, 5 Feb 2010 08:27:20 +0000 (08:27 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16576 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index ec302b26a279e9fd23434bbfb3add28eff791aa2..220da5aa8ed07ff127e80bc0fa8d1270d18c4f0b 100644 (file)
@@ -2892,6 +2892,8 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
                                                disk_quota = atoi(val);
                                        } else if (!strcasecmp(var, "vm-alternate-greet-id")) {
                                                read_id = switch_core_session_strdup(session, val);
+                                       } else if (!strcasecmp(var, "vm-message-ext")) {
+                                               vm_ext = switch_core_session_strdup(session, val);
                                        }
                                }
                        }
@@ -2952,7 +2954,9 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
        switch_snprintf(sql, sizeof(sql), "select * from voicemail_prefs where username='%s' and domain='%s'", id, domain_name);
        vm_execute_sql_callback(profile, profile->mutex, sql, prefs_callback, &cbt);
 
-       vm_ext = profile->file_ext;
+       if (!vm_ext) {
+               vm_ext = profile->file_ext;
+       }
        if ((vtmp = switch_channel_get_variable(channel, "vm_message_ext"))) {
                vm_ext = vtmp;
        }