[Asterisk-Dev] no audio after many transfers

Jim Gottlieb jimmy-ml at nccom.com
Fri Apr 25 00:33:20 MST 2003


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.

To test further, instead of routing calls to our app, I now did a basic 
exten=_17005559248,1,Goto,outtrunk|18585581234|1
which goes to
exten=_1XXXXXXXXXX,1,StripMSD,1 
exten=_XXXXXXXXXX,2,Dial,Zap/g1/${EXTEN}

and still no audio on this call.  If I restart *, it works again for a
while.  Since it could very well be the way we are "transferring" the
calls, here's what we do:

        /* 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;
        }
        newtcommon->ast_chan[newtch->channo] = 0;
        /* remove from module's user count */
        ast_pthread_mutex_lock(&newt_lock);
        LOCAL_USER_REMOVE(u);
        ast_pthread_mutex_unlock(&newt_lock);
        return(rv); /* hangup on (or transfer) user when done */

My next test will be to do the play and transfer entirely in asterisk,
but since this is pretty standard stuff, I would expect it not to have
any problems.  The debug output looks fine:

    -- Accepting call from '8582708181' to '7005559248' on channel 1, span 3
    -- Executing Prefix("Zap/49-1", "1") in new stack
    -- Prepended prefix, new extension is 17005559248
    -- Executing Goto("Zap/49-1", "default|17005559248|1") in new stack
    -- Goto (default,17005559248,1)
    -- Executing Goto("Zap/49-1", "outtrunk|18585581234|1") in new stack
    -- Goto (outtrunk,18585581234,1)
    -- Executing StripMSD("Zap/49-1", "1") in new stack
    -- Executing Dial("Zap/49-1", "Zap/g1/8585581234") in new stack
    -- Called g1/8585581234
    -- Zap/1-1 is ringing

jtsd08*CLI> show channels
      Channel  (Context    Extension    Pri )   State Appl.         Data           
      Zap/1-1  (intrunk    s            1   ) Ringing AppDial       (Outgoing Line)
     Zap/49-1  (outtrunk   8585581234   2   ) Ringing Dial          Zap/g1/8585581234


Any idea what we're doing wrong or what debugging I can do to track
this down further?  Thanks...



More information about the asterisk-dev mailing list