For asterisk 15+ the message find in the queue produced by a call to ari.getWebsocketQueue() will always return null in the message types.
Note: The ari.getWebsocketQueue() call wil also fire an unsupported exception, so I have to add a new method ari.getWebsocketQueue(String) which will call the correct supported underlying method
public MessageQueue getWebsocketQueue(String app) throws ARIException {
if ( liveActionEvent != null ) {
throw new ARIException( "Websocket already present" );
}
final MessageQueue q = new MessageQueue();
//--- The eventWebsocket(String, Callback) is not supported by Asterisk 13.19+
//--- so call the one with the subscribeAll parameter which is supported
events().eventWebsocket( app, true, new AriCallback<Message>() {
@Override
public void onSuccess(Message result) {
q.queue( result );
}
@Override
public void onFailure(RestException e) {
q.queueError("Err:" + e.getMessage());
}
});
return q;
}
A submitted a pull request to add this new method
For asterisk 15+ the message find in the queue produced by a call to
ari.getWebsocketQueue()will always return null in the message types.Note: The
ari.getWebsocketQueue()call wil also fire an unsupported exception, so I have to add a new methodari.getWebsocketQueue(String)which will call the correct supported underlying methodA submitted a pull request to add this new method