Create Queues, Time conditions,... via script


(Dotcom) #1

Hi all,

What is the best way to create Queues, Time conditions, Inbound routes via a (PHP) script?
I tried setting up a PHP file with:

include ‘/etc/freepbx.conf’;
print_r(FreePBX::Core());

… to use the built-in functions of FreePBX. But I already get the error:

Unable to locate the FreePBX BMO Class ‘Core’

Thanks!


(Itzik) #2

If you are using FreePBX 15, take a look at the new GraphQL API.


(Dotcom) #3

Hi, it seems the GraphQL API is really limited for the moment.

There is no endpoint related to Queues / Time conditions according to https://wiki.freepbx.org/display/FPG/GraphQL+PBX+APIs+Documentation

Or did I miss something?