There's a number of ways you could approach this.
If you're looking for rich interaction of the call as it's routed, and as the call interacts with the dialplan -- you'll want AGI to alter it's routing and make intelligent decisions about where the call goes, and to store and retrieve more granular and customized information about the call.
But, if you're just looking for information on a call that's in progress, without changing the dialplan -- you might want to approach it from AMI, just to get a list of calls in progress. This is what I would recommend for this task from how you described it.
AMI is something you use over a TCP socket, and is rather straight forward. You can always find an example API, however, for what you need -- directly accessing AMI might be the best choice. It's a simple protocol and the official documentation is from the canonical source @ The Asterisk Wiki