[Asterisk-bsd] NetBSD, Voicemail, Other errors...

Dinesh Nair dinesh at alphaque.com
Wed Dec 8 03:21:41 CST 2004



On 04/12/2004 03:34 Jay Adelson said the following:
> I managed to fix the voicemail problem.  I searched some of the list
> archives and found a patch from Dinesh Nair that stopped my NetBSD

this is a more complete patch which does the same for ast_say_number_full 
in all languages. patch against asterisk stable (1.0.2).

-- 
Regards,                           /\_/\   "All dogs go to heaven."
dinesh at alphaque.com                (0 0)    http://www.alphaque.com/
+==========================----oOO--(_)--OOo----==========================+
| for a in past present future; do                                        |
|   for b in clients employers associates relatives neighbours pets; do   |
|   echo "The opinions here in no way reflect the opinions of my $a $b."  |
| done; done                                                              |
+=========================================================================+
-------------- next part --------------
--- say.c.orig	Wed Nov  3 06:40:11 2004
+++ say.c	Wed Dec  8 17:18:44 2004
@@ -579,7 +579,7 @@
 			}
 			if (!res) {
 				if(!ast_streamfile(chan, fn, language)) {
-					if (audiofd && ctrlfd)
+					if (audiofd>-1 && ctrlfd>-1)
 						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 					else
 						res = ast_waitstream(chan, ints);
@@ -682,7 +682,7 @@
 		}
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd) 
+				if (audiofd>-1 && ctrlfd>-1) 
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				else  
 					res = ast_waitstream(chan, ints);
@@ -798,7 +798,7 @@
 			}
 			ast_stopstream(chan);
 			if(!ast_streamfile(chan, fna, language)) {
-				if (audiofd && ctrlfd) 
+				if (audiofd>-1 && ctrlfd>-1) 
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				else  
 					res = ast_waitstream(chan, ints);
@@ -881,7 +881,7 @@
 
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd)
+				if (audiofd>-1 && ctrlfd>-1)
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				else
 					res = ast_waitstream(chan, ints);
@@ -967,7 +967,7 @@
 		}
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd)
+				if (audiofd>-1 && ctrlfd>-1)
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				else
 					res = ast_waitstream(chan, ints);
@@ -1113,7 +1113,7 @@
 			}
 			if (!res) {
 				if(!ast_streamfile(chan, fn, language)) {
-					if (audiofd && ctrlfd)
+					if (audiofd>-1 && ctrlfd>-1)
 						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 					else
 						res = ast_waitstream(chan, ints);
@@ -1183,7 +1183,7 @@
 
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd)
+				if (audiofd>-1 && ctrlfd>-1)
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				else
 					res = ast_waitstream(chan, ints);
@@ -1238,7 +1238,7 @@
 	strcat(file_name, fn);
 	ast_log(LOG_DEBUG, "Trying to play: %s\n", file_name);
 	if (!ast_streamfile(chan, file_name, language)) {
-		if (audiofd && ctrlfd)
+		if (audiofd>-1 && ctrlfd>-1)
 			ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 		else
 			ast_waitstream(chan, ints);
@@ -1568,7 +1568,7 @@
 		}
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd)
+				if (audiofd>-1 && ctrlfd>-1)
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);			else
 					res = ast_waitstream(chan, ints);
 			}
@@ -1638,7 +1638,7 @@
 			}
 			 if (!res) {
                                 if(!ast_streamfile(chan, fn, language)) {
-                                    if (audiofd && ctrlfd)
+                                    if (audiofd>-1 && ctrlfd>-1)
                                         res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
                                     else
                                          res = ast_waitstream(chan, ints);
@@ -1699,7 +1699,7 @@
 			}
 			if (!res) {
 				if(!ast_streamfile(chan, fn, language)) {
-					if (audiofd && ctrlfd)
+					if (audiofd>-1 && ctrlfd>-1)
 						res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 					else
 						res = ast_waitstream(chan, ints);
@@ -1808,7 +1808,7 @@
 		}
 		if (!res) {
 			if(!ast_streamfile(chan, fn, language)) {
-				if (audiofd && ctrlfd) {
+				if (audiofd>-1 && ctrlfd>-1) {
 					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
 				} else {
 					res = ast_waitstream(chan, ints);


More information about the Asterisk-BSD mailing list