<div class="gmail_quote">On Tue, Jun 12, 2012 at 10:38 PM, Pratik Shrestha <span dir="ltr"><<a href="mailto:pratikdbl@gmail.com" target="_blank">pratikdbl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear All,<div><br></div><div>I am making asterisk report using CDR values given by asterisk. </div><div><br></div><div>I have queues which consist of multiple members (extension). Also, an extension may be in multiple queues. So, I want CDR to record the name/number of queue from which the call was originated. </div>
<div><br></div><div>E.g.</div><div><b>Channel</b> <b> DestinationChannel</b> <b> Src</b> <b> Destination </b> </div>
<div>SIP/KOT-0000000c Local/102@from-queue-6a84;1 0856511524 9999 (first line in CDR)</div><div>Local/102@from-queue-6a84;2 SIP/102-0000000e 0856511524 102 (second line in CDR)</div>
<div><br></div><div><br></div><div>In above example, 9999 is a queue and 102 is an extension which is member to that queue. So call comes from 0856511524 and goes to queue 9999 first and queue routes call to 102 extension. So what I need is when the queue is routed to extension 102 (in the seconds line), I want to show the queue (9999) also. I know that I can track the queue by comparing Destination Channel of queue(first line) with Channel of extension (second line). But this will make my query very long and hard. </div>
<div><br></div><div>Please help me. I am still new to asterisk.</div><br></blockquote><div><br><br>While I agree with Lenz about using one of the existing tools out there to analyze queue logs (his Queuemetrics is a very good tool, I would definitely recommend it!), if all you really want is queue name in the CDR fields, you can do that with a simple Set command in your local channel that dials your agents using func CDR:<br>
<br>exten => agentcall,1,Set(CDR(queue)=${queuenum})<br><br>This will create a new field in your CDR called "queue" and will populate it with the result of the channel variable ${queuenum}, which you should set before you enter the queue. If you're using MySQL for your CDR storage, I believe you have to create the column first for the new field.<br>
<br><br></div></div>-- <br>Thanks,<br>--Warren Selby, dCAP<br><a href="http://www.selbytech.com" target="_blank">http://www.SelbyTech.com</a><br><br>