[Asterisk-bsd] NetBSD and VM

Jay Adelson jay at adelson.org
Tue Jan 4 10:07:31 CST 2005


I feel that this must be related to ast_waitstream again.  Why it used
to do this with a single digit and now fails with longer ones I can't
imagine.

Here is the patch that fixed the original problem, perhaps I missed
something.  What follows is the "complete patch" from Dinesh in all languages.

Still, something still isn't working right...

-Jay


--- BEGIN PATCH ---
--- say.c.orig  Wed Sep 29 17:01:53 2004
+++ say.c       Wed Sep 29 16:55:15 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);
---  END PATCH  ---


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                                                              |
+=========================================================================+

--------------010807080308090003020304
Content-Type: text/plain;
 name="ast.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ast.diff"

--- 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);

--------------010807080308090003020304
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Asterisk-BSD mailing list
Asterisk-BSD at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-bsd

--------------010807080308090003020304--


On Tue, Jan 04, 2005 at 09:47:18AM -0600, Bill Harris wrote:
> I have the same problems on FreeBSD 5.3 and cvs-current.
> 
> I have * mapped to voicemail that passes password, and
> it will hang up nearly every time, but calling 8500 entering
> password manually, lets me retrieve my messages.
> 
> Bill
> 
> 
> On Jan 4, 2005, at 8:42 AM, Jay Adelson wrote:
> 
> >Hey folks,
> >
> >I continue to have weird hangups during voicemail, all resulting from
> >playback issues on NetBSD.
> >
> >Orignally, when asterisk tried to play the digit "1," it would hangup
> >the call.
> >
> >It used to fail in file.c as the Wait fails with ast_waitstream_full.   
> >I
> >applied a patch and things seemed to work fine.
> >
> >Now, I happened to get a voicemail that required the digit "20."  I
> >verified that the file is there in /var/lib/asterisk/sounds/digits, and
> >that the gsm file is not corrupt.
> >
> >Any thoughts?
> >
> >Here's the output:
> >
> >    -- Playing 'vm-messages' (language 'en')
> >    -- Playing 'vm-onefor' (language 'en')
> >    -- Playing 'vm-INBOX' (language 'en')
> >    -- Playing 'vm-messages' (language 'en')
> >    -- Playing 'vm-first' (language 'en')
> >    -- Playing 'vm-message' (language 'en')
> >  == Parsing  
> >'/var/spool/asterisk/voicemail/default/1000/INBOX/msg0000.txt': Found
> >    -- Playing 'vm-received' (language 'en')
> >    -- Playing 'digits/day-3' (language 'en')
> >    -- Playing 'digits/mon-11' (language 'en')
> >    -- Playing 'digits/20' (language 'en')
> >Jan  4 06:09:45 WARNING[24444]: file.c:1058 ast_waitstream_full: Wait  
> >failed (No such file or directory)
> >  == Spawn extension (intern-post, 1111, 2) exited non-zero on  
> >'IAX2/blah at blah/3'
> >
> >Thanks,
> >
> >-Jay
> >_______________________________________________
> >Asterisk-BSD mailing list
> >Asterisk-BSD at lists.digium.com
> >http://lists.digium.com/mailman/listinfo/asterisk-bsd
> >
> ------------------------------------------------------------------------ 
> ---------------------------
> Bill Harris
> Director of Technology
> Royse City ISD							Royse City, 
> Texas
> (972)-636-9991 x1000
> 
> _______________________________________________
> Asterisk-BSD mailing list
> Asterisk-BSD at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-bsd


More information about the Asterisk-BSD mailing list