[Asterisk-java-users] ManagerResponse#getUniqueId() returns null after sending OrginateAction
Brought to you by:
srt
From: Andrew W. <an...@ji...> - 2005-06-22 17:06:56
|
Hi, I am trying to get the unique ID back from the call I have established with the originate action, however I ManagerResponse#getUniqueId() always returns null. Is this the expected behavior or is this a bug. My code: ManagerConnection con = ManagerConnectionPoolFactory.getManagerConnectionPool().getConnection(); OriginateAction action = new OriginateAction(); action.setChannel("6141"); action.setCallerId("99999"); action.setExten(extension); action.setContext("default"); action.setPriority(1); ManagerResponse response = con.sendAction(action, 5 * JiveConstants.SECOND); String uniqueID = response.getUniqueId(); I have also noticed that DefaultAsteriskManager#orginateCall uses the same general idea. If this is the correct behavior is the only around this to create a listener and wait for the next event that would contain the uniqueID (such as the Link event)? thanks in advance, Andrew |