Search code examples
restasteriskfreepbx

How to create/remove users on FreePBX+Asterisk using REST ARI & PHP


I have FreePBX distro installed (containing FreePBX 14 • Linux 7.4 • Asterisk 13) on one machine IP: 192.168.1.129.

I have another machine with XAMPP web server (MyWebApp) IP: 192.168.1.22.

I want to create and remove users in FreePBX from MyWebApp interface. FreePBX wiki says RESTful interaction is possible, however I'm stuck and more confused after going through FreePBX wiki links and Asterisk ARI documents.

Appreciate if anyone can clarify any of the following:

  • is it possible in the first place what I'm trying to achieve?
  • What needs to be enabled on FreePBX?
  • What additional needs to be installed on MyWebApp to interact with FreePBX?

Thanks in advance.


Solution

  • There is no native REST API for FreePBX, but there is a third-party module.

    However, there is no available documentation on that topic; refer to this thread: https://community.freepbx.org/t/rest-api-clarity/35740

    You also can always read the source code of the module or ask someone to write a syncing module for your need. Source code of FreePBX project is open-source.