Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] queue log vs. cdr


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
rentorbuy at yahoo.com
Guest





PostPosted: Thu Mar 13, 2008 9:17 am    Post subject: [asterisk-users] queue log vs. cdr Reply with quote

Hi,

Surely, I must be overlooking something. If I run the
following SQL queries I don't get the same number of
rows. Is this coherent?

mysql> select * from queue_log where queuename =
'4010' and FROM_UNIXTIME(time) between 20080308000000
and 20080313145900 group by callid;

357 rows in set (0.01 sec)

mysql> select * from cdr where dst = 4010 and calldate
between 20080308000000 and 20080313145900 group by
uniqueid;

219 rows in set (0.19 sec)

Thanks!

____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Back to top
atis at iq-labs.net
Guest





PostPosted: Thu Mar 13, 2008 9:55 am    Post subject: [asterisk-users] queue log vs. cdr Reply with quote

On 3/13/08, Vieri <rentorbuy at yahoo.com> wrote:
Quote:
Hi,

Surely, I must be overlooking something. If I run the
following SQL queries I don't get the same number of
rows. Is this coherent?

mysql> select * from queue_log where queuename =
'4010' and FROM_UNIXTIME(time) between 20080308000000
and 20080313145900 group by callid;

357 rows in set (0.01 sec)

mysql> select * from cdr where dst = 4010 and calldate
between 20080308000000 and 20080313145900 group by
uniqueid;

219 rows in set (0.19 sec)

Thanks!


Hmm, didn't knew that queue_log can be written into MySQL.. that's
something useful for me Smile

Is callid in queue_log the same uniqueid? 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)

Regards,
Atis

--
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835
Back to top
rob at hillis.dyndns.org
Guest





PostPosted: Thu Mar 13, 2008 10:24 am    Post subject: [asterisk-users] queue log vs. cdr Reply with quote

Yes it is.

The reason you get more entries in queue_log is that there are several
queue_log events per call - most commonly you get an "ENTERQUEUE",
"CONNECT" and "COMPLETECALLER/AGENT" for each call.

Vieri wrote:
Quote:
Hi,

Surely, I must be overlooking something. If I run the
following SQL queries I don't get the same number of
rows. Is this coherent?

mysql> select * from queue_log where queuename =
'4010' and FROM_UNIXTIME(time) between 20080308000000
and 20080313145900 group by callid;

357 rows in set (0.01 sec)

mysql> select * from cdr where dst = 4010 and calldate
between 20080308000000 and 20080313145900 group by
uniqueid;

219 rows in set (0.19 sec)

Thanks!



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

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
rentorbuy at yahoo.com
Guest





PostPosted: Fri Mar 14, 2008 6:52 am    Post subject: [asterisk-users] queue log vs. cdr Reply with quote

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

Quote:
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.

Quote:
Is callid in queue_log the same uniqueid?

yes.

Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services