luaxmppwebrtcjitsiprosody-im

How to send media to Jitsi videobridge using prosody?


I'm relatively new to xmpp and webrtc. Now, I try to create simple video conference web app using Jitsi Videobridge and prosody, and I don't want to use jitsi-meet, because I need to know how the basic to get jitsi-videobridge to work. Until now, I can get prosody to accept the jitsi-videobridge component. So when I run ./jvb.sh --domain=localhost --port=5347 --secret=componentsecret it will show these logs:

JVB 2017-04-21 10:52:53.798 INFO: [38] 
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-340" 
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:03.801 INFO: [40] 
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-341" 
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:13.801 INFO: [42] 
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-342" 
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:23.801 INFO: [44] 
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-343" 
type="result" to="jitsi-videobridge.localhost" from="localhost"/>
JVB 2017-04-21 10:53:33.801 INFO: [46] 
org.jitsi.videobridge.xmpp.ComponentImpl.log() RECV: <iq id="f68D9-344" 
type="result" to="jitsi-videobridge.localhost" from="localhost"/>

I take it as my jitsi-videobridge is working properly (isn't it?). But now I don't know what to do next.

So, How do I connect my client (I'm using strophe.js for my web client) to jitsi-videobridge? And how do my client be able to send media (video and audio) to jitsi-videobridge. I've been searching for awhile but I couldn't find any documentation nor any example on how to do that.

Here's my prosody prosody.cfg.lua:

admins = { 
    "agent@localhost", 
    "subkhan@localhost", 
    "subkhan@192.168.8.108", 
    "focus@auth.jitsi.localhost"
}

modules_enabled = {
        "message_logging";  -- Enable chat archive
        "tls"; -- Enable mod_tls

        "roster"; -- Allow users to have a roster. Recommended ;)
        "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
        "tls"; -- Add support for secure TLS on c2s/s2s connections
        "dialback"; -- s2s dialback support
        "disco"; -- Service discovery

        "private"; -- Private XML storage (for room bookmarks, etc.)
        "vcard"; -- Allow users to set vCards

        "version"; -- Replies to server version requests
        "uptime"; -- Report how long server has been running
        "time"; -- Let others know the time here on this server
        "ping"; -- Replies to XMPP pings with pongs
        "pep"; -- Enables users to publish their mood, activity, playing music and more
        "register"; -- Allow users to register on this server using a client and change passwords

        "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
        "admin_telnet"; -- Opens telnet console interface on localhost port 5582

        "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
        "http_files"; -- Serve static files from a directory over HTTP

        "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
};

bosh_ports = {
        {
            port = 5280;
        path = "http-bind";
        },
        {
        port = 5281;
            path = "http-bind";
            ssl = {
                key = "/var/lib/prosody/localhost.key";
                certificate = "/var/lib/prosody/localhost.crt";
            }
        }
    }

bosh_max_inactivity = 60
consider_bosh_secure = true
cross_domain_bosh = true

modules_disabled = {
    -- "offline"; -- Store offline messages
    -- "c2s"; -- Handle client connections
    -- "s2s"; -- Handle server-to-server connections
};

allow_registration = true;

daemonize = true;

pidfile = "/var/run/prosody/prosody.pid";

ssl = {
    key = "/etc/prosody/certs/localhost.key";
    certificate = "/etc/prosody/certs/localhost.crt";
}

c2s_require_encryption = true

s2s_secure_auth = true

authentication = "internal_plain"

log = {
    -- Log files (change 'info' to 'debug' for debug logs):
    info = "/var/log/prosody/prosody.log";
    error = "/var/log/prosody/prosody.err";
    -- Syslog:
    { levels = { "error" }; to = "syslog";  };
}

VirtualHost "localhost"
    enabled = true -- Remove this line to enable this host

    ssl = {
        key = "/etc/prosody/certs/localhost.key";
        certificate = "/etc/prosody/certs/localhost.crt";
    }

Component "conference.localhost" "muc"
    restrict_room_creation = true
    max_history_messages = 10
        modules_enabled = {
        "muc_log";
        "muc_log_http";
    }
    muc_log_http = { -- These are the defaults
        show_join = true;
        show_presences = true;
        show_status = true;
        theme = "prosody";
        url_base = "muc_log";
    }

VirtualHost "jitsi.localhost"
    enable = true
    authentication = "internal_plain"

VirtualHost "auth.jitsi.localhost"
    authentication = "internal_plain"

Component "jitsi-videobridge.localhost"
    component_secret = "asdqwe123"

Include "conf.d/*.cfg.lua"

Here's my sip-communicator.properties:

org.jitsi.impl.neomedia.transform.srtp.SRTPCryptoContext.checkReplay=false
org.jitsi.videobridge.NAT_HARVESTER_LOCAL_ADDRESS=127.0.0.1
org.jitsi.videobridge.NAT_HARVESTER_PUBLIC_ADDRESS=192.168.43.110

Any help or idea please? Thank you.


Solution

  • That scenario is not going to work right off the bat. We use Jicofo as the focus, which is the entity "talking" to the JVB and then the user. Here is how it works (I'm assuming you are on a web environment since you mentioned strophe.js):

    Hope that helps. Disclaimer: I work on Jitsi.