Re: [Asterisk-java-users] Intergrating DefaultAsteriskManager
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-07-06 09:18:25
|
Hi Jan, let me try to clarify the design of the Manager API of Asterisk-Java: The foundation is the ManagerConnection, it repesents a connection to an Asterisk Server and is capable to send actions and receive responses and events. It doesn't add any valuable functionality but rather provides a "Java" view to the Manager API (freeing you from TCP/IP connection and parsing stuff). 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 as I am kinda unsure about the abstraction level that is appropriate. So, when using AsteriskManager be aware that it might change in the futur= e. That said it is perfectly valid to combine ManagerConnection and AsteriskManager in your application. You get a ManagerConnection (from the factory, or by using spring or whatever), register your own event handler (ManagerConnection.addEventHandler()) and then pass the connection it to the DefaultAsteriskManager. For future releases I would like to extend the AsteriskManager and the Domain object to perform event handling at a higher level of abstraction. So you will be able to register a handler to be notified about new Channels (or Calls?) and you will be able to register with the instance o= f the domain object (say a specific Channel or Queue) to be informed about changes of that particular object (a Channel being hung up or an Agent joining a Queue). If you'd like to provide some information about the application you are building and the kind of events you need that will be valuable input. Cheers, Stefan |