Issue: Command line param to call trough Jingle (XMPP, voice or video call with jabber protocol)


What I have to do to use Call Manager from /jitsi/src/net/java/sip/communicator/impl/gui/main/call/ in
I want to add some params to answer a call from command line as it was mentioned here
I’ve managed to create a call from command line, but can not answer or hangup a call.


These functionality does not exist at the moment.
The page you refer to is a Google Summer of Code project, and at the moment I cannot remember what was its status and how much of its code got into jitsi.


I searched the code for param names - so I found nothing. But I want to implement answering the call. My problem now I can not use CallManager from
Can you help with this problem?

What I already tried: added to jabber protocol manifest, added Import to file tried to call CallManager.answerCall() at method handleUri. During start I receive an error: Unable to resolve [142](R 142.0): missing requirement [ [142](R 142.0)] osgi.wiring.package; ( Unresolved requirements: [[ [142](R 142.0)] osgi.wiring.package; (]


Yes, this is correct, you cannot use CallManager inside impl.protocol.jabber.

The project is using OSGi, so you can use in bundle only classes from packages that are imported:

To add a package to the import section, that package needs to be exported from another bundle.

The CallManager is in a bundle which implements UI service and doesn’t export anything. To quickly hack it you can export that package and import it in jabber protocol, but that solution is not an option for PR and inclusion in the source code.


The solution you provided should satisfy me as a don’t know any other )

But you say the solution is hacky. What do you propose to make it right way?

Here Linus Wallgren and Emil Ivov stated the cli interface commands. But I didn’t find any realizations or ideas how they planned to implement this.


Well the right way is to move those CallManager functions in some utility in the service.protocol package, or the whole class and make sure appropriate events a fired so the gui specific stuff is still executed and do not change the current execution flow.
Basically, reorganize the code so this methods can be used from different bundles is right approach.


I tried to Export CallManager package and import into impl.protocol.jabber. Comiled well but during execution I faced another problem - CallManager tied to AWT event thread, the call to CallManager.answerCall from impl.protocol.jabber fired the guard in openCallContainerIfNecessary() and throws
“The methon can be called only on the AWT event dispatching”
+ " thread.");

I can comment this guard out but it possibly break something in GUI.
So should I somehow put CallManager in AWT event dispatching thread?


Yep, stuff like that needs to be decided when doing the re-organizing the code and exposing some events. Another solution maybe is exposing the CallManager functions through the UIService (service.gui) and leave the implementation inside the impl.gui code.
I have no good solution about this problem, I need to start playing with the code and basically start implementing it to have a good answer for you.


For me playing with the code is not easy because I have started to work with the code base not long ago.
I will try your proposal:

exposing the CallManager functions through the UIService (service.gui) and leave the implementation inside the impl.gui code.