{"id":71,"date":"2010-10-24T11:15:53","date_gmt":"2010-10-24T14:15:53","guid":{"rendered":"http:\/\/blog.digavoip.com.br\/2010\/10\/24\/implementando-cdr-asterisk\/"},"modified":"2014-08-06T20:48:04","modified_gmt":"2014-08-06T23:48:04","slug":"implementando-cdr-asterisk","status":"publish","type":"post","link":"https:\/\/blog.abratel.com.br\/?p=71","title":{"rendered":"Implementando CDR asterisk"},"content":{"rendered":"<p>1 &#8211; apt-get install mysql-server, libmysqlclient15-dev<br \/>\n2 &#8211; Compilar o asterisk-addons:<br \/>\n.\/configure<br \/>\nmake<br \/>\nmake install<br \/>\nmake samples<br \/>\n3 &#8211; Configurar o \/etc\/asterisk\/cdr_mysql.conf para conextar no asterisk<br \/>\n[global]<br \/>\nhostname=127.0.0.1<br \/>\ndbname=asteriskcdrdb<br \/>\ntable=cdr<br \/>\npassword=senha<br \/>\nuser=root<br \/>\nport=3306<br \/>\nuserfielt=1 <\/p>\n<p>4 &#8211; Fazer download da tabela pronta cdr.sql<br \/>\nAp\u00f3s intruduzir no mysql:<br \/>\nmysql -u root -p <cdr.sql \n\n5 -Reinicializar o asterisk e ver se conectou: cdr mysql status \n\n6 - apt-get install apache2, php5, php5-mysql, php-pear, php5-gd, php5-cli \n\n7 - Baixar o asterisk stat pt br aqui: <a href=\"http:\/\/blog.abratel.com.br\/wp-content\/uploads\/2010\/10\/relatorio.tar\">RELATORIO<\/a> <\/p>\n<p>8 &#8211; Copiar o conte\u00fado do asterisk stats para \/var\/www\/<br \/>\ncp * \/var\/www -r <\/p>\n<p>9 &#8211; Comentar a linha do cdr.php (\/var\/www\/) onde se diz session_start(); <\/p>\n<p>10 &#8211; Editar o arquivo defines.php (\/var\/www\/lib\/defines.php)<br \/>\nEdit defines.php e alterar os parametros de acordo com sua necessidade. <\/p>\n<p>define (&#8220;WEBROOT&#8221;, &#8220;http:\/\/192.168.254.254\/relatorio\/&#8221;);<br \/>\ndefine (&#8220;FSROOT&#8221;, &#8220;\/var\/www\/html\/relatorio\/&#8221;); <\/p>\n<p>FSROOT: This is the server path which contain the application.<br \/>\nExample: \/home\/users\/asterisk-stat\/<br \/>\nHOST: 127.0.0.1<br \/>\nExample: localhost<br \/>\nPORT: 3306<br \/>\nExample: 5432<br \/>\nUSER: root<br \/>\nExample: username<br \/>\nPASS: Database password of the user.<br \/>\nExample: password<br \/>\nDBNAME: asteriskcdrdb<br \/>\nExample: asteriskcdr<br \/>\nDB_TYPE: mysql<br \/>\nsupport: mysql and postgres<br \/>\nDB_TABLENAME: Table of the database containing the CDR.<br \/>\nExample: cdrtable<br \/>\nappli_list: PHP array used to associate extension to a name. This can be useful if you want to give more signification during the CDR browsing<br \/>\n$appli_list[&#8216;4677&#8217;]=array(&#8220;Voicemail&#8221;);<br \/>\n$appli_list[&#8216;6544&#8217;]=array(&#8220;Conference-MeetMe&#8221;); <\/p>\n<p>11 &#8211; Entre no browser e teste. :) <\/p>\n<p>NO FREEBSD e CENTOS tive que alterar dois parametros no php.ini<br \/>\nshort_open_tag = On<br \/>\nerror_reporting = E_ALL &#038; ~E_NOTICE &#038; ~E_STRICT &#038; ~E_DEPRECATED<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 &#8211; apt-get install mysql-server, libmysqlclient15-dev 2 &#8211; Compilar o asterisk-addons: .\/configure make make install make samples 3 &#8211; Configurar o \/etc\/asterisk\/cdr_mysql.conf para conextar no asterisk [global] hostname=127.0.0.1 dbname=asteriskcdrdb table=cdr password=senha user=root port=3306 userfielt=1 4 &#8211; Fazer download da tabela pronta cdr.sql Ap\u00f3s intruduzir no&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/71"}],"collection":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=71"}],"version-history":[{"count":6,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":657,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions\/657"}],"wp:attachment":[{"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.abratel.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}