amclient.tcl – Tcl wrapper for Asterisk Manager API
This open source Tcl library lets you write Tcl scripts that interact with Asterisk via the manager API. It hides the syntax from the script and instead provides a Tcl-native way of interfacing with the API.
It was written at RavenWolf Technology, Inc. The included simple demo program requires Tcl8.4, but the library itself should work fine with older versions of Tcl. Currently in production use under Linux and FreeBSD, but should work anywhere Tcl does.
The package can be downloaded from http://www.dialabc.com/download/asterisk/amclient-1.0.2.tgz. See included README.TXT and demo app for details.
set AM [amClientSession localhost 5038 mark mysecret {} {} 0 0]
$AM Ping
$AM Command {command {show uptime}}
$AM Redirect {Channel Zap/1-1 Context transfer Exten 5555555555 Priority 1}