Step 1: Navigate to the /opt directory
   cd /opt

Step 2: List contents to check if 'voiptools' directory exists
   ls

Step 3: Create the 'voiptools' directory if it does not exist; otherwise, navigate to it
   To Create: sudo mkdir voiptools
   To Navigate: cd voiptools

Step 4: List contents to check if '3cx_competitive_wallboard' directory exists
   ls 

Step 5: Create the 3cx_competitive_wallboard directory if it doesn't exist, then navigate into it
   To Create: sudo mkdir 3cx_competitive_wallboard
   To Navigate: cd 3cx_competitive_wallboard

Step 6: Download the installer ZIP
   sudo wget https://installers.voiptools.com/Downloads/20.0/3CXWB/3cx_competitive_wallboard_linux_20.0.23.zip

Step 7: Unzip the installer
   sudo unzip 3cx_competitive_wallboard_linux_20.0.23.zip

Step 8: Set executable permission for the main application file   
   sudo chmod +x "3CX Competitive Wallboard"

Step 8a: Configure the application
   Open the configuration file:
        sudo nano /opt/voiptools/3cx_competitive_wallboard/appsettings.json

   Set "ConnectionStrings" -> "DefaultConnection" for your SQL Server:
        Data Source=<host>;Initial Catalog=<dbname>;User Id=<user>;Password=<pwd>;TrustServerCertificate=True;

        For <host> use IP,port (for example 192.168.1.50,1433). SQL Authentication is required;
        Windows Integrated Authentication is not available on Linux.

   Set "AppSettings" -> "ExporterDatabase" to the database the 3CX Exporter writes call records into:
        "ExporterDatabase": "<exporter dbname>"

        It must be on the same SQL Server as the connection string above.

   The file is read at start-up, so restart the service after any later change:
        sudo systemctl restart voiptools_competitivewallboard.service

 Note: Step 9,10,11,12 are need to execute first time only to setup the service or any change in the service file.

Step 9: Navigate to the 'Services' directory
   cd Services

Step 10: Copy the service file to systemd directory
   sudo cp voiptools_competitivewallboard.service /etc/systemd/system/

Step 11: Navigate to the systemd directory
   cd /etc/systemd/system

Step 12: Enable the service to start on boot
   sudo systemctl enable voiptools_competitivewallboard.service

Step 13: Start the service
   sudo systemctl start voiptools_competitivewallboard.service

 Note: Step 14 and 15 are for checking the service status

Step 14: If the service fails to start, check logs. First stop the service then try to start manually
   To stop the service
        sudo systemctl stop voiptools_competitivewallboard.service
   To check the logs
        journalctl -u voiptools_competitivewallboard.service
   After checking the issue and solved it then start it using service file
        sudo systemctl start voiptools_competitivewallboard.service

Step 15: Check service status
   sudo systemctl status voiptools_competitivewallboard.service
