[Asterisk-Dev] RFC3389 problem a little more info..

Mark Spencer markster at digium.com
Wed Sep 8 20:37:07 MST 2004


Should be fixed in CVS...

Mark

On Tue, 7 Sep 2004, Rob Gagnon wrote:

> Well, somehow rtp->f.data is not a valid pointer yet.  Anyhone familiar want to take this one? or post it on bugs.?
>
>  ----- Original Message -----
>  From: cf at internetit.dk
>  To: asterisk-dev at lists.digium.com
>  Sent: Tuesday, September 07, 2004 11:28 AM
>  Subject: [Asterisk-Dev] RFC3389 problem a little more info..
>
>
>  Hi Again,
>
>  Added some more info in rtp.c, and this the problem:
>
>  RFC3389: 5 bytes, level 0...
>  RFC3389: Copying 5 bytes....
>  Segmentation fault
>
>  static struct ast_frame *process_rfc3389(struct ast_rtp *rtp, unsigned char *data, int len)
>  {
>          struct ast_frame *f = NULL;
>          /* Convert comfort noise into audio with various codecs.  Unfortunately this doesn't
>             totally help us out becuase we don't have an engine to keep it going and we are not
>             guaranteed to have it every 20ms or anything */
>  #if 1
>          printf("RFC3389: %d bytes, level %d...\n", len, rtp->lastrxformat);
>  #endif
>          if (!(rtp->flags & FLAG_3389_WARNING)) {
>                  ast_log(LOG_NOTICE, "RFC3389 support incomplete.  Turn off on client if possible\n");
>                  rtp->flags |= FLAG_3389_WARNING;
>          }
>          /* Must have at least one byte */
>          if (!len) {
>                  printf("RFC3389: Lenghth is -1 or null bytes.... \n");
>                  return NULL;
>          }
>          if (len < 24) {
>                  printf("RFC3389: Copying %d bytes.... \n", len);
>                  rtp->f.datalen = len - 1;
>                  memcpy(rtp->f.data, data + 1, len - 1);
>                  printf("RFC3389: Copying finished %d bytes.... \n", len);
>          } else {
>                   printf("RFC3389: Copying 0 bytes.... \n");
>                  rtp->f.datalen = 0;
>          }
>          printf("RFC3389: Preparing return.... \n");
>          rtp->f.frametype = AST_FRAME_CNG;
>          rtp->f.subclass = data[0] & 0x7f;
>          rtp->f.datalen = len - 1;
>          rtp->f.samples = 0;
>          rtp->f.delivery.tv_usec = rtp->f.delivery.tv_sec = 0;
>          f = &rtp->f;
>          printf("RFC3389: Returning f.... \n");
>          return f;
>  }
>
>  Does this occur because the len is set but the data isn't there??
>
>  Kind regards
>
>  Claus
>
>
> ------------------------------------------------------------------------------
>
>
>  _______________________________________________
>  Asterisk-Dev mailing list
>  Asterisk-Dev at lists.digium.com
>  http://lists.digium.com/mailman/listinfo/asterisk-dev
>  To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-dev



More information about the asterisk-dev mailing list