marcelog / Nami

Asterisk manager interface (ami) client for nodejs
http://marcelog.github.com/Nami
Apache License 2.0
98 stars 60 forks source link

Requesting AGI action #26

Closed vovochka404 closed 9 years ago

vovochka404 commented 10 years ago

https://wiki.asterisk.org/wiki/display/AST/ManagerAction_AGI

May be u should export Action too, for anyone can do something like this:

a = namiLib.Actions.Action('AGI');

If needed action isn't exist in lib?

marcelog commented 9 years ago

Hey :)

The idea is to implement new actions instead of having a generic approach for them. Action would me more like "an abstract class", and since it's really easy to extend it to create new actions, I prefer this approach to encourage people to open pull requests and enrich the library.. perhaps also this leads to less hacks in the code to implement unknown actions.

I'll close this issue now, but thanks for the suggestion though :)

vovochka404 commented 9 years ago

Ok :)

But will you add Action AGI? :)

marcelog commented 9 years ago

just did, can you give it a try and let me know? by the way, feel free to open a pull request next time! all contributions are welcome :)

cheers,

vovochka404 commented 9 years ago

Yep, it's fine, thnx. May be u should make CommandID optional? I didn't use it.

About pull request... I don't like whole this idea of "forking" project just to make i minimal change and return it to upstream. For me forking - it's like ffmpeg and libav, when there is no way to cooperate and u what something, that author don't what. I don't like this idea of github to fork everything u see.

But yep... There is no other way to propose a patch... :(