]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
per call vm recording ext with vm_message_ext variable
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 18 Jul 2008 21:16:52 +0000 (21:16 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 18 Jul 2008 21:16:52 +0000 (21:16 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9098 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index 1d03f08f827e372e293adb7cd86c815e9eef224f..06349f4373c967a0b55a5430f21c8f5da0cafee6 100644 (file)
@@ -2211,8 +2211,8 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
        const char *caller_id_number = NULL;
        switch_xml_t x_domain = NULL, x_domain_root = NULL, x_user = NULL, x_params = NULL, x_param = NULL;
        switch_event_t *vars = NULL;
-       const char *vm_cc = NULL;
-
+       const char *vm_cc = NULL, *vtmp, *vm_ext = NULL;
+       
        if (!(caller_id_name = switch_channel_get_variable(channel, "effective_caller_id_name"))) {
                caller_id_name = caller_profile->caller_id_name;
        }
@@ -2315,7 +2315,12 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, cons
        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);
 
-       file_path = switch_mprintf("%s%smsg_%s.%s", dir_path, SWITCH_PATH_SEPARATOR, uuid, profile->file_ext);
+       vm_ext = profile->file_ext;
+       if ((vtmp = switch_channel_get_variable(channel, "vm_message_ext"))) {
+               vm_ext = vtmp;
+       }
+
+       file_path = switch_mprintf("%s%smsg_%s.%s", dir_path, SWITCH_PATH_SEPARATOR, uuid, vm_ext);
 
        if ((voicemail_greeting_number = switch_channel_get_variable(channel, "voicemail_greeting_number"))) {
                int num = atoi(voicemail_greeting_number);