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