Reputation: 464
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.
Upvotes: 3
Views: 2803
Reputation: 1454
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:
mysql> DESCRIBE queue_log;
+-----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| time | varchar(10) | YES | | | |
| callid | varchar(32) | NO | | | |
| queuename | varchar(32) | NO | | | |
| agent | varchar(32) | NO | | | |
| event | varchar(32) | NO | | | |
| data | varchar(255) | NO | | | |
+-----------+------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)
Hope that helps...
Upvotes: 0
Reputation: 3059
From within the dialplan? Not particularly. Asterisk does not give as many tie-ins when it comes to accessing queue call channels at the dialplan level as some would like.
A non-trivial, but very possible way of solving this issue is to build an application that interfaces with the Asterisk Management Interface. From there, you can effectively watch for queue events, tracking a call throughout its lifetime on your PBX and providing that information to your agents out-of-band. Whether this works for you really depends upon your particular objective.
If you do plan on taking this route, you will want to do two things.
Events: on
right after authenticating.eventmemberstatus=yes
in queues.conf for any queue that you want to track.Hope this helps!
Upvotes: 1