[ejabberd] how to enable the jingle nodes into ejabberd

cmeng cmeng at dallab.com.sg
Fri Feb 15 06:53:01 MSK 2013


Do Nguyen Ha <donguyenha <at> gmail.com> writes:

> 
> Hi Cuong Thai
> 
> the way you me is used the exmpp component but it is still doesnt work
> because when i do ./start there is nothing show up in jn_component.log
> 
> could you guide me in more details
> 
> Thank you
> Ha`
> 
> On Mon, Nov 12, 2012 at 10:56 PM, Cuong Thai <cuong.thai <at> htklabs.com> 
wrote:
> > Hi Do Nguyen Ha,
> >
> > Just configure as they present in wiki
> > + in ejebberd config, we declare localhost (127.0.0.1)
> > + in jn_component.cfg, we declare public ip, public domain.
> >
> > I haven't used jinglenodes, but I have solution for 1-1 call and conference
> > call:
> > + 1-1 call: just peer-2-peer
> > (4.bp.blogspot.com/_KyMCCsOr4Bk/SpU_GLis97I/AAAAAAAAAC8/hTZ88A1FEgs/s1600-
h/Jingle-ICE.png)
> > + conference call: I use SIP server (freeswitch)
> >
> > Regards,
> > Cuong Thai.
> >
> > On Sat, Nov 10, 2012 at 7:46 AM, Do Nguyen Ha <donguyenha <at> gmail.com> 
wrote:
> >>
> >> Hi
> >>
> >> i want to install the jingle node into ejabberd server and i edit the
> >> ejabberd.cfg to add some lines
> >>   {mod_jinglenodes, [
> >>                      {host, "jinglenodes. at HOST@"},
> >>                      {public_ip, "192.168.1.148"},
> >>                      {purge_period, 5000},
> >>                      {relay_timeout, 60000}
> >>
> >> but it doesnot work :(
> >>
> >> could someone help me to make jingle node relay to work
> >> http://code.google.com/p/jinglenodes
> >>
> >>
> >> Thank you
> >> _______________________________________________
> >> ejabberd mailing list
> >> ejabberd <at> jabber.ru
> >> http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> >
> > _______________________________________________
> > ejabberd mailing list
> > ejabberd <at> jabber.ru
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> 

====================================================
Hi,

Jinglenodes actually implements two different methods to offer Jingle Relay 
Nodes services for ejabberd.

a. as ejabberd module plugi (ejabberd_mod_jinglenodes)
b. as ejabberd service using port 8888(jnsapi_erlang)

The one described in the following site is for (b) installation.
   https://code.google.com/p/jinglenodes/wiki/Erlang_Jingle_Nodes_Service

Just follow the instruction and install. However this jinglenodes service 
uses 'lager" messaging log - A logging framework for Erlang/OTP.
   https://github.com/basho/lager
And your environment must setup to support this.

I have tried but still unable to get lager to work, so instead I modified the 
include file i.e. jn_component.hrl as below and forget about lager.

%%-define(INFO_MSG(M, P), lager:info(M, P)).
%%-define(ERROR_MSG(M, P), lager:error(M, P)). 
-define(INFO_MSG(Format, Args), io:format(Format, Args)).
-define(ERROR_MSG(Format, Args),io:format(Format, Args)).

You need to do a "make" after the changes.
Also I need to make some changes in start.sh as below:
erl -sname JingleNodes -pa deps/*/ebin -pa ebin/ -s app_jn_component -
detached -noinput -noshell -env ERL_MAX_PORTS 65000
i.e. hange -name to -sname.

you can then start the jinglenodes serve by execute ./start.sh
or alternative issue the command as below to view message log on terminal.
$ erl -sname JingleNodes -pa deps/*/ebin/ -pa ebin/ -s app_jn_component

You can use PSI+ to do a service discovery and "jn.localhost" should be listed 
as one of the service.

If you intend to use ejabberd module method (a) to install, then check out the 
code:

svn checkout 
http://jinglenodes.googlecode.com/svn/trunk/ejabberd_mod_jinglenodes 
ejabberd_mod_jinglenodes 

Then refer to the sub-directory file ./etc/ejabberd.cfg on how to configure 
the ejabberd ejabberd.cfg i.e.

  {mod_jinglenodes, [
		     {host, "jinglenodes. at HOST@"},
		     {public_ip, "192.168.1.148"},
		     {purge_period, 5000},
		     {relay_timeout, 60000}
		    ]},

Then restart ejabberd, similarly you can use PSI+ for service discovery to 
verify the module is working.

However what I find out for both (a) and (b) installation, the jinglenodes 
failed to response to the below <iq>: 
<channel xmlns='http://jabber.org/protocol/jinglenodes#channel' 
protocol='udp'/>

This needs jinglenodes team to help investigate.

Hopefully the above instruction help.




More information about the ejabberd mailing list