Hi,
The most likely reason for the hang is that your client-side thread pool does not have enough threads. As discussed in this
FAQ, the client thread pool is responsible for dispatching replies (including calls to AMI callbacks) and has a default maximum size of one thread.
In your example, the AMI callback is making a nested twoway invocation. This will cause a hang when there is only one thread in the client thread pool: the nested twoway invocation blocks the calling thread, therefore no threads are available to dispatch the response to the nested invocation.
Increasing the size of the client thread pool should resolve the problem. The FAQ I mentioned earlier describes the relevant properties.
Take care,
Mark