1. Bicom Systems
  2. Solution home
  3. PBXware
  4. HOWTOs

How to: CLI Commands


CLI stands for Command-Line Interface. It is a text-based method for interacting with a computer or software program by entering commands into a terminal or console. In a CLI, users type specific textual commands, often accompanied by arguments and options, to perform tasks, configure settings, and execute various functions.


This document is a guide for general information about CLI commands which can be used for troubleshooting PBXware systems. Visit this link for more detailed guide: https://support.bicomsystems.com/a/solutions/articles/67000725750



GENERAL:

In this section commands for performing some basic actions will be listed:


COMMAND

DESCRIPTION

/opt/pbxware/sh/pbxware restart

Restarts PBXware services (NOTE: Performing this command will cause downtime)

/opt/pbxware/sh/pbxware reload 

Reloads PBXware

/opt/pbxware/sh/pbxware http_api_resave

Resaves configuration from backend

/opt/pbxware/sh/sngrep

Entering sngrep tool

/opt/pbxware/sh/mysql 

Entering mysql

asterisk -rvvv 

Entering asterisk CLI




Here is the list of the most important directories:


All logs can be found under the path /opt/pbxware/pw/var/log/

All configuration files can be found under the path /opt/pbxware/pw/etc/


Location for recordings: /opt/pbxware/pw/var/spool/asterisk/monitor/

Location for voicemails : /opt/pbxware/pw/var/lib/asterisk/voicemail

Location for asterisk sound files: /opt/pbxware/pw/var/lib/asterisk/sounds/

Location for moh: /opt/pbxware/pw/var/lib/asterisk/moh/

Location for asterisk configuration files: /opt/pbxware/pw/etc/asterisk/

Location for polycom firmware and phone configuration files: /opt/pbxware/pw/tftp

Location where asterisk core dumps are being saved: /opt/pbxware/pw/tmp



LOG FILES:


Log file is a text file that contains records of events, activities, and messages generated by the operating system, system services, and applications. Log files are essential for system administrators and users to monitor and troubleshoot various aspects of the system's performance and behavior.


You can view the contents of log files using text editors or command-line utilities such as catless, or tail. For example, you can use the tail command to view the last few lines of a log file in real-time, which is often useful for monitoring ongoing events. There commands are being used if you want to check the most recent log file, but if you want to check older log files which are compressed (.gz) format, the command to check it is zcat.



Below is a table with list of PBXware services, purpose of the services and log files location:


SERVICE

PURPOSE

LOG FILE

Asterisk 

Main service in charge for handling calls

/opt/pbxware/pw/var/log/asterisk/messages

MYSQL

Database which stores all data on the system.

/opt/pbxware/pw/var/log/mysql/mysqld.err

CRM

Provides integration with different CRM solutions

/opt/pbxware/pw/var/log/crmiservice/crmiservice.log

PHP

PHP

/opt/pbxware/pw/var/log/php/php.log

PNS

Push notification service

/opt/pbxware/pw/var/log/pns/pns.log

LDAP

Service used as a LDAP server for providing contact information to phones

/opt/pbxware/pw/var/log/ldap_directory/ldap_directory.log

SMS

Service for sending/receiving SMS messages

/opt/pbxware/pw/var/log/smsservice/sms.log

NGINX

Processes HTTP/HTTPS and TFTP requests

/opt/pbxware/pw/var/log/nginx/localhost.ssl_access_log
/opt/pbxware/pw/var/log/nginx/localhost.access_log

RPS

Service in charge for remote provisioning 

/opt/pbxware/pw/var/log/rps/rps.log

E-mail to Fax

Sending faxes via e-mail

/opt/pbxware/pw/var/log/email2fax/email2fax.log

Remote-fs

Storing files from the PBXware to a chosen remote storage

/opt/pbxware/pw/var/log/remote_fs/log.log

Rsproxy

Downloading/listening to the remote content that is offloaded to a remote storage from the PBXware.

 /opt/pbxware/pw/var/log/rsproxy/rsproxy.log

PWPROXY

Gateway to the Unified Communications platform based on Asterisk (gloCOM related)

/opt/pbxware/pw/var/log/pwproxy/pwproxy.log

Ignoo connector

Service in charge for meeting module

/opt/pbxware/pw/var/log/ignoo-connector/connector.log

SMTP

Handling e-mail requests

/opt/pbxware/pw/var/log/ssmtp/msmtp.log

Clickhouse server

New fast database for statistics

/opt/pbxware/pw/var/log/clickhouse-server/clickhouse-server.log

stats_proxy

Centralized statistics proxy service which maintains a connection between two databases: ClickHouse and MySQL

/opt/pbxware/pw/var/log/stats_proxy/stats_proxy.log

Dialer (CC)

Automates the process of dialing numbers in a Call center

/opt/pbxware/pw/var/log/dialer/dialer.log

/opt/pbxware/pw/var/log/dialer/clir/…

Agentpool (CC)

Handles agent actions (logging, pausing, receiving calls), maintaining and publishing agent states

/opt/pbxware/pw/var/log/agentpool/agentpool.log



Restart commands:


Here is the list of restart commands which could be executed if there are issues with specific service, these restart commands are service specific, so they will affect that specific service:


SERVICE

RESTART COMMAND

PNS

/opt/pbxware/sh/pbxware restart pns

LDAP

/opt/pbxware/sh/pbxware restart ldap_directory

SMS

/opt/pbxware/sh/pbxware restart smsservice

E-mail to fax

/opt/pbxware/sh/pbxware restart email2fax

Remote-fs

/opt/pbxware/sh/pbxware restart remote-fs

Rsproxy

/opt/pbxware/sh/pbxware restart rsproxy

PWPROXY

/opt/pbxware/sh/pbxware restart pwproxy

Ignoo-connector

/opt/pbxware/sh/pbxware restart ignoo-connector

Dialer

/opt/pbxware/sh/pbxware restart dialer