Hello everyone,
I’m new in the world of asterisk, I’ve been working on it for only 1 month.
Today I have to set up a Server Asterisk 18.3 / Freepbx 14 on a Redhat. Successfull thing.
The system must be able to make an automatic call to a phone through a TCP request.
I was advised to use the ARI tool!
Here comes my problem… I can’t find many examples of how to install and use this tool. Could someone help me with the different points:
- Which Library to choose?
- How to install the library?
- How to test the library with a simple call script?
- Where do I start?
I have configured ARI and a User Ari through freepbx, this operation is functional.
You can initiate a call in Asterisk through ARI, a shell script, a python script, a manager command … ARI being the newest and probably the most complicated one.
so start by learning the basics first (asterisk -rx “originate …” , asterisk -rx “core show application originate” for help) then choose whichever suits your skills,
My favourite one is the manager interface.
I would like to make my Asterisk server make an automatic call to a phone.
And in a second time that the server performs an audio message in the conversation.
All this through ARI since I have to run this system with a TCP connection.
I would like to have some examples of script of this type.
Although I didn’t understand “a second time that”, this doesn’t sound like a typical case where ARI would be the best solution.
Accessing by TCP leaves a very large number of options open, including planting call files with FTP.
The nearest thing for which you are likely to find worked examples is click to call, for which I think all the worked examples will pre-date ARI’s introduction.
As a general point, this forum is best at giving you general pointers, for further research. You will have to be very lucky to get worked examples for your particular requirement, particularly if you over constrain the requirements.
I understand what you are saying, but isn’t ARI supposed to be an application that allows us to make our own communication applications, combining AGI and AMI? Did I misunderstand this?
To explain with more details:
A monitoring system will raise alarms, if an alarm goes up, this system will contact the Asterisk server which will execute an on-call procedure. I was advised to use ARI to do this, but I admit I’m a bit confused and don’t really see how to do this.
It is s protocol for implementing complex dialplan applications. It has nothing to do with AMI. It is currently overused, because it is new, and therefore fashionable.
This is an example using call files, rather than AMI or ARI. Most of it is about technical details on creating an announcement on the fly. Actually sending it is very simple.
You already have a successful call using AMI, my advice would be to stick to AMI, there are plenty of libraries that you can use.
ARI is not impossible but for someone who has yet to understand AGI and AMI and other basics it could be.
The Asterisk RESTful Interface (ARI) was created to address these concerns. While AMI is good at call control and AGI is good at allowing a remote process to execute dialplan applications, neither of these APIs was designed to let a developer build their own custom communications application. ARI is an asynchronous API that allows developers to build communications applications by exposing the raw primitive objects in Asterisk - channels, bridges, endpoints, media, etc. - through an intuitive REST interface. The state of the objects being controlled by the user are conveyed via JSON events over a WebSocket.
for me, it combined the AMI and AGI features.
Thanks for the links I will look at
However, I also have to implement a system that is just as complicated.
I am asked to implement an automatic on-call system that invites us to call another number to confirm an identity and then to listen to information about the system failure.
Alarm > On call > hang up > The on call person calls a number > confirms his identity by password > listens to the information about the alarm > hang up
Is it possible to do this with AMI?
ps: according to my superiors this kind of system has already been implemented with asterisk