Skip to main content

Automate customer trainings over the phone with no human intervention.

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.2.tar.gz (9.6 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.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialer-0.1.2.tar.gz
  • Upload date:
  • Size: 9.6 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.2.tar.gz
Algorithm Hash digest
SHA256 84771b01258225e917b5b33272861830c24a361b030479e2e44e3f88e7752c0a
MD5 88e12cd3f39838377271171c403de608
BLAKE2b-256 e4f1f231bb916fcc98edc04a3c0c83b4c23e55b1eb98033df1bd5f00815a263f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 712ba2099289e912dbd04f58f772817935727c535c1479f53998b9d249cc2325
MD5 3b46b3c9bfdbad32f471269969eff83a
BLAKE2b-256 ddca3f48d3a48219c703a588cbdcc96f077360fb00496fb0e3f5595914ac2779

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