[jitsi-dev] dialing from an API, async messaging


#1

I've been running Jitsi as part of another application, they are
deployed together using JNLP / WebStart and run in the same JVM.

Is there any API method in Jitsi that the other application should call
directly to initiate a call?

Alternatively, has anybody thought about offering some kind of async
message queue (maybe JMS) support with Jitsi? A lightweight message
broker like FFMQ could potentially run in the same JVM.

People deploying Jitsi could then use the built-in broker or they could
direct Jitsi to talk to a standalone broker (ActiveMQ, HornetQ, etc)

Applications could send commands over a queue (e.g. "dial audio
sip:foo@example.org") and Jitsi could send status messages on a topic
(e.g. "connected to sip:foo@example.org")

Regards,

Daniel


#2

Hey Daniel,

I've been running Jitsi as part of another application, they are
deployed together using JNLP / WebStart and run in the same JVM.

Is there any API method in Jitsi that the other application should call
directly to initiate a call?

This can be done by simply running "jitsi sip:1234". You may want to check how SIPCommunicator.java passes these arguments to the arg handler in Jitsi. Maybe this would do the job for you?

Emil

···

On 07.07.14, 15:11, Daniel Pocock wrote:

Alternatively, has anybody thought about offering some kind of async
message queue (maybe JMS) support with Jitsi? A lightweight message
broker like FFMQ could potentially run in the same JVM.

People deploying Jitsi could then use the built-in broker or they could
direct Jitsi to talk to a standalone broker (ActiveMQ, HornetQ, etc)

Applications could send commands over a queue (e.g. "dial audio
sip:foo@example.org") and Jitsi could send status messages on a topic
(e.g. "connected to sip:foo@example.org")

Regards,

Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
https://jitsi.org


#3

jitsu:sip:1234567 will dial phone number 1234567??

Is this from the CLI? Which part of "the" manual has more information?

If I might, to a degree, hijack this thread, what is the syntax to do this
from a Java program.

-Thufir

···

Sent from my tablet, pardon any formatting errors.
On Jul 7, 2014 9:15 PM, "Emil Ivov" <emcho@jitsi.org> wrote:

Hey Daniel,

On 07.07.14, 15:11, Daniel Pocock wrote:

I've been running Jitsi as part of another application, they are
deployed together using JNLP / WebStart and run in the same JVM.

Is there any API method in Jitsi that the other application should call
directly to initiate a call?

This can be done by simply running "jitsi sip:1234". You may want to check
how SIPCommunicator.java passes these arguments to the arg handler in
Jitsi. Maybe this would do the job for you?

Emil

Alternatively, has anybody thought about offering some kind of async
message queue (maybe JMS) support with Jitsi? A lightweight message
broker like FFMQ could potentially run in the same JVM.

People deploying Jitsi could then use the built-in broker or they could
direct Jitsi to talk to a standalone broker (ActiveMQ, HornetQ, etc)

Applications could send commands over a queue (e.g. "dial audio
sip:foo@example.org") and Jitsi could send status messages on a topic
(e.g. "connected to sip:foo@example.org")

Regards,

Daniel

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

--
https://jitsi.org

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

I'm quite happy to look at that and use it in testing

Is it an API that you would want to promote for this purpose though, or
would you prefer to have some wrapper layer around it as the official
Jitsi developer API if more people want to do stuff like this?

···

On 07/07/14 20:14, Emil Ivov wrote:

Hey Daniel,

On 07.07.14, 15:11, Daniel Pocock wrote:

I've been running Jitsi as part of another application, they are
deployed together using JNLP / WebStart and run in the same JVM.

Is there any API method in Jitsi that the other application should call
directly to initiate a call?

This can be done by simply running "jitsi sip:1234". You may want to
check how SIPCommunicator.java passes these arguments to the arg handler
in Jitsi. Maybe this would do the job for you?


#5

I just had a closer look

The args are passed from main to LaunchArgHandler.
It passed the URI to ArgDelegator which then waits for an ArgDelegationPeer.

ArgDelegationPeerImpl.handleUri() then does the real work, looking at
the scheme prefix and finding the correct handler or displaying an error.
https://github.com/jitsi/jitsi/blob/master/src/net/java/sip/communicator/impl/argdelegation/ArgDelegationPeerImpl.java#L141

I don't think it is ideal for people to call
ArgDelegationPeerImpl.handleUri() directly from other code although the
logic in that function appears to be the correct logic for handling a
URI from outside OSGi (e.g. from the launcher/main method/other code in
the JVM).

Maybe some other class can be created as a facade, e.g.

package net.java.sip.communicator.launcher;
public class Integration {
   public static void dial(Uri target) {
      // finds existing main class instance
      // passes the target URI to LauncherArgs somehow
   }
}

The other solution may be JMS - maybe FFMQ can be run as a JMS bundle
and then another bundle can read messages from the queue and call the
handleUri() method.

···

On 07/07/14 23:21, Daniel Pocock wrote:

On 07/07/14 20:14, Emil Ivov wrote:

Hey Daniel,

On 07.07.14, 15:11, Daniel Pocock wrote:

I've been running Jitsi as part of another application, they are
deployed together using JNLP / WebStart and run in the same JVM.

Is there any API method in Jitsi that the other application should call
directly to initiate a call?

This can be done by simply running "jitsi sip:1234". You may want to
check how SIPCommunicator.java passes these arguments to the arg handler
in Jitsi. Maybe this would do the job for you?

I'm quite happy to look at that and use it in testing

Is it an API that you would want to promote for this purpose though, or
would you prefer to have some wrapper layer around it as the official
Jitsi developer API if more people want to do stuff like this?


#6

From my tablet.

Why do you need to find the main class? I guess in order to send it args?

Pardon, that strikes me as fragile. Much better to send an object, URI, if
that's what's required, to ________.

At least IMHO.

Is this not a current feature?

Alternately, can the arts just get sent from the console?

-Thufir