Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I continuously listen events from AMI ? #180

Open
tuhinhossain opened this issue Feb 13, 2019 · 2 comments
Open

How can I continuously listen events from AMI ? #180

tuhinhossain opened this issue Feb 13, 2019 · 2 comments

Comments

@tuhinhossain
Copy link

tuhinhossain commented Feb 13, 2019

If I have an incoming call how can I detect that there is an incoming call on asterisk from my php server using PAMI? Please help.

I tried with $a->registerEventListener(new A());. It only listen current action event not listening other event

@sigmund-avila
Copy link

Hello!

You may use this code below:

`$running = true;

// Main loop
while($running) {
$pamiClient->process();
usleep(1000);
}`

@ldo
Copy link

ldo commented Dec 3, 2022

That’s busy-waiting, which can potentially be CPU-intensive.

Does PHP have any select/poll support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants