Hi everyone,
I’m planning to build a wallboard for my FreePBX 17 system, but I’m not sure how to get started with GraphQL. What do you think would be the easiest way to fetch caller data via the API and use it to build a website?
Hi everyone,
I’m planning to build a wallboard for my FreePBX 17 system, but I’m not sure how to get started with GraphQL. What do you think would be the easiest way to fetch caller data via the API and use it to build a website?
API GraphQL Explorer - PBX GUI - Sangoma Documentation (atlassian.net)
GraphQL PBX APIs Documentation - PBX GUI - Sangoma Documentation (atlassian.net)
or
AMI Default Configuration in 16 - PBX GUI - Sangoma Documentation (atlassian.net)
Asterisk Managers User Guide - PBX GUI - Sangoma Documentation (atlassian.net)
Connect to AMI:
Use a library like AsterNET for .NET, PAMI for PHP, or py-Asterisk for Python to connect to AMI.
Example in Python using py-Asterisk:
from asterisk.manager import Manager
manager = Manager()
manager.connect(‘localhost’)
manager.login(‘yourusername’, ‘yourpassword’)
response = manager.send_action({‘Action’: ‘QueueStatus’})
print(response)
manager.close()
Yes; it’s better.
The data are sent in real time.
With GraphQL, you need to send a request often and there is some latencies for getting a result.
With AMI, you receive the data along the water. Just need to parse them and extracting values.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.