<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>If you can reproduce this easily, try debug output
of rtp->f.mallocd, and the value of the rtp->f.data pointer. I would
bet both are zero somehow when that function runs.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=cf@internetit.dk href="mailto:cf@internetit.dk">cf@internetit.dk</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=asterisk-dev@lists.digium.com
href="mailto:asterisk-dev@lists.digium.com">asterisk-dev@lists.digium.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, September 07, 2004 11:28
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Asterisk-Dev] RFC3389 problem a
little more info..</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi Again,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Added some more info in rtp.c, and this the
problem:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>RFC3389: 5 bytes, level 0...<BR>RFC3389: Copying
5 bytes.... <BR>Segmentation fault</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>static struct ast_frame *process_rfc3389(struct
ast_rtp *rtp, unsigned char *data, int
len)<BR>{<BR> struct ast_frame *f =
NULL;<BR> /* Convert comfort noise
into audio with various codecs. Unfortunately this
doesn't<BR>
totally help us out becuase we don't have an engine to keep it going and we
are not<BR>
guaranteed to have it every 20ms or anything */<BR>#if
1<BR> printf("RFC3389: %d bytes,
level %d...\n", len, rtp->lastrxformat);<BR>#endif
<BR> if (!(rtp->flags &
FLAG_3389_WARNING))
{<BR>
ast_log(LOG_NOTICE, "RFC3389 support incomplete. Turn off on client if
possible\n");<BR>
rtp->flags |=
FLAG_3389_WARNING;<BR>
}<BR> /* Must have at least one byte
*/<BR> if (!len)
{<BR>
printf("RFC3389: Lenghth is -1 or null bytes....
\n");<BR>
return NULL;<BR>
}<BR> if (len < 24)
{<BR>
printf("RFC3389: Copying %d bytes.... \n",
len);<BR>
rtp->f.datalen = len -
1;<BR>
memcpy(rtp->f.data, data + 1, len -
1);<BR>
printf("RFC3389: Copying finished %d bytes.... \n",
len);<BR> } else
{<BR>
printf("RFC3389: Copying 0 bytes....
\n");<BR>
rtp->f.datalen = 0;<BR>
}<BR> printf("RFC3389: Preparing
return.... \n");<BR>
rtp->f.frametype =
AST_FRAME_CNG;<BR>
rtp->f.subclass = data[0] &
0x7f;<BR> rtp->f.datalen = len -
1;<BR> rtp->f.samples =
0;<BR> rtp->f.delivery.tv_usec =
rtp->f.delivery.tv_sec = 0;<BR> f
= &rtp->f;<BR>
printf("RFC3389: Returning f....
\n");<BR> return
f;<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Does this occur because the len is set but the
data isn't there??</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kind regards</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Claus</FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Asterisk-Dev mailing
list<BR>Asterisk-Dev@lists.digium.com<BR>http://lists.digium.com/mailman/listinfo/asterisk-dev<BR>To
UNSUBSCRIBE or update options visit:<BR>
http://lists.digium.com/mailman/listinfo/asterisk-dev</BLOCKQUOTE></BODY></HTML>