Posted: Fri Apr 25, 2003 7:33 am Post subject: [Asterisk-Dev] no audio after many transfers
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...
Posted: Fri Apr 25, 2003 2:40 pm Post subject: [Asterisk-Dev] no audio after many transfers
On Friday 25 April 2003 02:33, Jim Gottlieb wrote:
Quote:
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.
Quote:
/* 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?
Posted: Sat Apr 26, 2003 7:42 am Post subject: [Asterisk-Dev] no audio after many transfers
On 2003-04-25 at 09:40, Tilghman Lesher (tilghman@mail.jeffandtilghman.com) wrote:
Quote:
On Friday 25 April 2003 02:33, Jim Gottlieb wrote:
> 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.
After examining memory usage and our code, I coded up this application
entirely in asterisk and let 'er run for a bit. To my surprise, it
exhibited the same problem. Here's what I did:
[intrunk]
; match any 10 digit dialed, and prepend a 1 for the country code
exten=_XXXXXXXXXX,1,Prefix,1
; dial in default context with extension converted from above
exten=_1XXXXXXXXXX,2,Goto,default|${EXTEN}|1
[ccmenu]
exten=s,1,Ringing
exten=s,2,Wait,2
exten=s,3,BackGround(5045)
exten=s,4,Goto,outtrunk|17005554223|1 ; if they just wait
exten=_X,1,Goto,outtrunk|17005554223|1 ; if they press 0-9
exten=_*,1,Goto,outtrunk|17005554223|1 ; if they press *
exten=_#,1,Goto,outtrunk|17005554223|1 ; if they press #
[outtrunk]
; match any US, and strip leading 1 off
exten=_1XXXXXXXXXX,1,StripMSD,1
; dial outbound on trunk group 1
exten=_XXXXXXXXXX,2,Dial,Zap/g1/${EXTEN}
Ran fine for the first few hundred calls, then the transfer still
happened, but no audio was passed in either direction. Doing a
'restart now' makes it work again for another few hundred calls.
Posted: Sat Apr 26, 2003 3:45 pm Post subject: [Asterisk-Dev] no audio after many transfers
Quote:
Ran fine for the first few hundred calls, then the transfer still
happened, but no audio was passed in either direction. Doing a
'restart now' makes it work again for another few hundred calls.
Have you tried some more detailed debugging, like which side ceases to be
able to send / receive audio?
Posted: Sat Apr 26, 2003 8:51 pm Post subject: [Asterisk-Dev] no audio after many transfers
On 2003-04-26 at 10:45, Mark Spencer (markster@digium.com) wrote:
Quote:
> but no audio was passed in either direction. Doing a
> 'restart now' makes it work again for another few hundred calls.
Have you tried some more detailed debugging, like which side ceases to be
able to send / receive audio?
I'm open to suggestions. How should I debug this? Neither party can
hear the other, so it seems audio is not passing in either direction.
I could stick a test set on the span, but I'm not sure what that would
prove, since I know the phone line I'm transferring to is fine
(although we normally transfer to another * box, I have set it to a
telco number for testing, with no difference). Is there some debugging
in * I can turn on which will show packet level traces?
but it doesn't seem to show much if anything. Adding a bunch of 'v's
when starting the CLI shows call progress debugging, but this all looks
fine. What debug command am I overlooking, or should I be using
strace?
Quote:
Are these all zap interfaces or what?
Yes. They are spans connected to a T400P. The calls come in on span 3
and go out on span 1.
Posted: Sun Apr 27, 2003 12:03 am Post subject: [Asterisk-Dev] no audio after many transfers
Jim,
How recent is your build and do you have immediate=yes on the either span? I
have observed no audio in something I'm experimenting with.
John
----- Original Message -----
From: "Jim Gottlieb" <jimmy-ml@nccom.com>
To: <asterisk-dev@lists.digium.com>
Sent: Saturday, April 26, 2003 3:51 PM
Subject: Re: [Asterisk-Dev] no audio after many transfers
Quote:
On 2003-04-26 at 10:45, Mark Spencer (markster@digium.com) wrote:
> > but no audio was passed in either direction. Doing a
> > 'restart now' makes it work again for another few hundred calls.
>
> Have you tried some more detailed debugging, like which side ceases to
be
Quote:
> able to send / receive audio?
I'm open to suggestions. How should I debug this? Neither party can
hear the other, so it seems audio is not passing in either direction.
I could stick a test set on the span, but I'm not sure what that would
prove, since I know the phone line I'm transferring to is fine
(although we normally transfer to another * box, I have set it to a
telco number for testing, with no difference). Is there some debugging
in * I can turn on which will show packet level traces?
but it doesn't seem to show much if anything. Adding a bunch of 'v's
when starting the CLI shows call progress debugging, but this all looks
fine. What debug command am I overlooking, or should I be using
strace?
> Are these all zap interfaces or what?
Yes. They are spans connected to a T400P. The calls come in on span 3
and go out on span 1.
Posted: Sun Apr 27, 2003 12:18 am Post subject: [Asterisk-Dev] no audio after many transfers
On 2003-04-26 at 19:03, John Harragin (jharragi@mw.k12.ny.us) wrote:
Quote:
How recent is your build
April 18. The problem has existed since I started playing with this a
month or so ago, so I stopped doing daily updates on this system when
it was obvious that it wasn't a transient problem. Maybe it's time to
update again.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum