2022-04-20 11:48:48 -07:00
2022-01-20 15:26:38 -08:00
2022-02-01 03:56:10 -08:00
2022-01-20 15:26:38 -08:00
2022-04-20 11:48:48 -07:00
2022-02-01 02:03:29 -08:00

Disclaimer

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.

Setup Virtual Enviroment.

Setup a virtual enviroment to run your application form.

mkdir e911_helper
cd e911_helper
python3 -mvenv venv

Activate the virtual enviorment and install required packages

source venv/bin/activate
pip install --upgrade pip requests loguru

If you are using Windows, you will need to adjust the above commnads to your OS needs.

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. **

Description
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
https://voice1.com
Readme 194 KiB
Languages
Python 100%