Asterisk Manager API Action GetVar
Asterisk Manager API Action: GetVar Action: Getvar Parameters: Channel, Variable, ActionID ActionID is an optional parameter for message matching. Example : SEND: ACTION: GetVar Channel: SIP/5060-44d225d0 Variable: extension RECEIVE: Response: Success extension: 17065551419 RECEIVE ON ERROR: Response: Error…
Read More »Asterisk Manager API Action ExtensionState
Action: ExtensionStateParameters: Exten, Context, ActionID SEND: ACTION: ExtensionStateContext: defaultExten: idonnoActionID: 1 RECEIVE: Response: SuccessActionID: 1Message: Extension StatusExten: idonnoContext: defaultHint:Status: -1 Status codes:-1 = Extension not found0 = Idle1 = In Use2 = Busy4 = Unavailable8 = Ringing16 =…
Read More »Asterisk Manager API Action Monitor
Asterisk Manager API Action: Monitor Action: Monitor Parameters: Channel, File, Format, Mix Example Via Asterisk 1.0.9 SEND: ACTION: Monitor Channel: SIP/x7062618529-643d File: channelsavefile Mix: 1 RECEIVE: Response: Success Message: Started monitoring channel RECIEVE ON FAIL: Response: Error Message:…
Read More »Asterisk Manager API Action ChangeMonitor
Asterisk Manager Action: ChangeMonitor Action: ChangeMonitor Parameters: Channel, File Changes the file name of a recording occuring on a channel Example via Asterisk 1.0.9: SEND: ACTION: ChangeMonitor Channel: SIP/x7065558529-1c20 File: 20050103-140105_cc51 RECEIVE ON FAIL: Response: Error Message: No…
Read More »Asterisk Manager API Action AbsoluteTimeout
Asterisk Manager API Action: AbsoluteTimeout This command will request Asterisk to hangup a given channel after the specified number of seconds, thereby effectively ending the active call. If the channel is linked with another channel (an active connected…
Read More »Asterisk manager Example: Command
Execute an Asterisk CLI command in an Asterisk manager session The Asterisk CLI is accessible through the manager API. All of the CLI commands can be passed through using the “Command subset” feature. For example, to dump the…
Read More »Asterisk manager Example: Transfer
Asterisk Manager Example: Transfer Transfer a call to another extension Let’s see what channels we actually have first: SEND: ACTION: Command command: show channels RECEIVE: Response: Follows Channel (Context Extension Pri ) State Appl. Data SIP/x7065558529-8f54 (pms-x7065558529 1…
Read More »Asterisk cmd Dial
Dial() Synopsis Application dial() attempts to establish a new outgoing connection on a channel, and then link it to the calling input channel. Description Dial(type/identifier, timeout, options, URL)fo Dial(type1/identifier1[&type2/identifier2[&type3/identifier3… ] ], timeout, options, URL) RetryDial(announce|sleep|loops|Technology/resource[&Technology2/resource2…][|[timeout][|[options][|URL]]]) Page Contents Parameters…
Read More »Asterisk manager Example: Redirect
Redirect with ExtraChannel: Attempted goal:Have a ‘robot’ program Redirect both ends of an already-connected call to a meetme room using the ExtraChannel feature through the management interface. SEND: ACTION: RedirectChannel: SIP/1234-6378ExtraChannel: SIP/4321-45cf6c80Exten: 680Priority: 1Context: default RECEIVE: Response: ErrorMessage:…
Read More »Asterisk manager Example: Originate
Originate – Place a call from a device to an extension. If the device (SIP/12345) is a phone, it will ring and when picked up the user will be connected to the extension (Context, Exten, Priority) dialed. If…
Read More »Asterisk manager Example: Login
Login – Establish a new Asterisk manager session. Don’t forget that you have to end your request with \r\n\r\n (two CrLfs), that’s ascii characters 13, 10, 13 and 10 successively. SEND: ACTION: LOGIN USERNAME: username SECRET: password EVENTS:…
Read More »Asterisk manager Example: C Sharp
C# Example using System; using System.Net; using System.Net.Sockets; using System.Text.RegularExpressions; using System.Text; namespace AsteriskPrototype { class AppConsole { [STAThread] static void Main(string[] args) { Console.WriteLine(“Quick and Dirty Asterisk Manager Daemon Test:\n”); // Connect to the asterisk server. Socket…
Read More »Asterisk manager Example: Java
Asterisk Manager Example: Java Java library The Asterisk-java package (available unter Apache License from http://asterisk-java.org/) consists of a set of Java classes that allow you to use the Manager API Java applications. It supports receiving events from…
Read More »Asterisk manager Example: Applescript
Asterisk Manager Example: Applescript Dialing the Phone from OS X Addressbook using Applescript only!! (Well “Expect” too but that’s part of the OS so we won’t worry too much about that!) copy the code below into applescript and…
Read More »amclient.tcl
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…
Read More »