Open luckyboy125 opened 1 year ago
Have You Tried Enable the ARI in Config files? If it's not You Should enable it,
Your code seems fine but you have to connect to ari when the server is initialized, try using Node-lifecycle
the will ensure that when your server is started it will connect to the ARI endpoint
and remember the ari restapi default endpoint is http://ip:8088/ari
Hi, @RizeKishimaro
I installed Asterisk server in my Ubuntu PC. I tried to connect Zoiper 5 soft phone to Asterisk server and it worked well. I connected using local IP address. (192.168.**.***) I tried to connect to Asterisk server in Node.js server. Here is my code: `const client = require("ari-client");
const ENDPOINT = "PJSIP/100";
client.connect( "http://{my global IP address}:8088/ari", "6001", // username "mypassword", // password function (err, ari) { console.log("Connecting to Asterisk Package!"); if (err) { console.log("Asterisk Error : ", err); return; } }) `
When I tried with local IP address, it's failed w/ errno -111. (HostIsNotReachable) But when I run that code, I get nothing. Even I couldn't see any logs in terminal. If it's succeeded, I have to see any log among them. I am not sure what the problem is in the connection.
Hope to hear from you soon. Thank you.
Good morning @AimHigh0601 , you asterisk runing in your machine?, the config ari.conf have enabled =yes?, the config ari.conf have comment the rule allowed_origins? You has send capture ari.conf?
Thank you, @dorlanpabon I just changed asterisk user info, and also tried with it. But it didn't work, same error.
@AimHigh0601 , you use the user aritest and password in ariclient? restart diaplan or restart asterisk with now config? Example: client = await ariClient.connect("http://localhost:8088", "aritest", "testme");
Yes, I run this code
delete ari of URL , "http://localhost:8088/"
It doesn't work.
in my case work, with http://localhost:8080
Try delete / of URL; you has meet and review?
Try
curl -u aritest:testme http://localhost:8088/ari/asterisk/info
view http.conf and propertie "bindport" and "bindaddr" and "enabled"
Please check these.
uncoment line enable=yes in line 29
A Question, the virtual machine have communication with your pc?
I run the node server in that virtual machine. I will try again after I activate line 29.
Wow, it worked. But I got this error (warning).
This warning is a recomendation, but not is an error
Note: Not speak english, i am speak spanish, i am practice jejejej
Thank you, @dorlanpabon May I ask you more?
Can I make an outbound call to global phone number using ARI?
If anyone has implemented an outbound calling system using ARI, please let me know how you did it. Thank you.
Hola @dorlanpabon Puedo preguntarte más?
Puedo hacer una llamada saliente a un número de teléfono global usando ARI?
Good morning @AimHigh0601 , for call outbound global, you must have a trunk provider. example: https://www.didww.com/coverage-and-prices/sip-trunking-pricing
If you have a sip trunk with user and password, you was do edit config asterisk to connect the sip trunk for call outbound
ARI in the end is a API of asterisk, to manage actions, example, play audio, route call, make call, but asterisk has connect to sip to was do call outbound global
¿Quieres decir que tienes experiencia en el servicio DIDWW? Si es así, tengo algunas preguntas. 1. ¿El servicio DIDWW proporciona Rest API para iniciar, transferir y finalizar una llamada y rastrear una llamada (obtener eventos de clave)? 2. ¿Qué softphone proporciona DIDWW? De lo contrario, ¿qué podemos usar para ello? 3. ¿Su sugerencia es que podemos obtener un troncal SIP de DIDWW y administrar una llamada a través del servidor Asterisk? En este caso, ¿funciona correctamente para las dos preguntas anteriores? Gracias. @dorlanpabon
@AimHigh0601 , you can buy sip trunk, after connect asterisk to the sip trunk, then management the call with asterisk using ARI
Entiendo. Gracias @dorlanpabon Sólo quiero comprar números turcos y crear un sistema VOIP para números TR. Hablé con el equipo de soporte de DIDWW, pero no proporcionan números TR. ¿Utilizó sólo DIDWW para el sistema VOIP? Hay canales, puentes y aplicaciones en Asterisk. ¿Podemos hacer una llamada saliente usando estos (Asterisk)? ¿Necesitamos simplemente servicios de terceros para una llamada global? Si conoces más servicios, por favor házmelo saber :)
Hello, everyone. I have purchased a FreePBX app in DigitalOcean. So I could access FreePBX admin panel and I got some endpoints. Btw, I made a node server to test APIs and installed ari-client node module in it. I tried to connect server using below codes, but it doesn't work. (It even doesn't give me an error)
const client = require("ari-client");
client .connect("https://ip_addr/admin/api/api/rest", "username", "password") .then(function (ari) { console.log(ari); }) .catch(function (err) { console.log(err); });
If you have worked in this field, hope to hear from you. Thank you.