net.sf.asterisk.manager
Interface AsteriskManager

All Known Implementing Classes:
DefaultAsteriskManager, MultiAsterisksManager

public interface AsteriskManager

The AsteriskManager is built on top of the ManagerConnection and is an attempt to simplify interaction with Asterisk by abstracting the interface.
You will certainly have less freedom using AsteriskManager but it will make life easier for easy things (like originating a call or getting a list of open channels).
AsteriskManager is still in an early state of development. So, when using AsteriskManager be aware that it might change in the future.

Version:
$Id: AsteriskManager.java,v 1.9 2005/07/27 23:38:14 srt Exp $
Author:
srt

Method Summary
 java.util.Map getChannels()
          Returns a Map of active channels.
The map contain the channel names as keys and objects of type Channel as values.
 java.util.Map getQueues()
          Returns a Map of all queues.
The map contains the queue names as keys and objects of type Queue as values.
 java.lang.String getVersion()
          Returns the version of the Asterisk server you are connected to.
This typically looks like "Asterisk 1.0.9 built by root@host on a i686 running Linux".
 int[] getVersion(java.lang.String file)
          Returns the CVS revision of a given source file of the Asterisk server you are connected to.
For example getVersion("app_meetme.c") may return {1, 102} for CVS revision "1.102".
Note that this feature is not available with Asterisk 1.0.x.
You can use this feature if you need to write applications that behave different depending on specific modules being available in a specific version or not.
 Call originateCall(Originate originate)
          Generates an outgoing call.
 

Method Detail

originateCall

Call originateCall(Originate originate)
                   throws TimeoutException,
                          java.io.IOException
Generates an outgoing call.

Parameters:
originate - conatins the details of the call to originate
Returns:
a Call object representing the originated call
Throws:
TimeoutException - if the originated call is not answered in time
java.io.IOException - if the action cannot be sent to the asterisk server

getChannels

java.util.Map getChannels()
Returns a Map of active channels.
The map contain the channel names as keys and objects of type Channel as values.

Returns:
a Map of active channels.

getQueues

java.util.Map getQueues()
Returns a Map of all queues.
The map contains the queue names as keys and objects of type Queue as values.

Returns:
a Map of queues.

getVersion

java.lang.String getVersion()
Returns the version of the Asterisk server you are connected to.
This typically looks like "Asterisk 1.0.9 built by root@host on a i686 running Linux".

Returns:
the version of the Asterisk server you are connected to
Since:
0.2

getVersion

int[] getVersion(java.lang.String file)
Returns the CVS revision of a given source file of the Asterisk server you are connected to.
For example getVersion("app_meetme.c") may return {1, 102} for CVS revision "1.102".
Note that this feature is not available with Asterisk 1.0.x.
You can use this feature if you need to write applications that behave different depending on specific modules being available in a specific version or not.

Parameters:
file - the file for which to get the version like "app_meetme.c"
Returns:
the CVS revision of the file, or null if that file is not part of the Asterisk instance you are connected to (maybe due to a module that provides it has not been loaded) or if you are connected to an Astersion 1.0.x
Since:
0.2


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.