Mjölnir is a contact/call centre ('hammer') load tester that uses Twilio's Programmable Voice to make calls through.
Project sponsored by SOAS, University of London.
You need to be running either:
- Debian 'buster' 10
- Ubuntu 'focal' 20.04
- Microsoft Windows 10 with WSL 2
You will need to install the dependencies with:
sudo apt-get update
sudo apt-get -y install --no-install-recommends ca-certificates git python3-virtualenv virtualenv
Now set up the project with:
git clone https://github.com/jimdigriz/mjoelnir.git
cd mjoelnir
virtualenv -p python3 venv
./venv/bin/pip3 install -r requirements.txt
From inside the project directory run:
export TWILIO_ACCOUNT_SID=AC...
export TWILIO_AUTH_TOKEN=bd...
./venv/bin/python3 mjolnir.py --from +1... --to +1...
Statistics are regularly printed (default is every 5 seconds, changeable with --stats-interval
) and you can quit the tool by pressing Ctrl-C
at any time.
You can use the following to see a description of all the arguments you can use to control the tool.
./venv/bin/python3 mjolnir.py --help
Some of the options are described here:
- Credentials:
--twilio-account-sid
[required]: Twilio Account SID- will use the environment variable
TWILIO_ACCOUNT_SID
if set
- will use the environment variable
--twilio-auth-token
[required]: Twilio Auth Token- will use the environment variable
TWILIO_AUTH_TOKEN
if set
- will use the environment variable
- recommended you supply credentials securely via environment variables
- Telephone numbers:
--from
[required]: number you are claiming to call from--to
[required]: number you are dialling
- Calls:
--calls-max
(default:10
): maximum hard limit of simultaneous calls--call-duration
(default:120
): call duration before hanging up in seconds--call-duration-fuzz
(default:20
): percentage of random fuzz to add to call duration
- Rate limiting:
- uses a Token Bucket to rate limit calling
--rate-limit
(default:10.0
): calls per second- can be set to values less than
1.0
(for example0.2
means one every five seconds)
- can be set to values less than
--rate-limit-burst
(default:1
): burstable calls allowed before rate limiting takes effect