Extension popup in Queue

Hi,
I’m using asterisk 11,freepbx 2.11, I just want to build a call center setup.For that I made custom queue of having only two static agent extensions.Everything is working properly.We created web gui for the 2 extensions (agents) separately, having some other details in that web gui.The agent will have that their web gui and their desk phone.Our asterisk server is connected to a database server.When call comes to queue we fetch customer phone number or name from the database and give a pop-up in the agent’s web gui. By that the agent can understand the customer, whether he called us before or is that his first time.Our web developers found all the solutions but only one problem.
‘how can I find the particular agent extension who is going to ring in the Queue of 2 agents’. So only that (ringing) agent extension can have the pop -up details in their web gui. Another agent extension will keep silent ( no pop-up in gui).
If the ring strategy of Queue is Ring all then it is ok, that pop up details can give for all agent extensions in that Queue.But here I am using Rr memory strategy.Only one extension will ring at a time,and that extension’s gui only needs pop-up details of the customer.

I am newbie to this …can anyone help me to come out of this…
Thanks in advance :?

Each computer needs to run the screen pop software. That software connects to the Asterisk AMI and only looks for calls to the associated extension. When a ring event occurs the http address is poped and your DB app does the dip for the customer record.

The queue logic is not exposed as an AMI event. You can’t programatically know the extension is going to ring until the dial event occurs.

Thanks for the reply skykingOH.
Apart from using AMI…Is there any possibility of getting realtime variable that, which agent extension is ringing inside the Queue… If so I can pass that variable from queue using AGI as

%%%%%%%%%%%%%%%%%%%%
exten => 1234,1,Queue(sales,AGI(script.php)