[asterisk-dev] bug 0016466: cidname and cidnum in output of "sip show peers"

Olle E. Johansson oej at edvina.net
Sun Mar 21 01:44:31 CDT 2010


21 mar 2010 kl. 00.05 skrev Russell Bryant:

> 
> 
> ----- "Leif Madsen" <leif.madsen at asteriskdocs.org> wrote:
> 
>> Olle E. Johansson wrote:
>>> We could however make a configurable "sip show devices" command
>> where you simply
>>> configure in sip.conf what you want on each line. I think that's the
>> only possible way forward.
>>> If we create such a command, we could stop changing the old lists
>> and also have a template
>>> for other CLI commands moving forward.
>>> 
>>> I do not recommend changing any CLI list, because sadly people use
>> it for application integration
>>> and changing the syntax will also hurt these. Applications that
>> parse the CLI really have to 
>>> move to using manager instead. 
>> 
>> I think this might really be the best way forward. If we can create
>> some sort of 
>> template that outputs the data for 'sip show peers' (or 'sip show
>> devices' as Olle has suggested), with the default template being what we have now,
>> and then the ability to allow people to modify that template to output whatever
>> data they want, then we can likely avoid this type of discussion in the future.
> 
> Implementing this for every CLI command that people would be interested in having customized output for would be a tremendous amount of work.  I would like to see work on the "data get" API done to help solve this problem.  The API should be merged soon.  From there, we will need a SIP peers data provider.  Finally, I'd like to see a CLI interface for data API that allows you to query an Asterisk data provider for the information you want to see.
Sounds like an idea.

But the important decision here is to stop changing and/or extend the current CLI commands that list various types of objects.

/O


More information about the asterisk-dev mailing list