[Home]

Summary:ASTERISK-21884: Asterisk API Improvements - add AMI/CLI command for querying Stasis endpoints
Reporter:Matt Jordan (mjordan)Labels:Asterisk12
Date Opened:2013-06-07 09:18:28Date Closed:2013-07-08 08:27:38
Priority:MajorRegression?
Status:Closed/CompleteComponents:Core/Stasis
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:There are a number of channel driver specific AMI commands/CLI commands used to inspect run-time information about endpoints, their status, and their registrations.

The principle ones for SIP and IAX are:
* [SIPpeers|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPpeers]
* [SIPshowpeer|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPshowpeer]
* [SIPpeerstatus|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPpeerstatus]
* [SIPshowregistry|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPshowregistry]
* [IAXpeerlist|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_IAXpeerlist]
* [IAXpeers|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_IAXpeers]
* [IAXregistry|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_IAXregistry]
* [SIPshowregistry|https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+ManagerAction_SIPshowregistry]

In general, however, it would be better if there were AMI commands that let any channel driver that creates Stasis endpoints be queried. This would hit the cache and display information about the endpoints that are currently available. We would want to have the following:

* List all endpoints that could exist for a given technology
* Provide detailed information about a single endpoint
** Channel handles that are associated with that endpoint
** Device states associated with that endpoint
** Technology specific information. This may mean we need to have a technology specific piece of data stored on the endpoint (ao2 ref counted) with callback functions that format the information for JSON and AMI, similar to the formatting callbacks for stasis messages.
Comments:By: Matt Jordan (mjordan) 2013-07-08 08:27:38.633-0500

This isn't really thought through completely.
While Stasis endpoints have a loose association to their channel specific implementations, that association doesn't work in the direction of Stasis endpoint -> tech specific implementation - it typically works in the other direction. That makes querying through the Stasis endpoint difficult.
If we think this is worth doing at a latter time, we can address it then.