Hi All, I'm not sure if the dev list is the proper list of this, however, due to the fact that the issue at hand revolves around documentation and proper usage, I think bringing it up here is a good place.
So, during the past few days, I've been trying to implement the Dial application using ARI. So, I'm aware I'm not the only one, but I'm the one trying to do it using PHPARI - naturally. In any case, I managed to write the functionality - reaching an issue where if I disconnect the first bridge handled by the stasis app, it will kill all the other bridges as well. I was wondering why that happens. I then realized that part of the my stasis loop implementation is just wrong, and it's not because PHPARI is wrong, or ARI is wrong - it's wrong because it is a WebSocket client. A stasis application, at least as I understand it - is a websocket client - or consumer in that respect. However, our consumer application is required to be able to handle multiple sessions, so, it now needs to be stateful on one hand, and 'multi-threaded' on the other. The result is that our 'client' application is actually a server in disguise. This is something that the ARI documentation and general usage concepts is missing - I think that we need to make ARI more accessible by explaining the basic concepts better. Another thing, yesterday Scott and I were going through Matt's example of the "bridge_dial" ARI application. The fact that the ari-py is autogenerated makes it really hard for a none-python (yours truly) guy to follow along. Even Scott, who is fluent in Python had a bit of trouble looking through the logic of the app, specifically when seeing that a certain event overloads an existing one - and some other stuff that ari-py does. In other words, if we want to deprecate AGI/AMI at some point - or for a better term, get people to use ARI extensively - we need better examples. I'm working on adding additional examples to PHPARI for this, but we need simple, to the point, usage examples for ARI. For example, examples that don't go about and do something funky in the background, so that people can truly learn from it. When I started with AGI and AMI, the one thing I liked was that I could use BASH. ARI isn't such a thing, and a WebSocket library is mandatory. But giving some basic concepts using only that, would be awesome. What do you think? Nir
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
