Category

Tutorials

How to cleanup disk for asterCC server

By | Tutorials | No Comments

Note:  After you login to the server and execute the “df” command, you can check the current server file system disk space usage. You can use the command to get the hard disk is occupied by how much space, there is still have how much space and other information. Execute “du -sh” to view the total size of all files in the current directory.

1、AsterCC log

1.1、Script log

The fastest and easiest, check the log files are located in the /opt/asterisk/scripts/astercc/ directory, ending in “.log” and “.gz”. If very large can be empty them.
Under the path /opt/asterisk/scripts/astercc you can execute, empty them as follows:
> astcc_sysevents.log
rm astcc_sysevents.log.gz

Tips : If the emptied log has been released enough space, the following can be omitted. But if you want to cleanup more files look down.

1.2、System log

Completely closed asterCC system log,  need to modify /etc/astercc.conf file, set debug = 0 and save the file, execute command “service asterccd restart” to take effect. The command needs to be done when nobody is using the system.

1.3、System file

1.3.1、It is usually advisable to migrate the “data” and “statistics” directories in the /var/www/ html/asterCC/ to a directory with large disk space, and then back to execute command “ln -s” connect it.

1.3.2、In /var/www/html/asterCC/data directory, will store some downloaded audio files, such as: monitor_download directory, This is the path for download pbxcdr recording.

1.3.3、In /var/www/html/asterCC/statistics directory,store some Statistical data files.

1.3.4、PBX recording files stored in /var/spool/asterisk/ monitor directory, if useless then you can delete it. Whether monitor directory is moved to a larger disk space directory, and then execute command “ln-s” to connect it.

1.3.5、Agents evevts log is in directory /tmp/astcceventslog/ stored like name astercc eventsfile_date.log files, make sure agents events have no error, you can delete it.

2、Asterisk log

In directory /var/log/asterisk/,have files “full ” and “messages”, it is asterisk’s log file. Cleanup execute command “> full “, “> messages” , don’t need execute “stop” or “restart” command . If need close asterisk log,need modify /etc/asterisk/logger.conf file, to the end of the file the lines “full” and “messages” before add the “;”,save and exit file execute command asterisk -rx “logger reload” will be ready.

3、MySQL log

3.1、Move the database file location

In /var/lib/mysql directory,astercc10 is the asterCC’s database,when nobody is using the system,you can move it to other large space,afetr you can execute command  “ln -s ” to connect it.

3.2、mysql log

The mysql log file is /var/log/mysqld.log ,you can cleanup execute command “>/var/log/mysqld.log”.

4、Http log

http’s access log is file /var/www/html/asterCC/http-log/access.log , you can cleanup execute command “>/var/www/html/asterCC/http-log/access.log “.

5、PHP log

In /var/log/php-fpm directory,stored php’s log file “error.log ” and “www-error.log”.

6、Other logs

In /var/log/ directory,maillog、messages、cron、secure、yum、vmstart and other log files,the logs execute command “> file.log” to empty.

How to modify the astercc system database address

By | Tutorials | No Comments

Description: The files of the database configuration, mainly in astercc.conf and database.php two documents.

1、astercc.conf file

Open the /etc/astercc.conf file, you will see a lot of configuration labels, and [database] and [statistics] is the database mysql configuration, as follows:

Execute command "vim /etc/astercc.conf" to open astercc.conf file.

修改 astercc 系统 的 数据库 地址

修改 astercc 系统 的 数据库 地址

Field Description:

status: Whether to turn on this set.
dbtype: Databases type.
dbhost:MySQL’s address.
dbname: Database name.
dbport: MySQL’s port.
username:MySQL login username.
password:MySQL login password.
prefix: The astercc10’s tables prefix.
shortringsec: Recordings less than the value is not included in the statistics.

2、database.php file

Execute command to open /var/www/html/asterCC/app/config/database.php file, at the end of the file you will see “class DATABASE_CONFIG” label on the database mysql configuration, simply modify the default configuration can be, as follows:

vim /var/www/html/asterCC/app/config/database.php

修改 astercc 系统 的 数据库 地址

Field Description:

driver: Databases type.
persistent:Whether to set the database to stay connected status.
host:MySQL’s address.
login:MySQL login username.
password:MySQL login password.
database: Database name.
prefix:The astercc10’s tables prefix.
encoding:Database character encoding type.

Reference Document: asterCC’s official reference connection

The logs of system-related about asterCC

By | Tutorials | No Comments

Tips:  It is a file or file sets that saved operation for the event records including the kernel, services and system’s modules, different log file records different information. For example,some of the default system log file,records some specific modules.

1、Description of log files under /var/log/asterisk directory

Firstly,you need to enable logging function of asterisk.remove the note(semicolon) in front of the “messages => notice,warning,error” and “full => notice,warning,error,debug,verbose,dtmf,fax” in the file of /etc/asterisk/logger.conf,as shown below:

selection_141

Then,you can find serveral files named “full.xxxx” and “messages” under the direction of /var/log/asterisk.You can delete these files if you can ensure that no longer use them.

Tips:  No matter enabling or removing log files, it will worked only execute the following command after you finished:asterisk -rx “logger reload”
2、Description of log files under /opt/asterisk/scripts/astercc directory

How to enable the logging of asterCC ? You should update the value of field named “debug” in the file of /etc/asterisk/logger.conf,it belongs to [system],only “debug” is a integer that greater than 0,the logging of asterCC modules can be worked,for example:debug=2.It measns the logging function is disabled when debug=0.

After enabling the setting under /opt/asterisk/scripts/astercc directory,you will see several log files corresponding module,and the suffix of names are “.log”,such as:astcc_dialer.log,it is the log of pre-dial module.

selection_142

3、Description of log files under /tmp/astcceventslog directory

The records of calling events logged under /tmp/astcceventslog directory,the naming rule is:eventsfile_yearmonthday.log,the logs can be saved for 5 days recently by default.Generally speaking,don’t delete the call event logs of last 5 days,you must preserve the log files today.

selection_143

Use the link type customization to get the user’s location through the map

By | Tutorials | No Comments

1、【Customer】–>;【Customization】–>; “add” The map link field,”https://www.google.com/maps/place/##address1##” Set in the map jump through the “address one” query the user’s location on the map, as follows:
selection_136

2、Agent login WEB, select the corresponding campaign, open the customer information, find the newly added map transfer field, click to open the link, as follows:

selection_137

selection_138

3、Through the “address1” query on the location of customers in Google Maps are as follows:

selection_139

4、The link to the relevant map is shown below. The “???” section can be changed to the area to be linked:

【google map】
address: https://www.google.com/maps/place/???

Tips:  The data in the link can be replaced with the variable, the customer page click on this link, the use of customer information in the field automatically replace the corresponding variable. For example, the customer profile field name “## address1 ##” select “Address1” value, such as “https://www.google.com/maps/place/##address1##”.

Note: When you create a custom field for a map link type, the open link method needs to be opened in a New Browser Tab.

Agent settings only outbount the state still have a calling come in FAQ

By | Tutorials | No Comments

Agent settings only outbount the state still have a calling come in, as follows:

selection_131

  1. An agent login multiple agentgroups at the same time. Only one agentgroup set onlyoutbound , but the calling come in from other group queues.
  2. Because of the outbound calling is come in queue of the agentgroup, so when the calling through the Inbound route or IVR and the like set directly to the seat, causing confusion.

How to upgrade the asterCC system in the server background

By | Tutorials | No Comments

1、You can download the upgrade package on the page to the asterCC server /var/www/html/asterCC/data/_cache path, as follows:

selection_104

Click “UPGRADE” button to pop up the dialog box, the mouse moved to the dialog box “European Mirror” at the right mouse button click “European Mirror” pop-up right-click menu to get “Download Address”, as follows:

selection_128

2、Use the Linux wget command to download the upgrade package to /var/www/html/asterCC/data/_cache path, as follows:

wget https://download1.astercc.org/packages/core/core-2.6-rc1-patch-x86_64.tar.gz # Run the command to download the upgrade package at the address obtained

selection_105

selection_106

3、Unzip the downloaded file, and enter the folder to perform the installation operation, as shown below (in this case to upgrade astercc-2.6rc1 kernel as an example):

tar zxf core-2.6-rc1-patch-x86_64.tar.gz #Run command to unzip
cd core-2.6-rc1-patch-x86_64 #Execute the command into the decompression file
php install.php #Execute the command to perform the upgrade operation

selection_107

Tips: Please be patient to complete the upgrade operation, if the upgrade is successful, the upgrade process will finally prompt “successful”.

How to share files between linux and linux

By | Tutorials | No Comments

Note: ServerA(Provide shared space):192.168.1.81.ServerB(Mount the shared space):192.168.1.82. This article has a local asterCC server to mount another asterCC server recording folder as an example.

1、Ensure that the samba service is installed on Server A:

yum install samba

Tips:  If you have already installed samba above steps can be skipped.

2、After installation is complete, create a samba user and password on server A:

To create a samba user:
useradd sbu
Set the sbu password and enter 123456 when prompted:
smbpasswd -a sbu

Tips: If you have already set up a samba authentication user name and password, the above steps can be skipped.

3、Modify the samba configuration file /etc/samba/smb.conf on server A, and add the following at the end of the smb.conf file:


[ccmonitor] path = /var/spool/asterisk/monitor
comment = Home Directories
browseable = no
writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
create mask= 777
directory mask = 777
force user = asterisk

selection_114

4、restart the server A on the samba service:

service smb restart

5、On server B, perform the mount operation:

mount -t cifs -o username=sbu,password=123456 //192.168.1.81/ccmonitor /var/spool/asterisk/monitor

6、Server B, set the boot automatically mount:

VIM Edit /etc/fstab, add the following file, as follows.

//192.168.1.81/ccmonitor /var/spool/asterisk/monitor cifs defaults,username=sbu,password=123456 0 0

selection_115

7、To check if Server B is mounted:

df -hT

selection_113

8、Unmount on Server B:

umount //192.168.1.81/ccmonitor

Tips: If the host does not respond when the implementation of the mount, try to add the following iptables strategy.

To increase the inbound rules:
iptables -I INPUT -p tcp -m multiport –dports 139,445 -j ACCEPT
iptables -I INPUT -p udp -m multiport –dports 137,138 -j ACCEPT
To increase the outbound rule:
iptables -I OUTPUT -p tcp -m multiport –sports 139,445 -j ACCEPT
iptables -I OUTPUT -p udp -m multiport –sports 137,138 -j ACCEPT

How to migration the mysql’s databases directory to other device

By | Tutorials | No Comments

Tips: Make sure the system don’t running any work to do commands as follow.

Because of the large number of records caused by growing for databases,will take up a lot of hard disk space,so we should mount other devices to the local server, migrate the database directory to the mounted path, and then connect the directory to the server’s original location.

1、Stop the mysql server from the asterCC server

Login the CentOS system,view the mysql server is running as follows:
service mysqld status

Forexample:

selection_093

Make sure the system don’t running any work to do commands as follow:
service mysqld stop

Forexample:

selection_094

After stop mysql server please view the mysql server whether already stop.

2、The original database directory is backed up before the migration

Mount other device for asterCC server, forexample the /mnt directory or other directory from centos.

Migration the /var/lib/mysql directory copy to /mnt directory,as follows:
cp -Rp /var/lib/mysql /mnt

Forexample:

selection_095

Because of the databases is very lurge, please wait this command for some time.

The directory /var/lib/mysql,rename as mysql.bak, as follows:
mv /var/lib/mysql /var/lib/mysql.bak

Forexample:

selection_096

3、Link the new database directory to the original directory location

After copy the mysql directory,link the new database directory to the original directory /vra/lib, as follows:

ln -s /mnt/mysql /var/lib

Forexample:

selection_097

4、Start the mysql server

Strat the mysql server:
service mysqld start

Forexample:

selection_098

At this point you can view the status of the command to see whether the mysql is running,make sure can loginthe mysql system, view the call records for verification.
After all operations have been confirmed to be successful, you can delete the original data directory mysql.bak backup file to save the server space.

The php write operation could not be performed because of a configuration file permission error

By | Tutorials | No Comments

Tips: Sometimes encounter import or manual installation of modules, WEB page configuration file can not be loaded, there may be php operation permissions.

In the astercc system the php execute permissions for asterisk users and groups,you can check /etc/php-fpm.d/www.conf the file user and group parameters are the following:

selection_071-1

If it is not possible to change it manually, or in order, do the following.

sed -i "s/user = .*/user = asterisk/" /etc/php-fpm.d/www.conf
sed -i "s/group = .*/group = asterisk/" /etc/php-fpm.d/www.conf

A Sonicwell Product · Also: CXMind AI · WCC Contact Center