[asterisk-users] Abandon events in cdr

Rodrigo Lang rodrigoferreiralang at gmail.com
Fri Dec 3 19:25:49 UTC 2010


>
> No, i am standing absolutely at the beginning. I think the table structure
> should be googleable. But i haven 't found an automatism to dump the
> queuelog flatfile into a database table. Found a perl script but it doesn' t
> work for me.
>
> Am 03.12.2010 19:29 schrieb "Rodrigo Lang" <rodrigoferreiralang at gmail.com
> >:
>
>
> 2010/12/3 marcus rothe <synco16 at googlemail.com>
>
>> That sounds good. Rodrigo, allow me one question. I'm not very familar
>> with databases but have the need to report out of the queuelog. Have you got
>> a hint for me how to export the queueslog file into a database table? Thanks
>> in advance, Regards Marcus
>>
>
Hi. Assuming you use Debian and have all your repositories ok, do:

Install mysql Database:

> aptitude -y install mysql-server libmysqlclient15-dev mysql-client
>

Install php5 to run my script:

> aptitude -y install php5 php5-cli php5-cgi php5-mysql
>

To create the MySQL table I use this script [1], I pasted in the pastebin
now. This script creates the CDR and Queue_log tables.

To convert your cvs queue_log for MySQL, use this script [2]. I did it now
and have tested, it worked for me. Make a backup of queue_log before use.

[1] http://pastebin.com/2v5UPg3Q
[2] http://pastebin.com/TCJHkPXP

Any questions just ask. If you find an error in php script just let me know,
then I stand corrected.


And please answer in the list. So when someone needs the same procedure like
you needed now, he can find in list history.



Best regards,
-- 
Rodrigo Lang
Opening your mind - Just another Open Source
site<http://openingyourmind.wordpress.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101203/f7f0a0be/attachment.htm 


More information about the asterisk-users mailing list