<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Asterisk Reports Made Simple - SAM Reports &#187; Csv</title>
	<atom:link href="http://samreports.com/tag/csv/feed" rel="self" type="application/rss+xml" />
	<link>http://samreports.com</link>
	<description>Asterisk Reports Made Simple, Asterisk Reporting for Small Business, CDR Reports, Queue Reports</description>
	<lastBuildDate>Thu, 17 May 2012 12:42:47 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New version of SamReports will support Trixbox and Fonality and Big Datasets</title>
		<link>http://samreports.com/blog/version-samreports-support-trixbox-fonality-big-datasets</link>
		<comments>http://samreports.com/blog/version-samreports-support-trixbox-fonality-big-datasets#comments</comments>
		<pubDate>Fri, 01 Apr 2011 03:23:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[10 Million]]></category>
		<category><![CDATA[Cdr]]></category>
		<category><![CDATA[Chunks]]></category>
		<category><![CDATA[Csv]]></category>
		<category><![CDATA[Current Version]]></category>
		<category><![CDATA[Dataset]]></category>
		<category><![CDATA[Datasets]]></category>
		<category><![CDATA[Fonality]]></category>
		<category><![CDATA[Gibberish]]></category>
		<category><![CDATA[Graphs]]></category>
		<category><![CDATA[Hassle]]></category>
		<category><![CDATA[Main Goal]]></category>
		<category><![CDATA[Ot]]></category>
		<category><![CDATA[Parser]]></category>
		<category><![CDATA[Parsing]]></category>
		<category><![CDATA[Possession]]></category>
		<category><![CDATA[Quirks]]></category>
		<category><![CDATA[Quite Some Time]]></category>
		<category><![CDATA[Raw Data]]></category>
		<category><![CDATA[Seamless Integration]]></category>
		<category><![CDATA[Twists]]></category>

		<guid isPermaLink="false">http://samreports.com/?p=1002</guid>
		<description><![CDATA[The new version of SamReports is in the making, to  provide seamless "integration" with Trixbox/Fonality SKU-s and big datasets...


Related posts:<ol><li><a href='http://samreports.com/blog/sam-reports-2-released' rel='bookmark' title='Permanent Link: SAM Reports 2 is released!'>SAM Reports 2 is released!</a> <small>The new version, SAM Reports 2 is out! There are...</small></li>
<li><a href='http://samreports.com/blog/version-coming' rel='bookmark' title='Permanent Link: New Version is coming SOON!'>New Version is coming SOON!</a> <small>New features coming into SAMReports 2 : multiple projects, detailed...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Update: 2011-12-07 : <span style="background-color: #ff99cc;">SAM Reports 2 has been launched</span>, as you may see on <a href="http://samreports.com/blog/sam-reports-2-released">this blog post</a>.</p>
<h2>Accessing sliced log files</h2>
<p>I&#8217;ve been working on a new version of SamReports for quite some time. My main goal was to provide seamless &#8220;integration&#8221; with Trixbox/Fonality SKU-s. (It&#8217;s not integration really, but the process of copying thousands of files from PBX, gluing them together, processing and so on, has to be transparent to the user, with as little hassle as possible, none preferably).</p>
<p>I came into possession  of a large dataset and that has helped  a lot. You cannot possibly simulate real, raw data to work with. You would just end up with gibberish. That brings the issue of processing..</p>
<h2>Big data</h2>
<p>Current version of SamReports tries to load all the data in memory, to generate reports. That just doesn&#8217;t work for millions of log lines.</p>
<p>The new version is capable of processing any amount of data, because it works in chunks, and generates reports sequentially. I tested on a dataset with more than 10 million lines in CDR, and it finished in 37 minutes.</p>
<div id="attachment_1004" class="wp-caption aligncenter" style="width: 555px"><a href="http://samreports.com/wp-content/uploads/2011/03/samreports_parser.png"><img class="size-full wp-image-1004" title="SamReports Parser for TrixBox and Fonality" src="http://samreports.com/wp-content/uploads/2011/03/samreports_parser.png" alt="Generating TrixBox and Fonality Reports" width="545" height="574" /></a><p class="wp-caption-text">SamReports Parser for TrixBox and Fonality</p></div>
<p>Above is the image of a summary generated after processing the log files. The graphs are being drawn during the parsing so that you&#8217;re not bored while processing a large dataset for the first time <img src='http://samreports.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  This is displaying the same charts to get an overview.</p>
<h2>Quirks and twists of master.csv (chopped or not)</h2>
<p>I did get dirty with the local  and transferred calls in CDR logs. Sometimes a call can be spanned in 5, 6 log lines. Those lines don&#8217;t necessarily come close, but can be even 1000 lines apart.</p>
<div id="attachment_1005" class="wp-caption aligncenter" style="width: 609px"><a href="http://samreports.com/wp-content/uploads/2011/03/local_calls.png"><img class="size-full wp-image-1005" title="master.csv calls on a local channel" src="http://samreports.com/wp-content/uploads/2011/03/local_calls.png" alt="master.csv calls on a local channel" width="599" height="132" /></a><p class="wp-caption-text">local channels in master.csv</p></div>
<p>Here you see a call spanned into just 2 lines, one after the other.</p>
<h2>To be continued&#8230;</h2>
<p>This is just a preview of what&#8217;s been cooking. There are many other things to mention, but I will do it in another post&#8230;</p>


<p>Related posts:<ol><li><a href='http://samreports.com/blog/sam-reports-2-released' rel='bookmark' title='Permanent Link: SAM Reports 2 is released!'>SAM Reports 2 is released!</a> <small>The new version, SAM Reports 2 is out! There are...</small></li>
<li><a href='http://samreports.com/blog/version-coming' rel='bookmark' title='Permanent Link: New Version is coming SOON!'>New Version is coming SOON!</a> <small>New features coming into SAMReports 2 : multiple projects, detailed...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://samreports.com/blog/version-samreports-support-trixbox-fonality-big-datasets/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>About beta and TrixBox-Fonality</title>
		<link>http://samreports.com/blog/beta-trixboxfonality</link>
		<comments>http://samreports.com/blog/beta-trixboxfonality#comments</comments>
		<pubDate>Sat, 27 Feb 2010 02:32:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[Cdr]]></category>
		<category><![CDATA[Csv]]></category>
		<category><![CDATA[Csv Data]]></category>
		<category><![CDATA[Default Master]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[Fonality]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Group]]></category>
		<category><![CDATA[Help Files]]></category>
		<category><![CDATA[I Don T Care]]></category>
		<category><![CDATA[Pbx]]></category>
		<category><![CDATA[Queue]]></category>
		<category><![CDATA[Screenshot]]></category>
		<category><![CDATA[Time Stamp]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Unix Time]]></category>
		<category><![CDATA[Xxxxxxxxxx]]></category>

		<guid isPermaLink="false">http://samreports.com/?p=945</guid>
		<description><![CDATA[The first five days of beta are behind me. Some people subscribed to the Google Group and others corresponded with me only via email. Very useful feedback so far, I&#8217;m satisfied with how all is going.
Update 2011-12-07 : SAM Reports 2 supports Trixbox/Fonality without any additional modules. Take a look at our new help files.
TrixBox [...]


Related posts:<ol><li><a href='http://samreports.com/blog/sam-reports-2-released' rel='bookmark' title='Permanent Link: SAM Reports 2 is released!'>SAM Reports 2 is released!</a> <small>The new version, SAM Reports 2 is out! There are...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>The first five days of beta are behind me. Some people subscribed to the Google Group and others corresponded with me only via email. Very useful feedback so far, I&#8217;m satisfied with how all is going.</p>
<p><span style="background-color: #ff99cc;">Update 2011-12-07 : SAM Reports 2 supports Trixbox/Fonality without any additional modules. Take a look at our <a href="http://samreports.com/help">new help files</a>.</span></p>
<h2>TrixBox (Fonality) issues</h2>
<p>I would really like to make reading the reports from TrixBox (Fonality) a bit easier. Sam Reports generates Asterisk reports from log files that are present on every Asterisk box by default (master.csv and queue_log). TrixBox slices the log files into a bunch of small files and puts them in  date-named directories . Let me describe it in details:</p>
<h3>Master.csv</h3>
<p>It is originally just one cvs file located in<span style="background-color: #ffff99;"> /var/log/asterisk/cdr-csv/</span><span style="background-color: #ccffcc;">master.csv</span> (I don&#8217;t care about the cdr-custom at the moment). On Fonality PBX, (I&#8217;m not sure that the situation is the same on all TrixBox SKUs), the master.csv data is placed in the same directory:  <span style="background-color: #ffff99;">/var/log/asterisk/cdr-csv</span><span style="background-color: #ccffcc;">/09-10-01/</span>,  but there are additional directories created there, on a weekly basis. So (the date &#8211; <span style="background-color: #ccffcc;">09-10-01</span> &#8211; corresponds to YY-MM-DD). A new directory is  created on Monday of each week , as stated in <a title="Fonality-TrixBox master.csv" href="http://help.trixbox.com/Reporting/Cdr_reports#Saving_the_data_to_a_file">Fonality help files</a>. I have copied all the files from Fonality PBX on my local PC, and below you can see a screenshot:</p>
<div id="attachment_947" class="wp-caption aligncenter" style="width: 367px"><a href="http://samreports.com/wp-content/uploads/2010/02/fonality_cdr_csv.png"><img class="size-full wp-image-947" title="Fonality (TrixBox) master.csv" src="http://samreports.com/wp-content/uploads/2010/02/fonality_cdr_csv.png" alt="Fonality (TrixBox) master.csv" width="357" height="135" /></a><p class="wp-caption-text">Fonality (TrixBox) master.csv</p></div>
<p>In each of these directories there are thousands of master.csv parts named: <span style="background-color: #ffff99;">Master.csv.xxxxxxxxxx</span>, where the xxxxxxxxxx is a UNIX time stamp (the number of seconds  elapsed since Jan 1, 1970). One such file is created every 5 minutes, on a Fonality PBX. The file named just &#8220;<span style="text-decoration: underline;">master.csv</span>&#8220;, that you see on the figure above, is the latest log that has not yet been stored in a directory and rotated.</p>
<div id="attachment_953" class="wp-caption aligncenter" style="width: 793px"><a href="http://samreports.com/wp-content/uploads/2010/02/fonality_master_dir.png"><img class="size-full wp-image-953" title="Fonality-TrixBox master.csv parts" src="http://samreports.com/wp-content/uploads/2010/02/fonality_master_dir.png" alt="Fonality-TrixBox master.csv parts" width="783" height="130" /></a><p class="wp-caption-text">Fonality-TrixBox master.csv parts</p></div>
<h3>Queue_log</h3>
<p>Originally queue_log file is located in <span style="background-color: #ffff99;">/var/log/asterisk</span>/<span style="background-color: #ccffcc;">queue_log</span>.  On Fonality-TrixBox  it is also dissected  into many parts, in much the same way.</p>
<div id="attachment_952" class="wp-caption aligncenter" style="width: 459px"><a href="http://samreports.com/wp-content/uploads/2010/02/fonality_queue_dirs.png"><img class="size-full wp-image-952" title="Fonality-TrixBox queue_log" src="http://samreports.com/wp-content/uploads/2010/02/fonality_queue_dirs.png" alt="Fonality-TrixBox queue_log" width="449" height="152" /></a><p class="wp-caption-text">Fonality-TrixBox queue_log</p></div>
<p>The original &#8220;<span style="text-decoration: underline;">queue_log</span>&#8221; file just holds the latest 5 minutes worth of information, and all other data is in files created by the same algorithm as CDR files.</p>
<div id="attachment_954" class="wp-caption aligncenter" style="width: 771px"><a href="http://samreports.com/wp-content/uploads/2010/02/fonality_queue_parts.png"><img class="size-full wp-image-954" title="Fonality-TrixBox queue_log parts" src="http://samreports.com/wp-content/uploads/2010/02/fonality_queue_parts.png" alt="Fonality-TrixBox queue_log parts" width="761" height="124" /></a><p class="wp-caption-text">Fonality-TrixBox queue_log parts</p></div>
<h3>Merging the files</h3>
<p>One of my beta testers wanted to try Sam Reports, but got only the 5 minutes worth of data. So I decided to make a little program to merge all the disjointed files into one, master.csv and queue_log respectively. If you ever have such need, you can download the file here: <a title="Fonality Log Files Merge" href="http://samreports.com/downloads/fonalitymerge.zip">FonalityMerge</a>.</p>
<ul>
<li>It requires that you have copied all the log files and directories from your Fonality box, somewhere on your local disk.</li>
<li>Then you merge the files with <a title="Fonality Log Files Merge" href="http://samreports.com/downloads/fonalitymerge.zip">FonalityMerge</a></li>
<li>And you get your master.csv and queue_log</li>
</ul>
<p>Now you can process the log files with Sam Reports and see your reports.</p>
<h3>Further improvement</h3>
<p>If I get enough inquiries for TrixBox/Fonality support I may opt to do one of the things:</p>
<ul>
<li>Make the transfer of directories from Fonality-TrixBox available with a click of a button. That would take into account just the diff between directories and files (the directories and files already present on the local disk would not be transferred any more)</li>
<li>Or go for the database option and connect directly to the MySQL database with the logs. To do that I would need a working TrixBox with a database that contains <strong>meaningful</strong> data.  Meaningful means real data generated by using a system for 5-6 month, at least.</li>
</ul>
<p>It would be great<span style="background-color: #ffffff;"> if someone could <a title="More details here-&gt;" href="http://samreports.com/blog/vm-operational-trixboxfonality">provide me with a virtual machine of a TrixBox PBX</a> that has been operational for some time.</span> I know it&#8217;s a long shot. I would be veeeery grateful.</p>


<p>Related posts:<ol><li><a href='http://samreports.com/blog/sam-reports-2-released' rel='bookmark' title='Permanent Link: SAM Reports 2 is released!'>SAM Reports 2 is released!</a> <small>The new version, SAM Reports 2 is out! There are...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://samreports.com/blog/beta-trixboxfonality/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

