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

Suggestion: create a simple example using manager.register_event() #26

Closed
osantana opened this issue Oct 16, 2015 · 9 comments
Closed

Comments

@osantana
Copy link

I'm an asyncio "newbie" and really like to see a simple but complete sample of manager.register_event() usage in a "server_forever" loop.

@ludovic-gasc
Copy link
Collaborator

I'm sorry, no time right now to do that.
Maybe another panoramisk user should propose an example as PR ?

@osantana
Copy link
Author

I'll try to make it by myself and send a PR. I'm a experienced Python developer but a newbie in asyncio/coroutine related subject and that's why I'm asking for some help here.

(I'm currently reading the asyncio chapter of Fluent Python book to learn how to use it and I could use panoramisk as an exercise 😄)

@ludovic-gasc
Copy link
Collaborator

If you are smart enough to handle Asterisk and VoIP in general, AsyncIO and async pattern in general should be considered easy as pie, at least to me ;-)
Good luck in discovery.
If you aren't enough confident in Asterisk, I recommend you to build first an aiohttp.web daemon with classical HTTP and after WebSockets.
The learning curve will be easier to handle.

@tannermkerr
Copy link
Contributor

@osantana, I've just submitted a pull request that has an example for you #27

@osantana
Copy link
Author

Cool! Thanks @tannermkerr! It'll be very useful on my next project: https://github.com/osantana/ami-push

It's only a project boilerplate that I started yesterday but the main goal is to create a daemon that listen for AMI events and make http request to an specific URL when some specific event type are triggered.

@tannermkerr
Copy link
Contributor

no problem glad to help. I was having the same issue as you, while trying to create a custom reporting tool.

@ludovic-gasc
Copy link
Collaborator

@osantana: good idea with ami-push: Don't hesitate to ping me when it will be done.

@tannermkerr: for custom reporting tool, I recommend you to use CEL: https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=5242932
https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+CEL+Specification

With that and pgsql connector, you can build a reporting tool without AMI.
However, with AMI, you can receive also CEL events, useful for realtime reporting.

Have a nice day.

@osantana
Copy link
Author

Hi,

As I promissed follow a link to my project that make http-posts based on events on AMI:

https://github.com/osantana/ami-push

Thanks for panoramisk!

@ludovic-gasc
Copy link
Collaborator

@osantana it looks promising ;-)

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