[Asterisk-java-users] All Disposition Leads to No Answer
Brought to you by:
srt
From: Terrance D. <ter...@gm...> - 2015-09-05 04:29:49
|
Hello Everyone, We are using the standard server.originateToExtensionAsync(originateAction.getChannel(), originateAction.getContext(), originateAction.getExten(), originateAction.getPriority(), originateAction.getTimeout(), new CallerId("TEST", originateAction.getCallerId()), null, new OriginateCallback() { public void onDialing(final AsteriskChannel c) { channel = c; System.err.println("Dialing: " + channel); } public void onSuccess(AsteriskChannel c) { channel = c; System.out.println("Success: " + c); } public void onNoAnswer(AsteriskChannel c) { channel = c; System.out.println("No Answer: " + c.getState()); } public void onBusy(AsteriskChannel c) { channel = c; System.out.println("Busy: " + c); } public void onFailure(LiveException cause) { System.out.println("Failed: " + cause.getMessage()); } }); Thread.sleep(90000L); System.out.println("final state: " + channel); if (channel != null) { System.err.println("final state linked channels: " + channel.getLinkedChannelHistory()); } But it does not matter if I connect the call successfully, or busy on the other end, the calls always last on `onNoAnswer`. I really don't know how to check other than `c.getState` = up on a connected call. Thanks in Advance, Terrance |