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.1.tar.gz (9.3 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.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dialer-0.1.1.tar.gz
  • Upload date:
  • Size: 9.3 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.1.tar.gz
Algorithm Hash digest
SHA256 5c2dd4713dfb7acb1f7add7c5903761c42439bc4fa58a437aa83bf886daafb57
MD5 7f51dd13fb6157172c779adc8006946e
BLAKE2b-256 fb9104325afc5bc79461e0d7c37355ad6e3f275692b3446835eda0a736175a3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dialer-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d532be2411120706d59283052e99eb00e2fa0123d4359d0ca53f49c5a0238a6
MD5 837b7c8012db2f31e75af0d6eac78fc9
BLAKE2b-256 4c7de969a97269c1c119f23f77a1cbc7d78b052728255a9adbc6cf1a46b92289

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