Follow these steps to set up the repository for the first time:
Visit https://github.com/webdevtodayjason/callcenter-testing to verify that your code has been pushed successfully.
-
Create a
.env
file based on the.env.example
template:cp .env.example .env
-
Edit the
.env
file with your actual Twilio credentials and other configuration:TWILIO_ACCOUNT_SID
: Your Twilio account SIDTWILIO_AUTH_TOKEN
: Your Twilio auth tokenTWILIO_PHONE_NUMBER
: Your Twilio phone number in E.164 formatBASE_URL
: Your ngrok URL (for local development) or production URLFLASK_SECRET_KEY
: A secure random string for session managementADMIN_USERNAME
: Username for accessing the application (default: admin)ADMIN_PASSWORD
: Password for accessing the application (default: password)ELEVENLABS_API_KEY
: Your Eleven Labs API key (for enhanced TTS)ELEVENLABS_VOICES
: JSON object mapping voice names to Eleven Labs voice IDs
conda create -n callcenter python=3.11
conda activate callcenter
pip install -r requirements.txt
If you're developing locally and need to receive Twilio callbacks:
- Download and install ngrok from https://ngrok.com/download
- Run ngrok to create a tunnel to port 5005:
ngrok http 5005
- Copy the HTTPS URL provided by ngrok (e.g., https://a1b2c3d4.ngrok.io)
- Update the
BASE_URL
in your.env
file with this URL
python app.py
The application will be available at http://localhost:5005.
- Open your browser and navigate to http://localhost:5005
- Log in with the admin credentials set in your
.env
file - Enter at least one phone number in E.164 format (e.g., +12345678900)
- Configure your call settings
- Click "Start Calls" to initiate test calls
If you encounter issues:
- Check the console logs for error messages
- Verify your Twilio credentials are correct
- Ensure ngrok is running if testing locally
- Confirm your Eleven Labs API key is valid (if using Eleven Labs TTS)