[asterisk-commits] tilghman: trunk r148070 - in /trunk: apps/ channels/ main/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 9 16:37:24 CDT 2008


Author: tilghman
Date: Thu Oct  9 16:37:23 2008
New Revision: 148070

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148070
Log:
Fudges for wav16, just like wav49

Modified:
    trunk/apps/app_minivm.c
    trunk/apps/app_voicemail.c
    trunk/channels/chan_agent.c
    trunk/main/file.c
    trunk/res/res_monitor.c

Modified: trunk/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=148070&r1=148069&r2=148070
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Thu Oct  9 16:37:23 2008
@@ -917,8 +917,11 @@
 
 	ast_debug(3, "-_-_- Sending mail to %s@%s - Using template %s\n", vmu->username, vmu->domain, template->name);
 
-	if (!strcmp(format, "wav49"))
+	if (!strcmp(format, "wav49")) {
 		format = "WAV";
+	} else if (!strcmp(format, "wav16")) {
+		format = "Wav";
+	}
 
 
 	/* If we have a gain option, process it now with sox */

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=148070&r1=148069&r2=148070
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Oct  9 16:37:23 2008
@@ -1755,8 +1755,11 @@
 		tempcopy = 1;
 	}
 
-	if (!strcmp(fmt, "wav49"))
+	if (!strcmp(fmt, "wav49")) {
 		fmt = "WAV";
+	} else if (!strcmp(fmt, "wav16")) {
+		fmt = "Wav";
+	}
 	ast_debug(3, "Storing file '%s', format '%s'\n", fn, fmt);
 
 	/* Make a temporary file instead of piping directly to sendmail, in case the mail
@@ -2753,8 +2756,11 @@
 		c = strchr(fmt, '|');
 		if (c)
 			*c = '\0';
-		if (!strcasecmp(fmt, "wav49"))
+		if (!strcasecmp(fmt, "wav49")) {
 			strcpy(fmt, "WAV");
+		} else if (!strcasecmp(fmt, "wav16")) {
+			strcpy(fmt, "Wav");
+		}
 		snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
 		if (msgnum > -1)
 			make_file(fn, sizeof(fn), dir, msgnum);
@@ -3167,8 +3173,11 @@
 		c = strchr(fmt, '|');
 		if (c)
 			*c = '\0';
-		if (!strcasecmp(fmt, "wav49"))
+		if (!strcasecmp(fmt, "wav49")) {
 			strcpy(fmt, "WAV");
+		} else if (!strcasecmp(fmt, "wav16")) {
+			strcpy(fmt, "Wav");
+		}
 		snprintf(msgnums, sizeof(msgnums),"%d", msgnum);
 		if (msgnum > -1)
 			make_file(fn, sizeof(fn), dir, msgnum);
@@ -3989,8 +3998,11 @@
 		ast_log(AST_LOG_WARNING, "E-mail address missing for mailbox [%s].  E-mail will not be sent.\n", vmu->mailbox);
 		return(0);
 	}
-	if (!strcmp(format, "wav49"))
+	if (!strcmp(format, "wav49")) {
 		format = "WAV";
+	} else if (!strcmp(format, "wav16")) {
+		format = "Wav";
+	}
 	ast_debug(3, "Attaching file '%s', format '%s', uservm is '%d', global is %d\n", attach, format, attach_user_voicemail, ast_test_flag((&globalflags), VM_ATTACH));
 	/* Make a temporary file instead of piping directly to sendmail, in case the mail
 	   command hangs */

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=148070&r1=148069&r2=148070
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Thu Oct  9 16:37:23 2008
@@ -1201,10 +1201,13 @@
 			recordagentcalls = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "recordformat")) {
 			ast_copy_string(recordformat, v->value, sizeof(recordformat));
-			if (!strcasecmp(v->value, "wav49"))
+			if (!strcasecmp(v->value, "wav49")) {
 				strcpy(recordformatext, "WAV");
-			else
+			} else if (!strcasecmp(v->value, "wav16")) {
+				strcpy(recordformatext, "Wav");
+			} else {
 				ast_copy_string(recordformatext, v->value, sizeof(recordformatext));
+			}
 		} else if (!strcasecmp(v->name, "urlprefix")) {
 			ast_copy_string(urlprefix, v->value, sizeof(urlprefix));
 			if (urlprefix[strlen(urlprefix) - 1] != '/')

Modified: trunk/main/file.c
URL: http://svn.digium.com/view/asterisk/trunk/main/file.c?view=diff&rev=148070&r1=148069&r2=148070
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Thu Oct  9 16:37:23 2008
@@ -248,6 +248,8 @@
 
 	if (!strcmp(ext, "wav49"))
 		ext = "WAV";
+	if (!strcmp(ext, "wav16"))
+		ext = "Wav";
 
 	if (filename[0] == '/')
 		asprintf(&fn, "%s.%s", filename, ext);

Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?view=diff&rev=148070&r1=148069&r2=148070
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Thu Oct  9 16:37:23 2008
@@ -324,7 +324,7 @@
 		if (chan->monitor->joinfiles && !ast_strlen_zero(chan->monitor->filename_base)) {
 			char tmp[1024];
 			char tmp2[1024];
-			const char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : chan->monitor->format;
+			const char *format = !strcasecmp(chan->monitor->format,"wav49") ? "WAV" : !strcasecmp(chan->monitor->format, "wav16") ? "Wav" : chan->monitor->format;
 			char *name = chan->monitor->filename_base;
 			int directory = strchr(name, '/') ? 1 : 0;
 			const char *dir = directory ? "" : ast_config_AST_MONITOR_DIR;




More information about the asterisk-commits mailing list