S
S
stepan2019-02-05 02:40:02
PHP
stepan, 2019-02-05 02:40:02

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: 5c58c82b4f13a437060727.png
PAMI and Ratchet were installed through Composer: 5c58c89219983178955664.png
Here is the v1_ast file itself. php: 5c58cc5ac0352659752806.png
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 5c58ccd08eef2349878943.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-02-05
@Minifets

Where did you get the address 192.168.0.241 from? Just copied and pasted?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question