Skip to main content

No project description provided

Project description

Auto-Training Dialer

Automate customer trainings over the phone with no human intervention.

Authors

Overview

This system automates calls to customers throughout a campaign, scheduling diferent trainings per week depending on which level customer is on. Human intervention is only needed on initial upload of numbers.

It involves using peewee to manage all database interactions, sockets for connection to Asterisk via AMI port to initiate calls, and reading a log file written by Asterisk to reschedule customer for another training or same training depending on whether they listened to previous training for at least a specified number of seconds.

Features

  • Upload customer campaign details to database
  • Auto call customers
  • Redirect customer call to custom asterisk dialplan to play training audio
  • Move customer through the training modules depending on whether they successfully listened to previous module
  • Retry failed calls at same time throughout the week till successful

Installation

Requirements:

  python 3.6+

Install these modules:

pip install peewee
pip install pymysql

Asterisk AMI & Database:

  • Add your database and AMI credentials in database.ini file
  • If these scripts are not running on same server having AMI & DB, make sure remote access is allowed.
  • Variables; clid (phone_number), dialer (name of autodialer), language, level (level of training whose recordings you should play, 0 is for week recording about when customer wants to be called), type (type of campaign incase one dialer is used for multiple campaigns)

Settings:

Go to configs/seetings.py to make changes to settings like:

  • Time frame script is allowed to call customers
  • Path to asterisk_log file
  • When campaign is supposed to start, this determines when customer calls are to be scheduled
  • You dialplan context & target where customer calls are supposed to sent on pickup, which should contain the logic for playing recordings etc

Usage/Examples

Have your frontend application upload .csv file with columns in this order; phone_number, customer_language, campaign_type.

  • Training_level of 0 is auto assigned on initial upload
  • First row is ignored, assumed to be for column names even though they're optional

Have your application execute this script with full path to location of uploaded file and name of autodialer.

  • The uploaded file is meant to be deleted by this script after reading it, make sure parent folder has (wx) permissions. Example:
python3 upload.py /var/www/html/customer.csv finance_dialer
  • This script will read numbers from csv and upload to database.

Create cronjob that executes the calling script at top of hour to call all customers scheduled for that day that hour

Example:

0 7-18 * * * /usr/bin/python3 calllogic.py call dialer_name

Create a cronjob that runs script that checks log file to see if a number was called and listened to a training recording for at least a specific number of seconds.

Example:

0 22 * * * /usr/bin/python3 calllogic.py update dialer_name

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dialer-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dialer-0.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file dialer-0.1.0.tar.gz.

File metadata

  • Download URL: dialer-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for dialer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a8dc65db96653643870f6b8b4e39a08e4879a802eae9e988cbccb14ad3485f8
MD5 ab165cf4f2e3e471f7c017255b53dff3
BLAKE2b-256 a5e25db08a0356a418f37026d46057d9b3e6bc7cd48f2f7b20825dbe884a0fa9

See more details on using hashes here.

File details

Details for the file dialer-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dialer-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for dialer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6da59fb22c46606d0b4dd8ada88ca58dca133e148a174a084b8720ef0bdb684
MD5 df93b04129918d8698ff34a8c29eb1f2
BLAKE2b-256 403ecf4ceab5552b6864ff455e1b6c1c0a4129205b7b5a7ec0055d109ba0ebfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page