14 May

Enabling / Disabling the 3CX Session Border Controller Log on a Raspberry Pi Device (v12)

Important Article Update 04/06/2014: After some troubleshooting and testing in conjunction with 3CX support, it is not possible to disable the 3cxsbc.log in the current version of 3CX SBC v1.0.0.35608 on Raspberry Pi. This issue should be resolved with the next major release of software.

The 3CX Session Border Controller Log is disabled by default on a Raspberry Pi installation. The reason for this is that the log file size can grow and wind up consuming  too much space on the SD Card which would cause the OS to crash.

The setting that enables / disables 3CX Session Border Controller logging is located in the 3CX Session Border Controller configuration file. The configuration file is located in /etc/3cxsbc.conf. Upon installation the beginning of the log file should look as follows:

3cxconf file

The yellow highlighted line is the setting  that is used to enable or disable the 3CX SBC log.

Enabling the 3CX SBC Log

By default the following line is commented out disabling the log:

# File = “/var/log/3cxsbc.log”

To enable the log you need to edit the 3cxsbc.conf file. Use the following command via SSH. Alternatively, you can access the file via winSCP and edit it that way instead. Keep in mind to save the file you will probably need root access so ensure that you log into the Raspberry Pi device with the root login.

nano /etc/3cxsbc.conf

Once inside the 3cxsbc.conf file you can then remove the ‘#’ from the front of the line that enables or disables 3cxsbc logging. Your file should now look like this.

File = “/var/log/3cxsbc.log”

Now press Ctrl+X to exit the file. You will be asked to save the file. Press ‘Y’ for yes and then press enter to save your changes.

The next step is to restart the 3cxsbc service using the following command:

service 3cxsbc restart

Logging is now enabled. The 3cxsbc log file can be located at /var/log/3cxsbc.log.

Remember it’s very important not to leave logging enabled for an extended period of time as doing so will eventually crash the OS.

Disabling the 3CX SBC Log

If you have enabled the log for testing and now want to disable it you need to do the following:

Use the following command via SSH. Alternatively, you can access the file via winSCP and edit it that way instead. Keep in mind to save the file you will probably need root access so ensure that you log into the Raspberry Pi device with the root login.

nano /etc/3cxsbc.conf

Once inside the 3cxsbc.conf file you need to comment out the line that enables or disables 3cxsbc logging by placing a ‘#’ at the beginning of the line. Your file should now look like this.

#File = “/var/log/3cxsbc.log”

Now press Ctrl+X to exit the file. You will be asked to save the file. Press ‘Y’ for yes and then press enter to save your changes.

The next step is to restart the 3cxsbc service using the following command:

service 3cxsbc restart

Now we need to clear out the contents of the 3CX SBC log file. The log file is located at /var/log/3cxsbc.log. You can edit the file either by SSH or using WinSCP.  Once the file is open select the contents and then delete them. Save the file.

Be sure to delete the file contents (not the file itself).

Logging is now disabled.