Skip to content

VincvanAs/3cx-API-Database-access

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

3cx-PDO-access

BEFORE STARTING -> IF YOU DON'T KNOW WHAT YOUR DOING, MESSING WITH THE 3CX DATABASE CAN BRING LARGE PROBLEMS AND COULD MAKE THE FUNCTIONS NOT WORK PROPERLY

For external access to the 3cx database

  1. Make sure you've installed & enabled PDO
  2. require('vendor/autoload.php');
  3. Add & Save the next line to C:\Program Files\3CX Phone System\Data\DB\pg_hba.conf : host all all <IP from request server or 0.0.0.0/0 for accept all>/32 password E.G. host all all 123.456.789.0>/32 password

Database connection:

$pdo = new PDO('pgsql:host=;port=;dbname=database_single', 'phonesystem', '');

You can find the database info on: Windows: C:\Program Files\3CX Phone System\Bin\config.json Linux: /var/lib/3cxpbx/Instance1/Bin/3CXPhoneSystem.ini

Example: $pdo = new PDO('pgsql:host=123.456.789.0;port=5480;dbname=database_single', 'phonesystem', 'Welcome01234!');

See files for Queue calls example.

More follow in the future.

About

For external access to the 3cx database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages