asterisk / node-ari-client

Node.js client for ARI. This library is best effort with limited support.
Other
249 stars 98 forks source link

Difference between snoopChannel and snoopChannelWithId #115

Open rllalloshi opened 5 years ago

rllalloshi commented 5 years ago

According to the documentation on README both snoopChannel and snoopChannelWithId have the following available parameters

Both have the snoopId the id to assign to the snooping channel as a available parameter which means there shouldn't be a difference between them.

samuelg commented 5 years ago

The documentation (and available methods at runtime) are generated from the API spec for ARI in Asterisk. I suspect there are 2 different API endpoints for snoop channels in ARI and thus why there are 2 available in this library. I'm not sure what the history is there but at present this library is not limiting any of the APIs provided in the spec.

One option would be to hide certain APIs but I can't guarantee someone isn't using a particular version of the method and would rather err on the side of caution.

I apologize for the confusion.