Get the Incoming Call's Number

Hi there.

I would like to create a small ajax application inside the freepbx admin page that can show details about the caller. To do this, I need to get the incoming call number in real time. How can I get it? Is it stored in the database? How does the operator panel flash get the incoming call information? Where from?

Thank you so much in advance!

Do a search on Asterisk AGI.