Askozia Forums
May 17, 2012, 02:37:17 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Calls log doesn't appear to grow beyond 200 records  (Read 1116 times)
devon
Guest
« on: March 31, 2008, 02:35:04 am »

With the "Number of log entries to show:" set to 1000, the 'Diagnostics: Logs' calls log does not appear to grow larger than 200 records. I was watching cdr.db to see how large it would grow, and noticed that it was not getting much bigger than about 80kb.
Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #1 on: March 31, 2008, 09:09:03 am »

As with the other logs in AskoziaPBX, there is an upper bound to the call log's size (200 entries). If each log was allowed to grow infinitely, the system would eventually exhaust itself of memory as everything is run from a memory disk.
Logged
devon
Guest
« Reply #2 on: March 31, 2008, 12:06:48 pm »

I apologize for not being clear, it makes perfect sense that the logs not be allowed to grow indefinitly. The calls log title says "Last 1000 Call Records" even though the maximum number of records is really 200?
Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #3 on: March 31, 2008, 01:06:25 pm »

That's a cosmetic problem then. There are two different ways logs are handled. One is aware of how many entries it can have (calls) and the others only have size limits (system, pbx). Some logic could be added to ensure that the titles make sense in those different situations.
Logged
devon
Guest
« Reply #4 on: April 01, 2008, 04:44:01 am »

It appears the limit is imposed in cdr_sqlite.c and compiled into cdr_sqlite.so:

BEGIN DELETE FROM cdr   WHERE id <= (SELECT max(id) FROM cdr) - 200; END;
Logged
Michael
Askozia Staff
Hero Member
*

Karma: 49
Posts: 1020


View Profile
« Reply #5 on: April 01, 2008, 07:24:38 am »

Yes, those modifications are why it is in our tree.
Logged
devon
Guest
« Reply #6 on: April 08, 2008, 07:24:10 pm »

Ok, I now understand your comment. I did not know of the modified cdr_sqlite.c in the svn tree until after your post (i got the text in my previous post from looking at cdr_sqlite.so in a  hex editor). I've downloaded the source and changed the limit from 200 to 1000, and recompiled cdr_sqlite.so. Works a treat, thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.294 seconds with 19 queries.