Answer the question
In order to leave comments, you need to log in
Why can't I catch events from the Asterisk AMI through PHP?
My task is to catch incoming calls using Asterisk and PHP. I tried to do everything according to this article https://habr.com/en/post/311986/, but in the end it gives an error:
"Exception raised: Failed to listen on "tcp://192.168.0.241:8080": Cannot assign requested address
File: path/vendor/react/socket/src/TcpServer.php Line: 164"
I have a testast directory, it contains php file v1_ast and 4 php classes:
PAMI and Ratchet were installed through Composer:
Here is the v1_ast file itself. php:
4 classes were copied from the article I mentioned at the beginning. I changed the host, password and login in the AsteriskDaemon class, and also in each class I wrote require '../vendor/autoload.php';to make these classes use the packages installed by Composer
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question