I am using Asterisk-Java to listen to messages from an Asterisk PBX. This app used to work, but I made a few changes, and now when I try to run it and make a test conference call from my desk phone, it says:
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,858 DEBUG [manager.internal.ManagerConnectionImpl] - Dispatching event:
org.asteriskjava.manager.event.MeetMeJoinEvent[dateReceived='Wed Jun 06 17:17:46 BST 2012',privilege='call,all',sequencenumber=null,meetme='1',calleridname=null,timesta
mp=null,uniqueid='1338999461.46707',server=null,calleridnum=null,channel='SIP/10.252.26.15-08b76ab0',usernum='1',systemHashcode=233612073]
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,869 DEBUG [manager.internal.ManagerConnectionImpl] - Dispatching event:
org.asteriskjava.manager.event.DisconnectEvent[dateReceived='Wed Jun 06 17:17:46 BST 2012',timestamp=null,sequencenumber=null,server=null,systemHashcode=681515782]
Asterisk-Java ManagerConnection-0-Reader-2 2012-06-06 17:17:46,870 INFO [manager.internal.ManagerConnectionImpl] - Closing socket.
You can see there was a DisconnectEvent
received directly after the MeetMeJoinEvent
. This happens every time - it always happens immediately after a MeetMeJoinEvent
. The DisconnectEvent
is a psuedo-event meaning that Asterisk disconnected from my app - it did not disconnect from the caller.
Subsequently, Asterisk-Java automatically reconnects immediately, but then it will happen again the same way if I make another test call. I've tried restarting the Glassfish application server.
I don't think any of my changes should have caused this, and there is only one line of code that calls disconnect on the Asterisk connection (when the web app shuts down), and the log message corresponding to that line does not appear in the logs.
What could be causing this?