alkivi-sas / 3cx-python-scripts

Various scripts for 3CX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3cx-python-scripts

Some scripts in python for 3CX

Requirements

You need postgresql-server-dev-X.Y installed on the server You also need python3-dev. If using Debian based system :

PSQL_VERION='9.6'
apt-get install postgresql-server-dev-${PSQL_VERION} python3-dev

You also need to create a PostgreSQL Role to be able to write to the specific database. As the postgres user on the server :

psql
CREATE ROLE freshdesk_to_3cx NOSUPERUSER NOCREATEDB NOCREATEROLE NOINHERIT LOGIN PASSWORD 'password' VALID UNTIL 'infinity';
GRANT CONNECT ON DATABASE database_single TO freshdesk_to_3cx;
exit

psql database_single
GRANT USAGE ON SCHEMA public TO freshdesk_to_3cx;
GRANT ALL ON public.extdevice TO freshdesk_to_3cx;

Installation

The easiest way to install is inside a virtualenv

  1. Create the virtualenv (Python 3!) and activate it:
git clone https://github.com/alkivi-sas/3cx-python-scripts
cd 3cx-python-scripts
pipenv install
  1. Change the conf file :
cp .config-example .config
vim .config

Usage

  1. From a terminal :
pipenv shell
./scripts.py

About

Various scripts for 3CX

License:GNU Lesser General Public License v3.0


Languages

Language:Python 100.0%