Open jrivas111 opened 6 years ago
You need to change your $pamiClientOptions info: $pamiClientOptions = array( 'host' => '127.0.0.1', 'scheme' => 'tcp://', 'port' => 5038, 'username' => 'admin', 'secret' => '051270', 'connect_timeout' => 10000, 'read_timeout' => 10000 );
Hello Edwin thanks for your help i did fix the problem, I have another question though
when i do: $pamiClient->registerEventListener(function (EventMessage $event) { var_dump($event); }); Every event shows instantly after its done
but when i do this: $pamiClient->registerEventListener( function (EventMessage $event) { return $event instanceof HangupEvent && var_dump($event->getCallerIDNum("CallerIDNum")) } ); When i do this, it shows the result after the loop only not while the loop, why is this?
On Mon, Apr 30, 2018, 5:30 PM Edwin Artunduaga notifications@github.com wrote:
You need to change your $pamiClientOptions info: $pamiClientOptions = array( 'host' => '127.0.0.1', 'scheme' => 'tcp://', 'port' => 5038, 'username' => 'admin', 'secret' => '051270', 'connect_timeout' => 10000, 'read_timeout' => 10000 );
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marcelog/PAMI/issues/165#issuecomment-385534839, or mute the thread https://github.com/notifications/unsubscribe-auth/Ak-XZ40BiDgr1znyiNix0y80_wVt02oHks5tt4JxgaJpZM4TooLD .
i try to open a connection to my asterisk but i get this error:
> Fatal error: Uncaught exception 'PAMI\Client\Exception\ClientException' with message 'Error connecting to ami: No connection could be made because the target machine actively refused it. ' in C:\Apache24\htdocs\pbx\pami\vendor\marcelog\pami\src\PAMI\Client\Impl\ClientImpl.php:178 Stack trace: #0 C:\Apache24\htdocs\pbx\ami.php(17): PAMI\Client\Impl\ClientImpl->open() #1 {main} thrown in C:\Apache24\htdocs\pbx\pami\vendor\marcelog\pami\src\PAMI\Client\Impl\ClientImpl.php on line 178
this is my connection file:
this is my manager.conf file:
NOTE: THE PBX SERVER IS AT A REMOTE LOCATION ON A DEDICATED SERVER