[Freeswitch-svn] [commit] r9098 - freeswitch/trunk/src/mod/applications/mod_voicemail

Freeswitch SVN anthm at freeswitch.org
Fri Jul 18 17:16:52 EDT 2008


Author: anthm
Date: Fri Jul 18 17:16:52 2008
New Revision: 9098

Modified:
   freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c

Log:
per call vm recording ext with vm_message_ext variable

Modified: freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_voicemail/mod_voicemail.c	Fri Jul 18 17:16:52 2008
@@ -2211,8 +2211,8 @@
 	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 @@
 	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);



More information about the Freeswitch-svn mailing list