Busy Lamp Field Bug


#1

I’m working with Jitsi Desktop and I’m trying to get the Busy Lamp Field working. I have an account registered with our Asterisk 13 server and can make and receive calls. I have configured Jitsi to use a provisioning file and it successfully gets that file (confirmed by looking at the Property Editor).

The contents of the config file are below:

Click to expand!
##################
#  BLF Settings  #
##################
net.java.sip.communicator.plugin.busylampfield.ENABLED=true
net.java.sip.communicator.impl.protocol.sip.acc1543355484566.BLF_ENABLED=true
net.java.sip.communicator.impl.protocol.sip.acc1543355484566.BLF_LINE.blf001.Name=DND
net.java.sip.communicator.impl.protocol.sip.acc1543355484566.BLF_LINE.blf001.Group=
net.java.sip.communicator.impl.protocol.sip.acc1543355484566.BLF_LINE.blf001.Address=*76999
net.java.sip.communicator.impl.protocol.sip.acc1543355484566.BLF_LINE.blf001.Pickup=\1

This causes the GUI to behave strangely (It lags like crazy and fails to render the UI) and the the BLF is not properly displaying the hinted status. I can tell from the Asterisk server that the hint was successfully subscribed to by running the command core show hints.

I did notice in the Jitsi log files that there is a null reference exception being thrown repeatedly.

Exception Details
2018-11-27 17:28:59.264 SEVERE: [613] util.UtilActivator.uncaughtException().122 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: null
java.lang.NullPointerException
    at net.java.sip.communicator.plugin.busylampfield.CustomActionsBLFSourceContact$PickupAction.isVisible(CustomActionsBLFSourceContact.java:193)
    at net.java.sip.communicator.plugin.busylampfield.CustomActionsBLFSourceContact$PickupAction.isVisible(CustomActionsBLFSourceContact.java:90)
    at net.java.sip.communicator.impl.gui.main.contactlist.contactsource.ExternalContactSource.isContactActionVisible(ExternalContactSource.java:305)
    at net.java.sip.communicator.impl.gui.main.contactlist.contactsource.ExternalContactSource.getContactCustomActionButtons(ExternalContactSource.java:210)
    at net.java.sip.communicator.impl.gui.main.contactlist.contactsource.SourceUIContact.getContactCustomActionButtons(SourceUIContact.java:735)
    at net.java.sip.communicator.impl.gui.main.contactlist.ContactListTreeCellRenderer.initButtonsPanel(ContactListTreeCellRenderer.java:1147)
    at net.java.sip.communicator.impl.gui.main.contactlist.ContactListTreeCellRenderer.getTreeCellRendererComponent(ContactListTreeCellRenderer.java:576)
    at net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.dispatchEventToButtons(TreeContactList.java:1796)
    at net.java.sip.communicator.impl.gui.main.contactlist.TreeContactList.mouseMoved(TreeContactList.java:1663)
    at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:330)
    at java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:329)
    at java.awt.Component.processMouseMotionEvent(Component.java:6578)
    at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3342)
    at java.awt.Component.processEvent(Component.java:6302)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4889)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4538)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4711)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Should I open a bug on Github? Or, can anyone help me get this working? Thank you in advance for your advice!

Darren


#2

Do you see this log in the log file:
https://github.com/jitsi/jitsi/blob/79a3a28b3421f06960871db0c4fb6927b9c39575/src/net/java/sip/communicator/impl/protocol/sip/OperationSetTelephonyBLFSipImpl.java#L452 ?


#3

@damencho Thank you for the reply! :grinning:

Indeed I do. (in fact it is in the log several times)

2018-11-27 17:28:56.370 INFO: [1140] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=0 evt=BLFStatusEvent{type=3, name=Free} line=*76999
2018-11-27 17:28:56.379 INFO: [1141] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=0 evt=BLFStatusEvent{type=2, name=Busy} line=*76999
...
2018-11-27 18:27:56.407 INFO: [2082] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=1 evt=BLFStatusEvent{type=3, name=Free} line=*76999
2018-11-27 18:27:56.413 INFO: [2083] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=1 evt=BLFStatusEvent{type=2, name=Busy} line=*76999
...
2018-11-27 19:26:56.448 INFO: [2321] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=1 evt=BLFStatusEvent{type=3, name=Free} line=*76999
2018-11-27 19:26:56.454 INFO: [2322] impl.protocol.sip.OperationSetTelephonyBLFSipImpl.fireEvent().452 Dispatching BLF change. Listeners=1 evt=BLFStatusEvent{type=2, name=Busy} line=*76999

There are many more than what I just listed but you get the idea (always in pairs)

If it would help to resolve this issue I am willing to post the entire log file but I would want to sanitize the file first and until now didn’t want to do that work for nothing if it is largely unhelpful.

I tried to look at the source code for the exception I listed above and when you combine that with the knowledge that the asterisk server can see that the hint is being “watched” and that there are entries in the log file (that you just directed me to) that would seem to indicate that Jitsi is getting updates when the hint changes, does it point to this just being a display issue?


#4

I have a suspicion there is a bug about the initial presence state which is null … but not sure … have no resource at the moment to debug and test it.
Try setting offline/unused status using setPresenceStatus when constructing BLFSourceContact in the constructor here https://github.com/jitsi/jitsi/blob/master/src/net/java/sip/communicator/plugin/busylampfield/BLFSourceContact.java#L47
this will avoid that NPE and you will see whether that fixes your problem.


#5

@damencho thank you again for the reply,

I am a developer but not a java dev. I don’t have, or even know how to setup and build the Jitsi project. Would I be able to provide you with any information so you could test this yourself? For example, I could provide some temporary credentials on system and some BLF values to subscribe to that should hint for you. Would that work?


#6

@damencho I’m not sure if you saw my last message but would you be willing to do that?

I’d be willing to pay to get this BLF functionality working correctly. If you’re interested please let me know!


#7

Yeah, I saw it. Sorry, I’m not doing that kind of work. I will take a look at it at some point when I have time, but at the moment spare time is very limited…changing continents :slight_smile:


#8

Thank you for the reply and good luck with the move.

Anyone else interested in looking at this code?

I’m guessing I’ll try IRC and then submit as a bug on Github. (there are a lot of open issues so that feels like it could be a black hole) :frowning:

EDIT: Bug report added. https://github.com/jitsi/jitsi/issues/542