Re: [Asterisk-java-users] Problems with concurrent java-threads answering incoming calls
Brought to you by:
srt
From: Gopal k. <gop...@pe...> - 2008-02-14 15:08:10
|
Hi, we have done the dtmf application with asterisk-java using "getdata()" let me check whether it will support parallel inbound calls. On Thu, Feb 14, 2008 at 6:16 PM, Johan Sandgren <js...@sv...> wrote: > Hi dear users and experts J > > > > What about my problem, any clever ideas? > > I've got 10 phonelines with incoming calls, and DTMF-tones are coming too > on these lines. > > > > I've written an answering AGI-javaprogram, to service() each call in > parallel. > > *Example of what happens during one call:* > Call 1 – answered by my java-class(via AGI-call), > I'm sending some DTMF-tones to the caller (via my AsteriskChannel and > obj.playDtmf)and I will shortly then receive a sequence of DTMF-tones as > the answer from the caller. (using *agiChannel.waitForDigit(waitDelay))* > > > > What happens is, when many channels are in progress simultaneously sending > DTMF, and listening for DTMF-responses, each thread will not run often > enough to get all incoming DTMF-tones. > > It could take like 10 seconds (looking at my log) before one thread sent > the DTMF-question, till it calls the get-DTMF()-command, but then it's too > late. > > The delay seems to be all other threads executing in between. > > It's the same situation for every Thread. > > > > I wonder, why is not every thread being switched more often? Like once > every millisecond? > > It's more like once every second here. > > Surely something must be wrong… I must be a very bad programmer… J > > > > With just one CPU, multithreaded tasks need to switch thread very quick, > to work. > > > > What have I done wrong? Help, opinions are appreciated. > > > > Sincerely, > > Johan > > > > __________________________________________________________________ > > > Johan Sandgren > > Svep Design Center AB (www.svep.se) > > St. Lars väg 42A, SE-222 70 Lund > > Phone: 046-19 27 22 > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Asterisk-java-users mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-users > > -- Thank you with regards, Gopal, PeopleTech Systems Private Limited www.peopletech.co.in |