[asterisk-dev] [Code Review] Channel Redirect CLI command

Mark Michelson mmichelson at digium.com
Fri Dec 12 16:55:27 CST 2008


Russell Bryant wrote:
> Johansson Olle E wrote:
>> 12 dec 2008 kl. 21.05 skrev Russell Bryant:
>>
>>> This patch introduces a new CLI command, "channel redirect", which  
>>> allows you to perform a similar operation to AMI Redirect, except  
>>> from the CLI.
>> This is not something I want in the CLI. I can't see operators  
>> redirecting channels by looking at the CLI.
>> We have been trying to move away from non-user interfaces in the cli  
>> and not add new ones.
> 
> I can think of numerous cases where people would find use for this. 
> Also, I'm not sure what your definition of "non-user interface" is.  It 
> seems just as appropriate as channel originate, channel request hangup 
> (soft hangup), and a number of other things.
> 
> Anyway, I'm interested to hear what others think.  So, others, please 
> speak up.  :-) The people I have talked to so far have been excited 
> about it.  If enough people have a reason not to want it there, then I'm 
> certainly open to reconsider.
> 

My understanding was that the commands which should not be added to the CLI were 
commands whose output was intended more for a parser or other machine to read 
instead of a human (see "core show channels concise").

I think what Olle was referring to were items which make sense to be in a user 
interface for an operator to use. For instance, if I were writing a user 
interface on top of Asterisk, it would make much more sense to use Manager 
commands instead of CLI commands to do the tasks for me. I don't think, however, 
that having the ability present in both the CLI and AMI is problematic. The only 
thing I don't like about it is that in most cases it leads to a lot of code 
dupllication. In this case, however, the majority of the logic is found in 
already existing code (ast_async_parseable_goto) and so even the code 
duplication argument doesn't really hold water here.

Mark Michelson



More information about the asterisk-dev mailing list