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

Adhearsion::Asterisk.execute_ami_action is asynchronous in adhearsion >= 2.4 #16

Open
sjamaan opened this issue May 1, 2016 · 6 comments

Comments

@sjamaan
Copy link

sjamaan commented May 1, 2016

While upgrading an Adhearsion application from 2.3 to 2.4 I noticed that my code which interrogates the status of Asterisk queues would ntermittently return everything, nothing, or only some of the entries.

After a bit of debugging, I found that if I run the following in the ahn console:

Adhearsion::Asterisk.execute_ami_action('QueueStatus') do |x|
   puts x.inspect
end; puts "DONE!"

This will print DONE! intermixed with the events in Adhearsion 2.4, while it will print DONE! after all the events in 2.3. I think the new behaviour is a bug, because the documentation for adhearsion-asterisk indicates that
execute_ami_action() is (intended to be) synchronous.

I've tried to debug this but the Punchblock code is extremely abstract, and difficult to follow. Any help would be appreciated!

@benlangfeld
Copy link
Member

Please provide a log at trace level and Gemfile.lock for both working and broken cases.

@sjamaan
Copy link
Author

sjamaan commented May 1, 2016

@sjamaan
Copy link
Author

sjamaan commented May 1, 2016

Just in case, here are the source Gemfiles:
Gemfile-2.3-ok.txt
Gemfile-2.4-bad.txt

@benlangfeld
Copy link
Member

@sjamaan It would be useful if you would step through available Punchblock versions to determine which release caused this.

@sjamaan
Copy link
Author

sjamaan commented May 1, 2016

I'll get back to you on that, might take a few days

@sjamaan
Copy link
Author

sjamaan commented May 2, 2016

OK, had time to look into it today already.

The bug occurs somewhere between Punchblock 2.1.1 (which works) and Punchblock 2.2.0 (which doesn't). From the changelog, "Bugfix: Remove per-call/component actors from Asterisk translator for performance/stability super-charge" sounds like a likely culprit. I'm unsure how to actually debug it at this level, though.

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

2 participants