Live chat

From ISPWiki
Revision as of 16:50, 19 April 2017 by Ksenya (talk | contribs) (Chat configuration file)
Jump to: navigation, search


In order to install a chat, navigate to "Integrations" --> "Modules"

After you have installed the chat, you will need to add SSL certificates. The chat is running via https. You can also configure departments at this step, see the information below.


Make sure that port 3002 is open in the Firewall on the server, where BILLmanager is installed.

Attention! Saving a certificate chain on CentOS servers may cause issues with authenticating staff members in Live chat. To resolve the issue, delete the certificate chain, or update (install) nodejs from the official web-site

Database management system on a remote serverе

If database is disabled on the server, where you install chat module. You should create file etc/billmgr.conf.d/chat.conf with settings before plugin installation:

ChatDbHost localhost 
ChatDbUser billchat
ChatDbPassword dbpassword
ChatDbName billchat
ChatDbConnectionLimit 100
path ChatSslKey ../sslcert/chat.key
path ChatSslCert ../sslcert/chat.crt
ChatSecret {Произвольная строка}
ChatPort 3000
ChatEmployeeName chatemployee
ChatEmployeePassword chatemployee_password

In this way module won't try to conncet to database during the installation, so it will be installed without errors.

Chat configuration

To start using the chat, you will need to configure a list of departments who will be able to work in chat, as well as list of staff members from those departments.

Chat domain

Note! A client area can run only on the domain name specified in Provider configuration form -- "Site URL".


In order to configure departments, navigate to the Providers module --> Edit


1. Available departments - a list of all departments, for which the chat is available. It also includes incoming departments.

2. Incoming departments - a list of departments that receive chats from clients. Then, a staff member can forward the chat to one of the available departments.

Staff members

You should grant access to chat to every staff member from department.


The icon in the "Parameters" column indicates that a staff member can answer in Live chat.


Adding live chat to your web-site

In order to add a live chat to your web-site, add two js-script into the page code:

<script type="text/javascript" src="https://BILLURL:3002/js/index.js"></script>
<script type="text/javascript">
   if (window.billChat)  {
           project: PROJECT_ID,
           lang: 'ru',
           backgroundColor: '#99c21c',
           borderColor: '#CCC',
           baseUrl: 'https://BILLURL:3002/'

  • BILLURL - URL of the billing panel or server where chat is located.
  • PROJECT_ID - project id in the billing panel (for BILLmanager Standard and Advanced it is always 1)
  • lang - client's interface language, e.g. en
  • backgroundColor - background color of client's interface.
  • borderColor - border color of client's interface.

A certain code for your billing panel can be found in provider's settings.

Configuration file

The configuration file is located in /usr/local/mgr5/etc/billmgr.conf.d/chat.conf

ChatDbHost localhost

ChatDbUser chat

ChatDbPassword NfutsDB9Qq

ChatDbName chat

ChatDbConnectionLimit 100

path ChatSslKey ../sslcert/chat.key

path ChatSslCert ../sslcert/chat.crt

ChatSecret aqSL2VNvZM

ChatPort 3002

ChatUrl https://cent7:3002

ChatEmployeeName chatemployee

ChatEmployeePassword k9lxkHeMs2


  • ChatDb* - chat database configuration
  • path ChatSsl* - relative paths to files of SSL certificates
  • ChatPort - port number
  • ChatUrl - chat server URL
  • ChatEmployee* - staff member, which synchronizes chat history with the billing panel, and creates incoming messages from client.

Restart the billing panel to apply the changes:

killall core

Restarting chat server

Execute the following command in order to restart the chat server:

systemctl restart billchat.service


Use the command to view logs:

journalctl -u billchat

To view real-time logs, specify -f:

journalctl -u billchat -f

General scheme

Chat scheme.png