Red5 && S2S

Hi all,

I’ve got 2 open fire servers configured to work together in S2S and I want to make work the red5 with users from both servers.

I have read this post and I don’t want to rtmtp because the both servers are on the same lan (10.2.24.246 & 10.2.24.247) but I can’t make it work. When I try to make a call with a user on the other server a notification popup appears and tells me “contact user user@my_server not found”.

Do you have an idea ?

NB : I’m sure that my S2S connection works, and even the media proxy because I can make a standard call (non red5) without any problem.

Thank’s for your answers !

The problem seems to be here:

XMPPServer server = XMPPServer.getInstance();
try {
     //if (server.getUserManager().isRegisteredUser(new JID(targetJID))) {
          User xmppUser = server.getUserManager().getUser(targetJID.substring(0, targetJID.indexOf("@")));           if (server.getPresenceManager().getPresence(xmppUser) != null) {                if (server.getPresenceManager().getPresence(xmppUser).getShow() != Presence.Show.dnd && server.getPresenceManager().getPresence(xmppUser).getShow() != Presence.Show.away) {
                    Message message2 = new Message();
                    message2.setID(iq.getID());
                    message2.setTo(targetJID);
                    message2.setFrom(plugin.getComponentJID());
                    Element phoneEvent2 = message2.addChildElement("phone-event", "http://jivesoftware.com/xmlns/phone");
                    phoneEvent2.addAttribute("type", "RING").addAttribute("device", "Red5").addAttribute("callID", iq.getID());
                    phoneEvent2.addElement("callerID").setText("ring" + "|" + jid.toString() + "|" + plugin.getParameters());
                    phoneEvent2.addElement("callerIDName").setText(user);
                    send(message2);                } else      sendError("Contact user " + targetJID + " is busy or away", jid.toString());           } else      sendError("Contact user " + targetJID + " is offline", jid.toString());      //}  else sendError("Contact user " + targetJID + " cannot accept a call", jid.toString()); } catch (UserNotFoundException e) {
     sendError("Contact user " + targetJID + " not found", jid.toString());
}

The plugin assumes the sending and recieveing users are on the same XMPP domain. It should ok to send the RING event without checking for presence when users are are on different domains. Will add this change to next version.

Okay thank’s, I’m really impatient to get the next version.

I would like to make the change by myself but i’m not yet able to create my own plugin … :confused:

Fixed in the latest version (0.0.27) at http://red5.4ng.net/red5.war

Thank’s a lot dele, I gonna have a try of it !

Hi dele.

I’m coming back to my test of red5 with s2s. You are sure it is fixed ? I had a try but it tells me exactly the same error.

I have a server called “imlx1” and another called “imw2k32” and userA@imlx1 is tryin to call userB@imw2k32. The plugin answers the same error

“Contact user userB@imw2k32 not found”.

It seems this code is not working

catch (UserNotFoundException e) {

Message message2 = new Message();
message2.setID(iq.getID());
message2.setTo(targetJID);
message2.setFrom(plugin.getComponentJID());
Element phoneEvent2 = message2.addChildElement(“phone-event”, “http://jivesoftware.com/xmlns/phone”);
phoneEvent2.addAttribute(“type”, “RING”).addAttribute(“device”, “Red5”).addAttribute(“callID”, iq.getID());
phoneEvent2.addElement(“callerID”).setText(“ring” + “|” + jid.toString() + “|” + plugin.getParameters());
phoneEvent2.addElement(“callerIDName”).setText(user);
send(message2);
}

I have made a fix to catch all exceptions and still send the message. Pls try it and let me know if it works and I will add it to next release. To use fix, copy the attached red5Plugin.jar file to replace in both WEB-INF/lib and /lib folders
red5Plugin.jar (1420148 Bytes)

Thank’s for answering so quickly, dele. I’ve made the try.

It does not work but I have no notification anymore.

I’m going to analyse the packets within wireshark and I give you a better analyse of the problem.

I tryed to intercept packets with wireshark on the user side but no way. No packet found on the port 1935.

I just can find some packets called T.125 between the two clients.3

I’m gonna try with wireshark on the server side, to get more details

Here are what I get in the warns error

Server imw2k32 :

2008.08.11 11:12:47 Error verifying key of remote server: red5.imlx1
java.net.UnknownHostException: red5.imlx1
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jivesoftware.openfire.server.ServerDialback.verifyKey(ServerDialback.java:5 23)
at org.jivesoftware.openfire.server.ServerDialback.validateRemoteDomain(ServerDial back.java:465)
at org.jivesoftware.openfire.session.LocalIncomingServerSession.validateSubsequent Domain(LocalIncomingServerSession.java:227)
at org.jivesoftware.openfire.net.ServerSocketReader.processUnknowPacket(ServerSock etReader.java:153)
at org.jivesoftware.openfire.net.SocketReader.process(SocketReader.java:217)
at org.jivesoftware.openfire.net.BlockingReadingMode.readStream(BlockingReadingMod e.java:157)
at org.jivesoftware.openfire.net.BlockingReadingMode.run(BlockingReadingMode.java: 63)
at org.jivesoftware.openfire.net.SocketReader.run(SocketReader.java:120)
at java.lang.Thread.run(Unknown Source)

Server imlx1 :

2008.08.11 11:13:58 Error verifying key of remote server: red5.imw2k32
java.net.UnknownHostException: red5.imw2k32
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jivesoftware.openfire.server.ServerDialback.verifyKey(ServerDialback.java:5 23)
at org.jivesoftware.openfire.server.ServerDialback.validateRemoteDomain(ServerDial back.java:465)
at org.jivesoftware.openfire.session.LocalIncomingServerSession.validateSubsequent Domain(LocalIncomingServerSession.java:227)
at org.jivesoftware.openfire.net.ServerSocketReader.processUnknowPacket(ServerSock etReader.java:153)
at org.jivesoftware.openfire.net.SocketReader.process(SocketReader.java:217)
at org.jivesoftware.openfire.net.BlockingReadingMode.readStream(BlockingReadingMod e.java:157)
at org.jivesoftware.openfire.net.BlockingReadingMode.run(BlockingReadingMode.java: 63)
at org.jivesoftware.openfire.net.SocketReader.run(SocketReader.java:120)
at java.lang.Thread.run(Unknown Source)

Has there been any further progress made with this issue?

I am also trying to get red5 working with two servers in two different cities.

We are both using version 0.28 of Red5.