How to configure IVR accessable by callers simultaneously

Hi all,
I am new to asterisk and just getting started with the development of an IVR system.
I have set up an IVR in asterisk at extension 12345 using Asterisk-java Fast AGI.
I can happily access this IVR from my soft phone by dialing an extension 12345.
But my problem is, how to make this IVR to be able to be accessed by multiple soft phones simultaneously? when I try calling 54321 when another user is already accessing it, all hear is a ring until the other party hangs up.
I short, I want to setup an IVR, which can be called simultaneously by different users (soft phones for the moment) by dialing the SAME number. i.e all of them will dial the same 12345, but they all should be able to access this simultaneously. Please help
Here is the extract from the extensions.conf :

[default]
exten => 54321,1,Ringing()
exten => 54321,2,Wait(4)
exten => 54321,3,Agi(agi://localhost/IVRHandlerNew.agi)
exten => s,1,Goto(54321,1)

Please correct me if I am wrong (Im sure I am…)
Later I also want the same behaviour when dialing from fixed line.
Please help me out of this.
Thank you in advance.
Anvar

What you are saying doesn’t make much sense as that is not the way asterisk behaves. If you have two SIP clients dial into an asterisk context/extension they will operate as autonomous creatures… the dialplan simply tells each one what it should do as the call progresses.

What exactly does your AGI script do? Could this be the element which is not multi-threaded?

Are you using Asterisk-Java for the FastAGI implementation? If so, are you using the DefaultAGIServer, or some other class to implement the socket accept… post the guts of the AGI and perhaps we can go from there.

Hi,
Thankyou for the reply.
Yes. I am using the Asterisk-java for the FastAGI Implementation.
I am using the DefaultAGIServer to accept the calls.
But what I have noticed is,
When one call is being processed by the AGIServer, and when another calls lands on it, I can see the log from DefaultAGIServer that it accepted the call… but it stops there until the first thread exits… and then the second thread starts executing.
I have configured 20 threads in the pool (pool size) and have only one mapping.
Another point Id like to mention here is that I Answer the call in the java code (agi script) and not in the dial plan. Does this cause some problem?
Please comment

Hi friends…
Ive finally identified the curlprit.
It is the java class which accepts the calls that is causing this problem…
Poor asterisk has nothing to do with this… sorry Asterisk
A synchronized method here in my code caused the calls to wait for execution until the already executing calls are completed.
Thanks to g2010 for his perspective.
Just thought of sharing this info now… even though this was resolved the same day after seeing g2010 reply…
Thanks
Anvar.