[asterisk-dev] CLI verbosity on -rx

Donny Kavanagh donnyk at gmail.com
Thu Oct 4 22:15:58 CDT 2007


I think i would pick the red pill, umm i mean #2.

This same type of 'magic text' functionality could be extended to make it
possible for remote consoles to have different levels of debug or verbosity.

Juggie/Donny

On 10/4/07, Russell Bryant <russell at digium.com> wrote:
>
> Atis Lezdins wrote:
> > Guys, could you please take a look at
> http://bugs.digium.com/view.php?id=10847
> >
> > The problem is that i expect `asterisk -rx "show queues"` to return only
> > result of "show queues", as it would be in CLI with verbosity/debug 0.
> > However, sometimes i get full CLI output for quite long period of time.
> Qwell
> > insists that this is intended behaviour, but i don't agree.
> >
> > Is there any significant problem when executing remote command with
> separate
> > verbosity than main thread?
>
> So, here is the issue.
>
> The main instance of Asterisk calls ast_register_verbose() and provides a
> callback function called something like network_verboser().  This function
> provides all of the common CLI output to remotely connected
> consoles.  This
> output includes any log output, or verbose output.
>
> The problem is that there is no way for the main Asterisk process to know
> the
> difference between a regular remote console (simply -r) versus one that is
> only
> connecting to execute a single command and exit (-rx).
>
> The fix must make it such that the main Asterisk process can treat these
> two
> types of remote consoles differently.  I can think of 2 ways to do it.
>
> 1) Create a 2nd unix socket.  Have connections to one for -r, and the
> other for
> -rx.  I think this is going to be the easiest way to fix it, and thus is
> my
> preferred method.
>
> 2) Have the remove console send over some magic text when it first
> connects to
> indicate that it is a -rx console and should be treated as such.
>
> Then, once the main process can treat them differently, it can properly
> _only_
> send the output of the desired CLI command to -rx consoles.
>
> --
> Russell Bryant
> Software Engineer
> Digium, Inc.
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071004/8cc62aae/attachment-0001.htm 


More information about the asterisk-dev mailing list