Re: [Asterisk-java-users] Problem with UniqueId and originate command
Brought to you by:
srt
From: Stefan R. <sr...@re...> - 2005-05-17 23:07:49
|
> Would it make sense to create a psudo ManagerResponse called > OriginateResponse that has all of the info? ie proposed new method: >=20 > public OriginateResponse originateCall(OriginateAction > originateAction, long timeout) throws TimeoutException, IOException the AsteriskManager interface is meant to me more abstract, so you dont have to handle the details of actions and responses. If you look at getCalls() for example thats how i think it should work. The current method String originateCall(OriginateAction originateAction) is therefore not that well designed as the signature should not depend on the OriginateAction. Returning only the uniqueId isn't sufficient either as we also need to indicate success or failure. The best way would be to design some more "domain objects" like Channel or Queue that can be translated to and from events and actions. I think of something like Call originateCall(String sourceChannel, DialPlanEntry destination) throws OriginateFailureException Call originateCall(String sourceChannel, Application destination) throws OriginateFailureException assuming Call to be a collection of linked (bridged) channels, DialPlanEntry to contain exten, contect and priority and Application to contain application and data. whats your opinion on this? =3DStefan |