Predictive Dialer Tips
Tracing Spam Hacks with Postfix
Written by ProDialers
Many Asterisk servers will have Postfix installed to accommodate the
mail function (FreePBX, Elastix, A2Billing etc.). Any server open to the
web with Postfix is especially interesting for lamers and injecting
spambots.If your server has been infected, finding a particular spambot script is easy.
Step 1: Temporarily stop Postfix
service postfix stop ~or~ pkill -9 postfixStep 2: Show entire Postfix queue and select a random spambot-generated email:
postqueue -pStep 3: Locate the script generating the spam email by tracing the email ID. Example:
postcat -q EMAILIDHERE 37DStep 4: Clean or remove the infected script completely and start the Postfix service
Updating all user and phone password in ViCiDial from the command line
Written by ProDialers
To simultaneously update all of the username and phone passwords in
ViCiDial, please log in to your MySQL (or PhpMyAdmin, if available) and
run the following SQL statements:UPDATE phones set pass='Your_Password',conf_secret='Your_Password' where user_level=1;
UPDATE vicidial_users set pass='Your_Password',phone_pass='Your_Password' where user_level=1;
Deleting ViCiDial list records with missing information
Written by ProDialers
Some list vendors will often sell low-quality dialer lists with a lot
of missing information. As an example, here is a command to delete all
records with missing Last Name field within the list '123'. You can
permutate last with first or any other column:DELETE from vicidial_list WHERE list_id='123' AND last_name='';To run a similar query which would delete all records with a certain string in the Last Name field within the same list, use the following SQL:
DELETE from vicidial_list where list_id='123' and (last_name LIKE '%is_name%' OR first_name LIKE '%STRING_HERE%');
Removing a valid IP from IPTables
Written by ProDialers
To remove a valid IP address from the iptables, log in via SSH and enter the following commands:iptables-save > tmp_fileRemove / delete the line containing the valid IP address
nano tmp_file
iptables-restore < tmp_file & iptables-save
Searching for a string in Asterisk
Written by ProDialers
If you wish to search for a certain string in Asterisk only (Example:
only show carrier congestion), launch the Asterisk CLI along with the
grep command, i.e.:asterisk -rvvvvv | egrep -i "string"Example (showing only congestion notices / errors)
asterisk -rvvvvv | egrep -i "congested"
Deleting recordings older than X days
Written by ProDialers
To remove recordings older than X days (i.e. 30 days), SSH into your dialer and run the following campaign:find /var/spool/asterisk/monitorDONE/MP3 -type f -mtime +30 -exec rm {} \;
Resetting only specific call statuses within a specific campaign
Written by ProDialers
Sometimes, admin would like to change / reset only specific dial
statuses within only specific campaign - i.e. Reset all NA, NI, NP and
similar statuses while keeping others (like DNC, SALE etc.) intact.To do so, log SSH in and open mysql:
mysql -ucron -p1234Afterwards, run the following command (Example - reset all statuses for all lists in campaign ID 4000 except for leads, callbacks and DNC):
use asterisk
update vicidial_list set status='NEW' where list_id in (select list_id from vicidial_lists where campaign_id='4000') and status not in ('DNC','DNCL','CALLBK','CBHOLD','SALE');
Database Size and Deleting Logs
Written by ProDialers
Small, clean database will always perform better than a huge one.In order to see what is the total size of all the databases in the dialer, log in via SSH and run the following command:
du -kh /var/lib/mysqlTo check the size of the asterisk database only, you can run:
du -kh /var/lib/mysql/asteriskTo delete logs, run the command below:
TRUNCATE `vicidial_user_log`;TRUNCATE `vicidial_monitor_log`;TRUNCATE `vicidial_log_extended_archive`;TRUNCATE `vicidial_log_extended`;TRUNCATE `vicidial_log_archive`;TRUNCATE `vicidial_log`;TRUNCATE `vicidial_email_log`;TRUNCATE `vicidial_email_list`;TRUNCATE `vicidial_did_log`;TRUNCATE `vicidial_dial_log`;TRUNCATE `vicidial_cpd_log`;TRUNCATE `vicidial_closer_log_archive`;TRUNCATE `vicidial_closer_log`;TRUNCATE `vicidial_carrier_log_archive`;TRUNCATE `vicidial_carrier_log`;TRUNCATE `vicidial_api_log_archive`;TRUNCATE `vicidial_api_log`;TRUNCATE `vicidial_agent_skip_log`;TRUNCATE `vicidial_agent_log_archive`;TRUNCATE `vicidial_agent_log`;TRUNCATE `vicidial_admin_log`;TRUNCATE `user_call_log`;TRUNCATE `recording_log`;TRUNCATE `park_log`;TRUNCATE `call_log_archive`;TRUNCATE `call_log`;TRUNCATE `callcard_log`;Warning: You will not be able to recover the logs afterwards, meaning, all of your call logs will be permanently deleted after this.
ViCiDial / GoAutoDial Suppression List
Written by ProDialers
Creating a suppression list can be very
useful when ordering new data / lists from data providers, helping you
avoid purchasing duplicates.
To create a suppression list, login via SSH and run the following commands:
mysql -uroot -p
When prompted, enter your password. The default for GoAutoDial is vicidalnow, ViciBox - blank.
use asterisk;
SELECT distinct phone_number INTO OUTFILE '/var/www/html/vicidial/suppression.zip' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM vicidial_list;
If you would like to create a suppression list for a single campaign only (in this example, campaign 1234, pelase run the following query instead:
SELECT distinct phone_number INTO OUTFILE '/var/www/html/vicidial/suppression.zip' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' FROM vicidial_list WHERE list_id in (SELECT list_id from vicidial_lists WHERE campaign_id=1234);
When the command has finished, open your
browser and navigate to http://your-dialer-ip/vicidial/suppression.zip
and download the file.
Rename the file from .zip to .csv.
Monitor / Barge Problem on GoAutoDial 3.3
Written by ProDialers
GoAutoDial CE 3.3 monitoring and barge function do not work out of the box. To fix this, log in via SSH and run the following commands:yum install glibc.i686Voila!
Answer all prompts with "Y"
usr/share/astguiclient/ip_replay/relay_control start
Updating to GoAdmin 3.3
Written by ProDialers
1. Append the goautodial-testing repo
# nano /etc/yum.repos.d/goautodial.repo
2. Update Vicidial to 2.7RC1
# yum -y update
Make sure to check the active version:
# cat /usr/src/vicidial/version
...and to change your MySQL password to your original password, if needed
# mysqladmin -pvicidialnow password "myoriginalpassword"
3. Update GOautodial-CE package
# yum -y update goautodial-ce --enablerepo goautodial-testing
GoAdmin 3.3 "No Live Calls" Problem
Written by ProDialers
After updating your GoAutoDial 3.0 CE to the GoAdmin 3.3, some users
experience that although calls seem to be going fine in the Asterisk
CLI, the agent screen (or the AGC) serve no live calls to the agent. If
so, please check the following:- That you have updated your Asterisk to 1.8
- That you have updated ViciDial to 2.7
If any of the two hasn't been completed, follow the steps below:
Update GoAutoDial 2.1 CE to 3.0
Written by ProDialers
1. Backup your data
Ideally, export your whole database2. Check if your running version
Your version GOautodial CE 2.1 and your MySQL password is the default "vicidialnow".
# cat /etc/vicidialnow-release
# mysqladmin password vicidialnow -p
Enter password: ...
3. Install the GAD yum repository
# cd /etc/yum.repos.d/
# wget http://downloads2.goautodial.org/centos/5/goautodial.repo
4. Remove conflicting packages
# rpm -e dahdi-linux dahdi-linux-devel dahdi-linux-kmdl-2.6.18-238.9.1.el5.goPAE dahdi-tools munin munin-node --nodeps
5. Update system
Install GOautodial specific configuration and reboot (answer prompts with Y)
# yum update
# yum install goautodial-ce goautodial-ce-config
# reboot
6. Edit your PHP configuration
# nano /etc/php.ini
Make sure your config is as follows:- memory_limit = 128M
- short_open_tag = On
- max_execution_time = 360
- max_input_time = 360
- post_max_size = 64M
- upload_max_filesize = 64M
- default_socket_timeout = 360
Installing Fail2Ban on a CentOS server
Written by ProDialers
If you are running a predictive dialer (or any kind of Asterisk server) or a web hosting server, you have probably experienced often hacker/lamer brute force
attempts. These attacks can be easily blocked by implementing optimal
server configuration, using a good Firewall (i.e. SonicWall, PfSense,
Tomato) etc. A very useful method of blocking brute force attacks is
installing Fail2Ban, which will block the attacker from
accessing your server through SSH, Asterisk... for a specified period
of time after a number of unsuccessful login attempts.
The following guide explains installation of Fail2Ban service on a CentOS server.
1. Install
If you haven't done it already, download the EPEL repository:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
When the repository has been downloaded, install fail2ban:
# yum install fail2ban
2. Configure
Editing the main config file (jail.conf) is not something you should do. Create a local copy of the jail file:
# cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
Setup your preferences by editing the jail.local file:
# nano /etc/fail2ban/jail.local
You will find the Asterisk section
around the middle. Make sure that you whitelist your own external IP
address and to keep the 127.0.0.1 in place. We strongly suggest setting
the bantime to a much higher value (i.e. one week - 604800 seconds)
3. Restart Fail2Ban
Restart Fail2Ban:
# sudo service fail2ban restart
Voila!
MySQL Repair Function
Written by ProDialers
When experiencing database problems, most often manifested by an
outbound dialing issue or a time syncronization issue, try running the
following command from your SSH client:mysqlcheck -u cron -p 1234 --auto-repair --check --optimize --all-databases
Resolving the problem "Extension not found" on ViCiDial
Written by ProDialers
With certain dialer installations
experiencing problems with outbound dialing, the dialing process can be
slow or the calls might not go through at all. In this case, open your
SSH Client (i.e. we use Putty) and connect to the Asterisk CLI:
asterisk -vvvr
If your CLI gives you an error/notice similar to: "Extension not found" or similar, please:
- Check if your dialplan is correct and you are not dialing more or less numbers than you should be
- Make sure that your lists contain only numbers of the correct length.
I.e.
USA numbers are always 10 digit long. To make sure that all of the
numbers in your dialers' lists are 10 digit numbers, log on to your
PHPMyAdmin (if installed) or use SSH to connect to the MySQL:
mysql -uroot
use asterisk
When connected to either, run the following command:
delete from vicidial_list where length(phone_number)!=10
This
will remove any rows from the vicidial_list table containing numbers
which are shorter or longer than 10 characters, that is, digits.
Voila!



Aucun commentaire:
Enregistrer un commentaire