This is a new number management app for the EMF Phone Team at Events, The goal of the app is to allow users to regsiter custom extensions and get appropriate credentials or configuration to use those with different Types of Service (DECT, SIP, Cellular, POTS etc)
It will then expose provisioning feeds to the telephone systems to create the relevent configuration based on the ToS.
The aim it to make the platform configurable to support multiple new ToS without requiring code changes, eg if someone wants to stand up a pager system and admin can then create a new ToS.
Admin - Has elevated privileges to configure the system (this is using the django admin interface) Operator - Has privileges to assign permissions to users, modify user services and allocate privileged numbers User - Regular user, can create and update their own extensions and service parameters Guest - Unregistered user, can view some public information such as directory.
The application is built in django, for development purposes it uses a local sqlite3 database that is created by django
The only requirement currently is Python 3, Django 5.0 or later and the django-extensions package for clearing the database, other requirements may be added to the requirements.txt
file as the project develops.
Clone this repository
git clone https://github.com/emfcamp/numbermanagement
Enter directory
cd nms
Install requirements
pip install -r requirements.txt
Rename the example.env file, (you should be fine with dummy values in there if you're not sending provisioning messages to the phone system.)
mv example.env .env
First time you will likely want to clean and setup the database, Either:
run bash ./clean_setup_db.sh
(which does all of the below for you)
OR run the following commands
python manage.py reset_db
ls -R */migrations/000*.py | xargs rm
python manage.py makemigrations
python manage.py migrate
This will leave you with an empty database, if you want to populate the db with some sample data run
python manage.py loaddata fixture.json
This adds 3 users to the platform, user
operator
% admin
all with the password of numberwang
You will also have an active event called development, Groups, DECT, SNOM & POTS type of service and some sample numbers.
Start the dev server
python manage.py runserver
Should now be running on localhost:8000
You can access the admin interface on /admin