It takes you through the PBX-side configuration for external applications, some basic sanity-checks using curl, a simplified python script which just does the query, and finally on to the full script for adding the extension. The official FreePBX Distro offers the easiest way possible to install and configure an Asterisk-based open source phone system on a server or virtual environment. It makes use of three GraphQL APIs to query the existing extensions, create a new extension, and apply the updated configuration. In the tutorial we write a “new hire” script to automatically add an extension to your PBX using Python. One perennial question in the FreePBX forum is “How can I add a new extension programmatically?” With the recent improvements of the GraphQL API for FreePBX and PBXact, we thought we could give a more comprehensive answer to this question, and at the same time produce a tutorial for how to use GraphQL from a script, which can serve as a starting point for anyone looking to use any of the ever-expanding list of GraphQL interfaces.įor more information about GraphQL in FreePBX and PBXact, please refer to earlier blog posts GraphQL support in FreePBX 15 and Expanding FreePBX GraphQL APIs, as well as the GraphQL PBX APIs Documentation
0 Comments
Leave a Reply. |