returning 128 emtpy Frames instead of null frame.
authorChristian Richter <christian.richter@beronet.com>
Tue, 2 May 2006 14:00:37 +0000 (14:00 +0000)
committerChristian Richter <christian.richter@beronet.com>
Tue, 2 May 2006 14:00:37 +0000 (14:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24168 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index ae05e57..460ba03 100644 (file)
@@ -2074,8 +2074,16 @@ static struct ast_frame  *misdn_read(struct ast_channel *ast)
                        tmp->zero_read_cnt=0;
 
                }
-               tmp->frame.frametype = AST_FRAME_NULL;
-               tmp->frame.subclass = 0;
+
+               /*faking Voice Frame*/
+               tmp->frame.frametype = AST_FRAME_VOICE;
+               tmp->frame.subclass = AST_FORMAT_ALAW;
+               memset(tmp->ast_rd_buf,0,128);
+               tmp->frame.data = tmp->ast_rd_buf ;
+               tmp->frame.mallocd =0 ;
+               tmp->frame.datalen = 128;
+               tmp->frame.samples = 128;
+
                frame=ast_frisolate(&tmp->frame);
                return frame;
        }