Hello,
I am trying to build my first ARI to create simple call.
So from where I should start?
I started with https://wiki.asterisk.org/wiki/display/AST/Getting+Started+with+ARI
Add Stasis application in dialplan (to use Asterisk ARI with FreePBX)
but I faced some difficulties, the documents available not that clear to me.
I am using FreePBX 13.0 asterisk 13.
I wrote this for TimeTrex a while ago (and updated it for FreePBX 13). It explains a way to interface phones with an Asterisk script. This one happens to talk to how to make TimeTrex clock-in/out work, but the actual script can be anything.
A very basic example (start template?)
package.js
{
"name": "hello-world",
"version": "1.0.0",
"description": "cool kids document stuff",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "AGPLv3",
"dependencies": {
"ari-client": "^1.1.1",
"freepbx": "http://mirror.freepbx.org/npm/freepbx-1.0.0.tgz"
}
}
index.js
var client = require('ari-client');
var FreePBX = new require("freepbx")();
FreePBX.connect().then(function(freepbx){
client.connect('http://127.0.0.1:8088', freepbx.config.FPBX_ARI_USER, freepbx.config.FPBX_ARI_PASSWORD)
.then(function (ari) {
//stuff
ari.start('hello-world');
})
.catch(function (err) {});
});
I did steps in GUI also, this the result
I know i did something wrong
it needs more steps declaration for me
Yes, I set it
but it didn’t enable in ari configuration file so I changed manually after that I have to work with composer which requires PHP >= 5.4.0 version, FreePBX coming with 5.3.28 version, a lot of things went wrong with this setup; now am trying to do it from scratch again.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.