Is there an easy way to capture the agent extension into an asterisk variable when a call is transfered to an agent from a queue?
Edit: We are using dynamic agents. After the agent takes the call, he transfers the call to another extension. In the context for that extension, we need to utilize an asterisk variable that contains the extension of the agent that transferred the call.
As @ywca-hello explained, it could possibly be achieved using the Management Interface (AMI), another option is to make use of the Queue Log for accessing information about the call information from within the Queue() dialplan application. This can be accessed from within the dialplan or from an AGI script, or external script. The Queue Log can also be integrated with SQL, allowing for easier manipulation of the data. The structure looks like the following:
Hope that helps…