[asterisk-dev] Quick question about this bug report

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Jun 14 15:56:42 CDT 2008


On Fri, Jun 13, 2008 at 04:25:18PM -0500, Tilghman Lesher wrote:
> On Friday 13 June 2008 15:53:50 John Lange wrote:
> > I reported this bug about console delays that was closed:
> >
> > http://bugs.digium.com/view.php?id=12851
> >
> > Corydon mentions the script atscli as a solution. I just want to mention
> > that as of 1.4.21, there is no astcli script in contrib.
> >
> > I assume that is an oversight because I was able to locate it in
> > svn/trunk and it works great.
> 
> It's technically a new feature.

Though "backporting" it to 1.4 should be fairly trivial. Something along
the lines of:

  wget http://svn.digium.com/svn/asterisk/trunk/contrib/scripts/astcli
  chmod +x astcli

But using it requires some extra setup, and hence it is not always
applicable. E.g: could you use it instead of asterisk -rx in the
asterisk init.d script?

> 
> > And just a minor comment; though the console isn't supposed to be suited
> > for scripting I still think it is exhibiting some strange behaviour
> > that's worth debugging. Why is it hanging after -rx commands? It never
> > used to do that. It's a small delay but it may be hinting at a larger
> > problem.
> 
> The way that the -rx command works is kind of a hack, and due to output
> delays, it's always been possible for output to be truncated.  By lengthening
> the time that the remote console waits for output, it is more assured that the
> output of the command is complete.  Specifically, -rx is exactly the same as a
> remote console, except that it waits for output only for a certain amount of
> time and then disconnects.  The delay was simply lengthened from 100ms to
> 500ms, to ensure that all output had the chance to make it through the pipe
> to the output device.
> 
> Another annoyance that we fixed recently was that on fairly busy servers, -rx
> would never disconnect, because the console did not distinguish between
> verbose console output and command output.  This has been changed, such
> that all verbose output is prefixed by a special preamble, which is then
> detected and removed at display time.  This also means that the output of
> -rx is now much cleaner than it has been in the past.

I'm suspect about half of the users of asterisk -rx don't really care about
the output.

-- 
               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