[Asterisk-Dev] no audio after many transfers

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Apr 25 07:40:08 MST 2003


On Friday 25 April 2003 02:33, Jim Gottlieb wrote:
> In one of the iterations of our internal application, we play
> a message, then transfer the call (really a Zap-to-Zap bridge)
> to another number.
>
> This works fine for the first 50 or so calls, then the
> transfers still happen but no audio is passed in either
> direction.  It starts happening on a percentage of the calls
> until it builds to the point where no transfered calls get
> audio.  One of our systems is now sitting in that state in
> case there's some debugging I can do to track this down.

Could be a memory leak.

>         /* if to transfer upon exit */
>         if (destno && destno[0])
>         {
>                
> ast_cdr_reset(newtcommon->ast_chan[newtch->channo]->cdr,1);
> strcpy(newtcommon->ast_chan[newtch->channo]->exten,destno);
> newtcommon->ast_chan[newtch->channo]->priority = 0;
> strcpy(newtcommon->ast_chan[newtch->channo]->context,"default"
>); ast_cdr_update(newtcommon->ast_chan[newtch->channo]); rv =
> 0; /* set return to 0, so that it will transfer */
> free(destno);
>                 destno = 0;
>         }

So you're only free()ing this internal structure if the first
element in the array is set?  And not every time (i.e. when you
don't transfer)?

Are you doing checks when you malloc() to make sure that you're
really receiving a memory allocation (not NULL)?

What does the memory size of the asterisk process look like when
your calls start to no longer work?  And when all of them no
longer work?

-Tilghman




More information about the asterisk-dev mailing list