Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
Description
The attached patch fixes two bugs in the Asterisk Unix agent:
1) Asterisk output contains invisible ANSI codes. This causes the "tail -3"-type lines to fail, because there is an invisible final line with an ANSI code in it, so you are effectively just getting a "tail -2". This is fixed by passing all output through a sed script to remove ANSI codes.
2) "active channels" and "active calls" would always have shown the same number (active channels), because by getting the "tail -3" into a bash shell variable, all lines were condensed into one. Fixed by using grep -o to pull out only the parts that are needed.
Please set "svn:executable" when you commit the file, thanks.