How to monitor SBC connection on 3CX server

Status
Not open for further replies.

Victor Camacho

Bronze Partner
Basic Certified
Joined
Jan 7, 2019
Messages
21
Reaction score
8
Hello,
I am trying to figure out why my SBC server is disconnected when it connects to the 3CX server. See "SBC on Debian get disconnected" thread from Jan. 14, 2019.
One suggestion was to see what is happening on the 3CX server side.
I turned the Activity log on to verbose and did not see anything related to the SBC server.
I checked a few logs in /var/log and did not see anything.
I did capture but not sure it has any value.
Any suggestions on how to see what is happening on the 3CX server during the connection?
Thanks in advance.
 
Hello @Victor Camacho

There are 2 logs that can provide information about the connection of the SBC to the PBX. From the PBX side you can look into the tunnel log. From the SBC side you will need to enable verbose logging to see detailed logs. You can do so from the SBC config file. You will need to replace the "ERR" with "Verbose" and restart the SBC service.
Please note that you should not leave Verbose running for an extended period of time as it is CPU and HDD demanding.
 
@Victor,

While you try to figure out what happened. here are two elements you can put into a cron script to run every 5 minutes:
-------------------------------------------------------
This checks to see if the SBC tunnel is up
-------------------------------------------------------
X=$( netstat | grep -c 5090 )

if [ $X -eq 0 ]; then
sudo service 3cxsbc stop
sleep 10
sudo service 3cxsbc start
fi

-----------------------------------------------------------------
This checks to see if the SBC has disconnected
uses the 3cxlog with level WARNING
if using SYSLOG changes are necessary
-----------------------------------------------------------------
LOG="/var/log/3cxsbc.log"

if sudo grep -q "Tunnel disconnected" $LOG
then
sudo service 3cxsbc stop
sleep 10
sudo service 3cxsbc start
sudo truncate -s 0 $LOG
fi
 
Last edited:
  • Like
Reactions: YiannisH_3CX
Status
Not open for further replies.

Forum statistics

Threads
111,911
Messages
589,698
Members
164,779
Latest member
affinity123