[asterisk-users] queue log vs. cdr

Vieri rentorbuy at yahoo.com
Fri Mar 14 06:52:08 CDT 2008


--- Atis Lezdins <atis at iq-labs.net> wrote:

> Hmm, didn't knew that queue_log can be written into
> MySQL..

Asterisk 1.6 beta has that through realtime.

But I'm using a custom import script in earlier
Asterisk versions.

> Is callid in queue_log the same uniqueid?

yes.

> You can do
> something like this:
> 
> CREATE TEMPORARY TABLE a TYPE=MEMORY select * from
> queue_log where
> queuename =  '4010' and FROM_UNIXTIME(time) between
> 20080308000000
> and 20080313145900 group by callid;
> 
> CREATE TEMPORARY TABLE b TYPE=MEMORY select * from
> cdr where dst =
> 4010 and calldate between 20080308000000 and
> 20080313145900 group by
> uniqueid;
> 
> and then compare:
> 
> SELECT * FROM a WHERE callid NOT IN (SELECT uniqueid
> FROM b)
> SELECT * FROM b WHERE uniqueid NOT IN (SELECT callid
> FROM a)

Thanks. It seems that the missing records in the cdr
table are due to the fact that the dst field isn't
4010 as expected but the extension to which the call
was transferred by the agent (dcontext indicates
transfer event).
Strange so I guess I'll have to review the dialplan
closely.



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the asterisk-users mailing list