-
Install node.js (4+) and npm
If its already installed but on an older version then you need to update
1.1 Update node with the following command
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
and then add node 8 with this command
nvm install v8.16.2
1.2 Install GIT
yum install git
- Install global npm packages used to build webcdr:
npm -g install bower browserify
2.1 Clone webcdr into freepbx server
git clone https://github.com/fokenhelpmy/webcdr.git
-
Install bower dependencies:
cd PATH_TO_WEBCDR/public bower install cd ..
-
Install npm dependencies:
npm install
-
Build frontend:
npm run build
-
Import the webuser table into mysql/mariadb located in webcdr/install/ folder
mysql asteriskcdrdb < webuser.sql (add username and password if you are not using the standard root profile i.e mysql -uroot -p asteriskcdrdb < webuser.sql)
-
Add another field into the asterisk cdr database following these instructions line by line
mysql (add username and password if you are not using the standard root profile i.e mysql -uroot -p) use asteriskcdrdb; ALTER TABLE `cdr` ADD `newid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY;
-
Exit mysql and stay in the webcdr folder
-
Set database credentials, recordings glob pattern and other parameters in config.ini
-
Start the server (HTTP on port 9030 by default):
node server.js
Use
admin
/admincdr
to login for the first time. Don't forget to change the default password! -
Use a process manager like forever, pm2, systemd to run server in background.
-
(optional) Set up standalone webserver to serve static files, proxy dynamic requests to node.js.