[Resolved] AsteriskNow 1.7 and CDR/Reports ... you must install addons

eMBeeJay's picture

On the standard 1.7 ISO is it expected that CDR and MySQL will automatically install?
To the point that you can use Freepbx/Reports and see the Call Detail?
So far I'm not able to get it to report Call details.

I see enough noise that makes me wonder if I have to install add-ons etc.

What I've done:
Fresh standard AsteriskNow 1.7 ISO install ... then one SIP extension, one SIP trunk, one incoming route and outbound route define. Able to make calls inbound and outbound. Go to Report and hit search and it says "No data found" the summary page says CDR install and mysql is running.


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

asterisk rights

CLC's picture

What is the output of:
grep session.save_path /etc/php.ini

In my case it is:
session.save_path = "/var/lib/php/session"

What are the rights of this directory (/var/lib/php/session)?
Change (chown) it to asterisk (user/group).


freepbx/reports or Call

eMBeeJay's picture

freepbx/reports or Call Monitor show no call

Did as you suggest ... same output .. /var/lib/php/session
was set to root .. changed to asterisk/asterisk

drwxrwxrwx 3 asterisk asterisk 4096 Jul 16 07:02 php
drwxrwxrwx 2 asterisk asterisk 4096 Jul 20 04:42 session

No change ... freepbx/reports or Call Monitor show no call details


change sessions

CLC's picture

Change (chown -R asterisk.asterisk) the contents of session.


eMbeejay, you're not alone.

capman's picture

eMbeejay, you're not alone. I have the same issue and have gone through every tip/trick to get it running that I found in these forums. I'm running AsteriskNow 1.7 out of the "cd" and the call reports do not work.

When I ran trixbox ce, the call reports worked, but it didn't like my T1 span card.


freepbx/reports or Call Monitor show no calls

eMBeeJay's picture

See below ... still no change

-rwxrwxrwx 1 asterisk asterisk 2297 Jul 16 12:52 sess_0i6mt6900fsetbka162u5k3sh0
-rwxrwxrwx 1 asterisk asterisk 563 Jul 18 11:19 sess_5gp13r397v3uj30bn8eklgq9r6
-rwxrwxrwx 1 asterisk asterisk 520 Jul 16 13:57 sess_6qt7iq1nkerrijdmjom0k9vph3
-rw------- 1 asterisk asterisk 2162 Jul 20 05:01 sess_afbigtbq11g2k1877uh2jfi4m5
-rwxrwxrwx 1 asterisk asterisk 2162 Jul 19 13:44 sess_dpc13ejc4994657m8s4qt74cn2
-rwxrwxrwx 1 asterisk asterisk 507 Jul 19 14:08 sess_gohe6q530agc48okpitrc04t03
-rwxrwxrwx 1 asterisk asterisk 502 Jul 20 05:40 sess_jt55ngs8a8jl1kttd7j4h2dod4
-rwxrwxrwx 1 asterisk asterisk 1610 Jul 18 11:18 sess_ke9nva13dik76u73m69e4ngc46
-rwxrwxrwx 1 asterisk asterisk 2162 Jul 18 10:29 sess_kv3ss56mn6so6sijuavheqdr86
-rwxrwxrwx 1 asterisk asterisk 581 Jul 18 10:28 sess_r1g6hp330v4hqr7lf05k6djqd0
-rwxrwxrwx 1 asterisk asterisk 379 Jul 16 14:02 sess_reofqt8efm221crram70hactk7
-rwxrwxrwx 1 asterisk asterisk 507 Jul 19 13:46 sess_s9j2ptgj34ltajs1nptg8tcvg0
-rwxrwxrwx 1 asterisk asterisk 563 Jul 18 16:02 sess_u1j9s45a5hjsn45fnduftu9n04


how to get cdr_addon_mysql.so installed and loaded

eMBeeJay's picture

I believe my CDR DB is empty ...

mysql> DESCRIBE cdr;
+-------------+--------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------------------+-------+
| calldate | datetime | NO | | 0000-00-00 00:00:00 | |
| clid | varchar(80) | NO | | | |
| src | varchar(80) | NO | | | |
| dst | varchar(80) | NO | | | |
| dcontext | varchar(80) | NO | | | |
| channel | varchar(80) | NO | | | |
| dstchannel | varchar(80) | NO | | | |
| lastapp | varchar(80) | NO | | | |
| lastdata | varchar(80) | NO | | | |
| duration | int(11) | NO | | 0 | |
| billsec | int(11) | NO | | 0 | |
| disposition | varchar(45) | NO | | | |
| amaflags | int(11) | NO | | 0 | |
| accountcode | varchar(20) | NO | | | |
| uniqueid | varchar(32) | NO | | | |
| userfield | varchar(255) | NO | | | |
+-------------+--------------+------+-----+---------------------+-------+
16 rows in set (0.00 sec)
mysql> select * from cdr;
Empty set (0.00 sec)

This is likely because

*CLI> module show like sql
Module Description Use Count
0 modules loaded

Therefore I understand that cdr_addon_mysql.so, res_config_mysql.so and app_addon_sql_mysql.so. are NOT there

a) how does this happen off of the standard ISO

b) more importantly how to fix??


So the install is not complete unless you install addons

eMBeeJay's picture

Do a "yum install asterisk16-addons"


yep that is what I going to

capman's picture

yep that is what I going to say. And if that doesn't work since yum kept complaining to me, just download the asterisk and asterisk-addons from http://www.asterisk.org/downloads.

Unpack each.
run ./configure to make sure you have all the dependencies
make clean
make
make install

After I did that, the CDR worked!


Same Happening to my Install

ziax's picture

Can you please post "idiot proof" instructions on the fix.
I have issues with yum. I managed to download the addons file
but I have no clue where it should sit and how the linux commands
work.

I installed from the 1.7 ISO and I have two issues one is the CDR/Call recording stuff and the other is a name resolving problem. My trunks are all configured using the ITSP's IP addresses instead of the usual format.

I look forward to hearing from you.

Regards

John


__________________

No Problems Only Solutions


Work Around

ziax's picture

I tried again to do the yum install for the addons.

Every time YUM failed I noted the host addresses for each of the update sources that yum was unable to reach and pinged them for their respective IP addresses.

I then placed this detail in the hosts file. Once I has got past all errors and put all relevant IP addresses in the hosts file, yum was able to complete the update procedure.

I did the same for a straight "yum update" and rebooted.

CDR's are now appearing and recorded calls are now seen in the call monitor in the voicemail GUI for the respective extension.

This procedure really was only a cheat and I need to get the name resolution issue fixed. If anyone has any ideas please let me know.

This is the way the system loaded from the AsteriskNOW 1.7 ISO I downloaded
from the Asterisk site.


__________________

No Problems Only Solutions


Hi, I have the same problem,

rgpfreepbx's picture

Hi,

I have the same problem, can you do a mini tutorial with the steps you follow to solve this problem?

Thanks in advance


I did the following:

stonet's picture

In Putty I ran yum install mysql-devel, yum install asterisk-addons-mysql and yum install asterisk-addons, this activated the CDR Mysql database. Do an amportal restart when you have completed the yum updates just to be sure everything is running normally.


Error: asterisk14-core conflicts with asterisk16-core

chibiconsulting's picture

When attempting:
yum install asterisk-addons-mysql
or
yum install asterisk-addons
this error message comes up.
Error: asterisk14-core conflicts with asterisk16-core
Any thoughts?


Do a "yum list asterisk*"

cosmicwombat's picture

Do a "yum list asterisk*" and see what you have installed.

Then from the list it should be fairly obvious as to which addons to install.


have same problem

Jaspernjasper's picture

Plz can any 1 show step by step to solve this problem..

When attempting:
yum install asterisk-addons-mysql
or
yum install asterisk-addons
this error message comes up.
Error: asterisk14-core conflicts with asterisk16-core
Any thoughts?


The RPM on my 1.6.2 system

peterbokunet's picture

Built from the same ISO, I had to [yum] install asterisk16-addons-mysql-1.6.2.1-1_centos5

The reason it's not included in the ISO was due, if I recall correctly, to licensing.

[root@insula ~]# yum -y install asterisk16-addons-mysql-1.6.2.1-1_centos5
Loaded plugins: fastestmirror, kmod
Loading mirror speeds from cached hostfile
 * addons: mirror.team-cymru.org
 * base: mirror.sanctuaryhost.com
 * epel: mirrors.xmission.com
 * extras: styx.biochem.wfubmc.edu
 * updates: mirror.team-cymru.org
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package asterisk16-addons-mysql.x86_64 0:1.6.2.1-1_centos5 set to be updated
--> Processing Dependency: asterisk16-addons-core = 1.6.2.1-1_centos5 for package: asterisk16-addons-mysql
--> Running transaction check
---> Package asterisk16-addons-core.x86_64 0:1.6.2.1-1_centos5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch    Version               Repository         Size
================================================================================
Installing:
 asterisk16-addons-mysql  x86_64  1.6.2.1-1_centos5     asterisk-current   47 k
Installing for dependencies:
 asterisk16-addons-core   x86_64  1.6.2.1-1_centos5     asterisk-current   32 k

Transaction Summary
================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 80 k
Downloading Packages:
(1/2): asterisk16-addons-core-1.6.2.1-1_centos5.x86_64.r |  32 kB     00:00     
(2/2): asterisk16-addons-mysql-1.6.2.1-1_centos5.x86_64. |  47 kB     00:00     
--------------------------------------------------------------------------------
Total                                            85 kB/s |  80 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : asterisk16-addons-core                                   1/2 
  Installing     : asterisk16-addons-mysql                                  2/2 

Installed:
  asterisk16-addons-mysql.x86_64 0:1.6.2.1-1_centos5                            

Dependency Installed:
  asterisk16-addons-core.x86_64 0:1.6.2.1-1_centos5                             

Complete!
[root@insula ~]# 

It should be just that easy.


__________________

--
Take the sardonic comments with a grain of salt.
(The rest is meant in earnest.)


thanx man

Jaspernjasper's picture

it worked great.....


Thought we had a winner...

kliedahl's picture

Well I thought the answer was in Peter's suggestion, but alas- I've gone through the process exactly as described, and still no CDR data!

Asterisk 1.6.2.11 (64-bit), FreePBX 2.8.0.4


Source OS?

peterbokunet's picture

Hi kliedahl,

What distribution did you install? If AsteriskNow 1.5.0 the yum command should be all that's necessary. Of course, amportal stop ; amportal start to bright it to life.


__________________

--
Take the sardonic comments with a grain of salt.
(The rest is meant in earnest.)


Hi again...

kliedahl's picture

Peter-

I'm sorry to report I can't recall the exact edition of AsteriskNow I installed, but I am able to supply you with almost everything else you'd need to know...

Asterisk 1.6.2.11, FreePBX 2.8.0.4.

I followed your instructions exactly, and amportal stop/restarted to no avail. In fact a warm reboot (# shutdown -r now) didn't fix it, either.

I thought perhaps something had gone awry (though I realize it's unlikely) with the installation, so I went to re-yum it, but yum explained there was nothing to do after checking to make sure the files were there. (Meaning the installation was complete, I presume.)

I'm running a 64-bit version of the software; I can't imagine this would have any bearing on the situation, as it looks like your instructions indicated you were as well, but it's about all I can think of that may be causing an issue.

I can virtually guarantee you it's not the server it's installed on; I built a monstrosity for this installation and have resources galore.

I would be delighted to hear any and all suggestions you may have: I'm pretty new to Asterisk (4 installations, this being the most complex) but know my way around marginally well in the installation.

Thank you for your patience and advice!


Even though this is a resolved issue...

kliedahl's picture

I thought I would let you know, Peter, that I needed to upgrade Yum THEN install the addons. I can't believe I didn't come up with that earlier but there we are- thank heavens for the Forum!

Thanks for your help, I really appreciate it!


Configuration fixup required

Maturity's picture

When I first did the install of the addons with yum, Asterisk failed to start. I found that it was necessary to modify the /etc/asterisk/res_mysql.conf. The configuarion file seems to be in the old format containing:

dbuser=asteriskuser
dbpass=amp109

Changing it to :

[asteriskuser]
dbpass=the-right-pwd

resolves the issue for me.

Just for reference this was for the AsteriskNow 1.7 CD, Asterisk 1.6 and FreePBX 2.8.

M


use asterisk16-addons-mysql-1.6.2.1-1_centos5

fsegato's picture

Be sure to install *exactly* asterisk16-addons-mysql-1.6.2.1-1_centos5 on AsteriskNow 1.7.0. More recent versions (1.6.2.3) do NOT work.
If you have 1.6.2.1-1, no chmod or chowns to /var/lib/php/session directory are necessary to have CDR up and running.

Francesco


Easier solution

Alvaro_Gonza's picture

Much easier:

So, I first did:
yum update asterisk16

Then did:
yum install asterisk16-addons
yum install asterisk16-addons-mysql
yum install asterisk16-addons-core

amportal restart

now CDR's are working!


Works Perfectly Thank you Alvaro!

zkmaster's picture

I was having the same issue with Asterisk 1.6.2.11. Your steps worked perfectly, thank you!


__________________

Regards,
Zaheer


Nice Summary

peterbokunet's picture

Thanks Alvaro!


__________________

--
Take the sardonic comments with a grain of salt.
(The rest is meant in earnest.)


You can do that, but then

AdHominem's picture

You can do that, but then you'll encounter the voicemail resequencing bug, which will cause you to lose all control over voicemails. Better to use asterisk16-addons-mysql-1.6.2.1-1_centos5 as recommended above.

Even better- use the FreePBX Distro!


cannot do it

tataghost's picture

thanks all for this post
but every time iam trying to run
[root@localmachine ~]# yum update asterisk1.6
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirrors.prometeus.net
* base: mirrors.prometeus.net
* elastix-base: repo-es.elastix.org
* elastix-extras: repo-es.elastix.org
* elastix-updates: repo-es.elastix.org
* epel: mirror.yandex.ru
* extras: mirrors.prometeus.net
* updates: mirrors.prometeus.net
Excluding Packages from CentOS-5 - Addons
Finished
Excluding Packages from CentOS-5 - Base
Finished
Excluding Packages from CentOS-5 - Extras
Finished
Excluding Packages from CentOS-5 - Updates
Finished
Setting up Update Process
No Match for argument: asterisk1.6
No package asterisk1.6 available.
No Packages marked for Update

i got these errors , iam runnig Asterisk 1.6.2.13
so what i shall do now ?


It's asterisk16 yum update

mrgoblin's picture

It's asterisk16

yum update asterisk16*


if i have no cdr, do i have a more fundamental issue?

ikjeft01's picture

what is it that controls whether the cdr actually get written at all? i'm not trying to run freepbx reporting (yet!), just looking for the cdr in cdr-csv directory. the directory exists, but is empty.


The CDR's are database

SkykingOH's picture

The CDR's are database driven.

To make CDR's work you must have (or the distro did it for you):

1 - Created a database to store the info (default asteriskcdrdb)
2 - Granted privs to the FreePBX MySQL user to use that database
3 - Setup /etc/asterisk/cdr_mysql.conf to use the DB in steps 1 & 1

That's all there is to it.

These types of things are the reason that distributions make for inept PBX administrators. You really need to go through the process of installing CentOS, MySQL, Apache (httpd), Asterisk and FreePBX from scratch to gain an understanding of how it all works together.

A basic understand of CentOS does not hurt either.


SkyKingOH: Yes and no

ikjeft01's picture

i completely agree that distributions make for inept PBX administrators. However, At the risk of starting a flame war... i got my cdr working, and they are most assuredly NOT database driven. they sit nicely in /var/log/asterisk/cdr-csv/Master.csv.

i had to create a cdr.conf in /etc/asterisk (as mentioned above, it's missing from the distribution, for whatever reason).

i added a section as shown below, restarted asterisk, and cdrs started happening

[csv]
usegmtime=yes ; log date/time in GMT. Default is "no"
loguniqueid=yes ; log uniqueid. Default is "no"
loguserfield=yes ; log user field. Default is "no"
accountlogs=yes ; create separate log file for each account code. Default is "yes"

no database required.


The CDR's are database

SkykingOH's picture

The CDR's are database driven if you want to look at the from FreePBX. You will now note that your reports tab does not work. Also you can't listen to call recordings or view your history from the user portal.

So you "no database required" is only true if you want to look at the CDR's with a text tool.

Looking down the thread you commented "not interested in FreePBX reports" I will lob the flame at you for hijacking a thread on FreePBX reporting.