[asterisk-users] getting results messages from CLI commands via -rx

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Sep 19 15:31:06 CDT 2008


On Friday 19 September 2008 14:54:58 George Williams wrote:
> I am issuing CLI commands via script, using the "asterisk -rx" method.
>
> Its working great.  Now, I need to get the results of the command to look
> for error messages, etc.
>
> I've tried setting several "-v" flags as well, but I only get the Asterisk
> startup text (version, license info, etc), not the results of the command
> itself.

If you're doing activities via a script, the recommended method is to do this
via the Asterisk Manager Interface.  There is a sample script within the
contrib/scripts directory called astcli, which shows how to do this in Perl.
Note that the script is only available in trunk, though it should work with
other versions of Asterisk.

http://svn.digium.com/view/asterisk/trunk/contrib/scripts/astcli?view=log

-- 
Tilghman



More information about the asterisk-users mailing list