E911_helper
Helper script for creating E911 addresses using api.nwsip.com and for setting caller ID and call routing in Switchvox PBX using api.switchvoxuc.com
Intended User(s)
This script is provided as working demo to document for users how they can create simple automations for managing their E911 addresses and setting correct caller id information on systems hosted at switchvoxuc.com.
You are encourgaged to create your own automation workflows using the provided API's and integrate them to your other existing services.
WARNING Changes made with API's are realtime. There is no rolling back. You should make sure that you are positive of your actions before commiting to them.
This script is very opinionated and may not match your workflow desires. You are encourgaged to make modifications as for your own needs and workflows.
Requirement
- You must have an active account with api.nwsip.com
- You must have an active account with api.switchvoxuc.com -- Your permission level must allow access to view and modify incoming and outgoing call routes.
Install
You must have python3.9+ installed to fun this script. Additionally you will need the requests and loguru library installed.
To run the application type python3 e911_helper.py. The first time you run the application you will receive an error of no-config file found. The system will generate an empty config for you in the same directory called config.json. You should configure the parameters here to match your settings and needs. All fields are required.
Configuration
Edit your config.json file and specify your credentials and settings.
SECUIRTY WARNING
**THIS IS NOT SECURE. YOUR PASSWORD IS NOT ENCRYPTED ANYONE WITH ACCESS TO THIS FILE WILL BEABLE TO STEAL YOUR CREDENTIALS. DO NOT STORE YOUR PASSWORD IN THIS FILE AS PLAN TEXT THIS IS FOR DEMO PURPOSED ONLY YOU SHOULD MODIFY THE SCRIPT TO YOUR USAGE NEEDS AND USE A PROPER ENCRYPTION/DESCRYPTION METHOD TO STORE YOUR PASSWORD, OR SIMPLY JUST PROMPT YOU TO ENTER THEM ON INITIAL START UP, CONSIDER USING A PROPER ENCRYPTION LIBRARY SUCH AS cryptography cryptography. **