[asterisk-dev] Why is "core show channels concise" deprecated?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Jan 24 18:00:27 CST 2012


On Tue, Jan 24, 2012 at 05:13:55PM -0600, Mark Michelson wrote:

> The thinking is that CLI commands are intended for human
> consumption, not for parsing by code. This frees us to be able to
> make changes to CLI commands when they have typos, are formatted
> badly, or are missing information without the worry that it will
> mess up somebody's parsing code.
> 
> The "core show channels verbose" command was written before this
> thinking came into play. The preferred method for handling this sort
> of task is via the Asterisk Manager Interface's CoreShowChannels
> command instead.

The fact is that the CLI is much simpler for simpler scripts, because:

1. No extra authentication required. I can be sure it works without
   setting up anything in manager.conf .
2. simpler syntax. Just send a command and be done with it.

(1) can be fixed with the manager listening also on a unix domain socket
and authenticating system users.

As for (2): I'll just point out that recently a script of mine broke
because it suddenly needed to account for the new FullyBooted response
from Asterisk.

With the manager I need to first authenticate and only then issue the
command. I suppose this is less efficient.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list