Agents.conf in database?

Hi everyone! is it possible to store the agents.conf info into realtime (mysql database for example)?
Because queue, sips, voicemails and queue_members are stored in database, but agents are not.


This might be helpful

I understand the theory about agents in real time, but they arent agents for asterisk, they are members that are treated like agents in database, because ‘agent show’ in the CLI wont work (as they arent declared in agents.conf).
I am using AMI to get some information, I could easily use that realtime format and know where the “agent” is logged in (SIP/XXX) but what I need is to know, after a member answer a call from a queue, the channel they are using.

Agent is logged in (I save the SIP location in database), then someone calls a queue and waits to be answered(I can see who is talking and hangup or redirect the call because I can get the channel), when an agent answer, I cant access to this call (I know the SIP device of the agent, but not the channel he is taking, so I cant hangup the call one the agent took it)

Sorry about my poor english!

thanks in advanced!

I don’t know enough about this to tell you exactly how, but you should be able to code up a PERL/PHP/C daemon to use the SIP info you can obtain plus the information from “core show channels verbose” to use call files or AMI to connect these calls in a “realtime” queue fashion.

I am not an expert but I thought another way is when asterisk loads the information about queue member connected to a channel in queue_log table, save it in another table and when it loads the abandon or complete event, remove it, that way I could know to who is the agent talking and hangup the call.

I know the SIP device where the agent is located at, and it would be useful if I could use the core show channels verbose (that shows the channels bridged to a queue member)