{"id":780,"date":"2009-06-02T10:33:46","date_gmt":"2009-06-02T15:33:46","guid":{"rendered":"http:\/\/emresaglam.com\/blog\/?p=780"},"modified":"2009-06-02T21:17:29","modified_gmt":"2009-06-03T02:17:29","slug":"call-reports-in-freepbx","status":"publish","type":"post","link":"https:\/\/emresaglam.com\/blog\/blog\/2009\/06\/02\/call-reports-in-freepbx\/","title":{"rendered":"Call reports in FreePBX"},"content":{"rendered":"<p>I&#8217;ve been having hard time to understand the CDR reports from FreePBX. There were a lot of duplicates, lots of couple of second connection entries, etc&#8230; All I needed is to set a criteria and see the reports related to that criteria.<\/p>\n<p>So here is how it goes:<\/p>\n<ul>\n<li>I need only ANSWERED calls.<\/li>\n<li>I need only calls longer than 30 seconds.<\/li>\n<li>I need last 24 hours and also last month call reports.<\/li>\n<li>I want the script to be able to run on cron whenever I want to, so the output should be purely &#8220;emailable&#8221;<\/li>\n<li>At the end of the report I need the total talk time.<\/li>\n<\/ul>\n<p>So I came up with <a href=\"http:\/\/emresaglam.com\/cdrreports\">this perl script<\/a>. If you need similar stuff, please don&#8217;t hesitate to use it.<\/p>\n<p><strong>Here is a little howto:<\/strong><\/p>\n<p>First you need to edit the script to fit your database settings, it&#8217;s pretty self explanatory in the script itself.<\/p>\n<ul>\n<li><strong>cdrreports -d<\/strong> gives you the daily report (or the last 24 hours to be more precise)<\/li>\n<li><strong>cdrreports -m<\/strong> gives you the monthly report (or the last 30 days to be more precise)<\/li>\n<li>if you run cdrreports without any arguments, it will give you all the calls you made so far.<\/li>\n<\/ul>\n<p>Lastly, the way I use this script is by running from two cronjobs. One at night for the last 24 hours, and one every 1st day of the month for the monthly reports. It&#8217;s up to you how to use it \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been having hard time to understand the CDR reports from FreePBX. There were a lot of duplicates, lots of couple of second connection entries, etc&#8230; All I needed is to set a criteria and see the reports related to that criteria. So here is how it goes: I need only ANSWERED calls. I need &hellip; <a href=\"https:\/\/emresaglam.com\/blog\/blog\/2009\/06\/02\/call-reports-in-freepbx\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Call reports in FreePBX<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[9],"_links":{"self":[{"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/posts\/780"}],"collection":[{"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/comments?post=780"}],"version-history":[{"count":5,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/posts\/780\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/posts\/780\/revisions\/785"}],"wp:attachment":[{"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/media?parent=780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/categories?post=780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emresaglam.com\/blog\/wp-json\/wp\/v2\/tags?post=780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}