Get answered sip account after answer from a queue

I made a dialplan which working like this:
1- Originate a call to a queue (my-queue)
2- Someone (sip account A) in my-queue answered
3- Make a call to another trunk to customer’s number, sip account A user talks with customer

It’s worked flawlessly but in CDR record I can’t get which sip account answered the call. The destinationchannel in cdr looks like SIP/my-trunk-0034b4dd.
I need sip account username for our business, please help if you have any idea.

Here is my dialplan:



And originate a call by using asterisk-outgoing which looks like
action: “originate”,
channel: ‘Local/s@agent-queue’,
Data: ‘SIP/my-trunk/0xxxxxxxxx’,
context: “agent-queue-call”,
priority: 1,
Application: “Dial”,
exten: “0xxxxxxxxx”,
CallerID: ‘0yyyyyyyyyy’,
variable: {

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.