Project

General

Profile

Connecting to other public XMPP services?

Matthew M
Added over 5 years ago

Hi Tigase Team,

I wonder is it possible for Tigase server connecting to other public XMPP servers or services? For example, is it for a Tigase user to add a Gtalk or Facebook user as a buddy and chat with them? Is there any settings on Tigsae server that should be adjusted to allow this?

Many thanks in advance!


Replies (10)

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

This is called XMPP s2s connection and is supported out of the box and enabled by default. You just need a correct DNS configuration for your system.

However, Facebook does not support XMPP s2s connections so it is not possible to communicate with FB users this way. GTalk, on the other hand works without any problems.

Another option for other XMPP, FB, ICQ, MSN, ... are transports, which are components allowing XMPP users to connect to their accounts on other IM networks.

Added by Matthew M over 5 years ago

Thanks for the reply and this is very helpful, thank you! It's great that Tigase enables s2s out of box.

1. DNS

 You just need a correct DNS configuration for your system

To my understanding, I just need to

(1) open up port 5269 for s2s Tigase server through firewall to allow connection to other public servers

(2) Set up DNS record as (assuming my Tigase is xmpp.example.com) :

_xmpp-client._tcp.example.com. 18000 IN SRV 0 5 5222 xmpp.example.com.
_xmpp-server._tcp.example.com. 18000 IN SRV 0 5 5269 xmpp.example.com.

I got this from this doc: I wonder if that doc is right or you have better recommendations for readings?

2. XMPP s2s connection

I am trying to understand more about XMPP s2s architect or "how it works". There are a number of XEPs, but I am not sure

if they are relate to this concept. Are the following protocol used by Tigase?

(1) Server Dial back: http://xmpp.org/extensions/xep-0220.html,

(1) Inter-Domain Federation: http://xmpp.org/extensions/xep-0238.html

Am I missing other specs or you have any suggestion for the doc to read to get a better understanding of s2s and XMPP clustering (I know that tigase supports cluster too) ?

3. XMPP Transports / Gateway

Another option for other XMPP, FB, ICQ, MSN, ... are transports

Do you mean XMPP Gateway spec : http://xmpp.org/extensions/xep-0100.html ? Is there any good public gateway service, or open source project that we could build from?

Thanks again for your information and I really appreciate!

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

To my understanding, I just need to

(1) open up port 5269 for s2s Tigase server through firewall to allow connection to other public servers

Correct.

(2) Set up DNS record as (assuming my Tigase is xmpp.example.com) :

[...]

I got this from this doc: I wonder if that doc is right or you have better recommendations for readings?

I would make a minor correction to make sure we both understand this correctly.

Let's say you want to make it work for domain: your-company.im

and your server machine is available under the address: xmpp.server-machine.net

Then:

_xmpp-client._tcp.your-company.im. 18000 IN SRV 0 5 5222 xmpp.server-machine.net.
_xmpp-server._tcp.your-company.im. 18000 IN SRV 0 5 5269 xmpp.server-machine.net.

h1. 2. XMPP s2s connection

I am trying to understand more about XMPP s2s architect or "how it works". There are a number of XEPs, but I am not sure

if they are relate to this concept. Are the following protocol used by Tigase?

(1) Server Dial back: http://xmpp.org/extensions/xep-0220.html,

(1) Inter-Domain Federation: http://xmpp.org/extensions/xep-0238.html

Yes, Tigase implements both of these extensions.

Am I missing other specs or you have any suggestion for the doc to read to get a better understanding of s2s and XMPP clustering (I know that tigase supports cluster too) ?

h1. 3. XMPP Transports / Gateway

[...]

Do you mean XMPP Gateway spec : http://xmpp.org/extensions/xep-0100.html ? Is there any good public gateway service, or open source project that we could build from?

Have a look here, this is what is we use on tigase.im:

http://spectrum.im

Added by Matthew M over 5 years ago

Many thanks Artur! These are great information and I will read more of those. Thanks again!

Added by Samir Kumar about 4 years ago

Matthew M wrote:

Hi Tigase Team,

I wonder is it possible for Tigase server connecting to other public XMPP servers or services? For example, is it for a Tigase user to add a Gtalk or Facebook user as a buddy and chat with them? Is there any settings on Tigsae server that should be adjusted to allow this?

Many thanks in advance!

Hi Guys,

I am also facing the same issue. In my use case I want to use tigase server to tigase server communication. I know from the documentation/blogs that it is possible via s2sConnectionManager logic of tigase. Having said that, please let me know , if there are any specific configuration changes required. In addition, just wanted to share that I am using direct ip address instead of using FQDN for the servers.

Thanks in advance

Regards

Samir

Added by Samir Kumar about 4 years ago

Just would like to add that , as a part of the POC we are using two PCs in the same LAN/network and hence are using ip addresses directly

Regards

Samir

Added by Samir Kumar about 4 years ago

Hi Artur,

Just would like to elaborate the scenario to make things simpler and it would be great if you could please help in this regards.

Following is a call flow to describe the use case : [ C1 : XMPP client1 , S1 : Tigase XMPP Server 1 , S2 : Tigase XMPP Server 2 and C2 : XMPP Client 1]

C1 <== ws/wss==> S1 <===bosh==> S2 <== ws/wss ==> C2

We have been able to successfully complete the C1 to S1 communication over ws (websocket). But now struggling in S1 to S2 communication.As mentioned in the tigase docs & blogs, s2s comm. is by default enabled and thus it would be great if you could comment/help in this regards. Following are few of my interpretation based upon the blogs/docs and please correct me if I am wrong.

In order to execute the s2s communication, S1 should first know/identify that the xmpp packet needs to be forwarded to S2 using s2s communication.There could be 3 possibilities

(1) C1 tells S1 by putting S2 domain in the to header of xmpp packet to = user2@S2.com ( just an example). S1 looks for this in virtual hosts and if not found forwards it to S2 ( after DNS resolution)

(2) S1 is pre-configured to forward the xmpp packets to S2 always ( this looks to be remote possibility)

(3) Combination of both the above possibilities

Please let me know your comments.

In addition, as mentioned earlier , we are running S1 & S2 in two PCs in the same LAN/network. Hence using ip address directly instead of fqdn of the servers.

Thanks in advance

Thanks and Regards

Samir

Added by Wojciech Kapcia TigaseTeam about 4 years ago

What you need to provide is as resolution of network name to IP. SO for example

S1 hosts DomainS1_1@, @DomainS1_2

S2 hosts DomainS2_1@, @DomainS2_2

Now there is a client client1@DomainS1_1 which sends message to client2@DomainS2_2.

S1 needs to know where to send the message and connect to such server, which entails resolution of DomainS2_2@. This could be as simple as entry in @/etc/hosts (i.e. @DomainS2_2 192.168.1.2@).

Added by Samir Kumar about 4 years ago

Thanks a lot. I will try this one.

Thanks again

Regards

Samir

Added by Samir Kumar about 4 years ago

It worked :-) Just added Domains and added proper DNS settings. Thanks again for sharing the information

Regards

Samir

    (1-10/10)