|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.manager.MultiAsterisksManager
public class MultiAsterisksManager
Constructor Summary | |
---|---|
MultiAsterisksManager()
|
Method Summary | |
---|---|
protected void |
addChannel(Channel channel)
|
void |
addManagerConnection(ManagerConnection connection)
|
protected void |
addQueue(Queue queue)
|
protected void |
dispatchEvent(ManagerEvent event)
|
java.util.Map |
getChannels()
Returns a map of all active channel by their unique id: "hostname:ChannelId". |
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. |
void |
handleEvent(ManagerEvent event)
Handles all events received from the asterisk server. Events are queued until channels and queues are initialized and then delegated to the dispatchEvent method. |
protected void |
handleHangupEvent(HangupEvent event)
|
protected void |
handleLinkEvent(LinkEvent event)
|
protected void |
handleNewChannelEvent(NewChannelEvent event)
|
protected void |
handleNewExtenEvent(NewExtenEvent event)
|
protected void |
handleNewStateEvent(NewStateEvent event)
|
protected void |
handleQueueEntryEvent(QueueEntryEvent event)
|
protected void |
handleQueueMemberEvent(QueueMemberEvent event)
|
protected void |
handleQueueParamsEvent(QueueParamsEvent event)
|
protected void |
handleRenameEvent(RenameEvent event)
|
protected void |
handleStatusCompleteEvent(StatusCompleteEvent event)
|
protected void |
handleStatusEvent(StatusEvent event)
|
protected void |
handleUnlinkEvent(UnlinkEvent event)
|
void |
initialize()
|
Call |
originateCall(Originate originate)
Generates an outgoing call. |
protected void |
removeChannel(Channel channel)
|
protected void |
removeQueue(Queue queue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiAsterisksManager()
Method Detail |
---|
public void addManagerConnection(ManagerConnection connection)
public void initialize() throws TimeoutException, java.io.IOException, AuthenticationFailedException
TimeoutException
java.io.IOException
AuthenticationFailedException
public java.util.Map getChannels()
getChannels
in interface AsteriskManager
public java.util.Map getQueues()
AsteriskManager
Queue
as values.
getQueues
in interface AsteriskManager
public void handleEvent(ManagerEvent event)
handleEvent
in interface ManagerEventHandler
event
- the event receivedprotected void dispatchEvent(ManagerEvent event)
protected void addChannel(Channel channel)
protected void removeChannel(Channel channel)
protected void addQueue(Queue queue)
protected void removeQueue(Queue queue)
protected void handleStatusEvent(StatusEvent event)
protected void handleStatusCompleteEvent(StatusCompleteEvent event)
protected void handleQueueParamsEvent(QueueParamsEvent event)
protected void handleQueueMemberEvent(QueueMemberEvent event)
protected void handleQueueEntryEvent(QueueEntryEvent event)
protected void handleNewChannelEvent(NewChannelEvent event)
protected void handleNewExtenEvent(NewExtenEvent event)
protected void handleNewStateEvent(NewStateEvent event)
protected void handleHangupEvent(HangupEvent event)
protected void handleLinkEvent(LinkEvent event)
protected void handleUnlinkEvent(UnlinkEvent event)
protected void handleRenameEvent(RenameEvent event)
public Call originateCall(Originate originate) throws TimeoutException, java.io.IOException
AsteriskManager
originateCall
in interface AsteriskManager
originate
- conatins the details of the call to originate
TimeoutException
- if the originated call is not answered in time
java.io.IOException
- if the action cannot be sent to the asterisk serverpublic int[] getVersion(java.lang.String file)
AsteriskManager
getVersion
in interface AsteriskManager
file
- the file for which to get the version like "app_meetme.c"
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.xpublic java.lang.String getVersion()
AsteriskManager
getVersion
in interface AsteriskManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |