[asterisk-users] Monitor Asterisk

Matthew J. Roth mroth at imminc.com
Thu Feb 14 11:26:02 CST 2008


Soumya Kat wrote:
> Thank you to all those who replied to my last query. For them and for 
> the suggestion, I can monitor asterisk using the asterisk -r -x 
> "<command>" option. What I would like to know is that using asterisk 
> -r -x way I can only use the *CLI commands. Is there any other way in 
> which I can monitor asterisk?
Soumya,

Yes, "asterisk -rx" will only allow you to execute CLI commands.  It 
also tends to spew out a bunch of garbage that makes parsing difficult 
unless verbosity is always set to 0.

I recommend taking a look at the Asterisk Manager Interface (AMI) 
<http://www.voip-info.org/wiki-Asterisk+manager+API>.  It's a cleaner 
interface that will allow you to read events and issue commands.  All of 
the CLI commands are available through the AMI, as well as an array of 
additional manager actions.

I recently wrote a program that maps the SIP call IDs of the two legs 
that make up a call using the 
"POE::Component::Client::Asterisk::Manager" Perl module 
<http://search.cpan.org/~xantus/POE-Component-Client-Asterisk-Manager/>.  
It provides a simple interface for filtering events, so if you're 
familiar with Perl I recommend taking a look at it.

Regards,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer




More information about the asterisk-users mailing list