Media proxy ports logic - bug in openfire?

Hi,
I need some clarification in the way media proxy is supposed to work with port A and Port B,
because I am confunsed or I did find a bug in Openfire.

Let me explain, when I establish a direct connection between clients (inside a lan), the established connections area as follows

Port A Port B
j*ohn Created RTP session at 192.168.16.121:**11796 **to: 192.168.16.110:13016
mary Created RTP session at 192.168.16.110:**13016 *to: 192.168.16.121:11796

So, if we call the first ip “Port A” (like in media proxy) and the second “Port B” (to try to understand the logic behind media proxy),
we can notice that the ports are crossed between the users. This is, john port B connects to mary Port A, and john Port A equals mary Port B.

This works and I can Understand.

My problem is that outside lan media proxy is not working, because when we try to establish a bridge, this is what happens in media server sessions logger in openfire

  •  Creator                                      
    

1 mike@xxx.com *

  •                       Port A                                  Port B                    *
    

*xxx.com/63.xxx.xxx.115:**51896 **xxx.com/63.xxx.xxx.115:**51634 **
2 ann@xxx.com *

*xxx.com/63.xxx.xxx.115:**51310 **xxx.com/63.xxx.xxx.115:**51488 ***

This isn´t working, I suppose because there are no ports crossed.

Following the same logic I think that media server sessions would be correct if they were like this :

Creator
1 mike@xxx.com

Port A Port B

xxx.com/63.xxx.xxx.115:**51896 **xxx.com/63.xxx.xxx.115:**51310 **
2 ann@xxx.com

xxx.com/63.xxx.xxx.115:**51310 **xxx.com/63.xxx.xxx.115:**51896 **

Notice that port A from mike is port B of Ann, and vice versa

Is it suppose to be working like this ?
And here is another doubt, should this 2 sessions exist ? or just one was enough ?

I suppose it´s this the correct way to work, because I discovered that I was sending some stanzas to the server, so he can change the port sessions,
but it is not having any effect, and I think this is a openfire bug, or my logic is wrong.

The stanzas I send are

mike sends :





This is the instruction to openfire to change port B of mike to 51310, but it doesn´t DO, because as you can check port B is 51634.

Following Ana, she sends





And Anna is doing the same thing, asking to change port B to 51896 (so it crosses with port A of mike), but openfire isn´t doing anything because her port B
remains 51488.

Is this correct ? Can this be a bug ? Debug logs doesn´t show anything suspicious.

P.S :

I did manage to have media proxy working, after reading some posts here, but I´m not sure if it is the correct way, because seems like a workaround.
The way it worked was using only one media season, and making Ana connecting to port A and mike To port B.

Like this :

*ann@xxx.com xxx.com/63.xxx.xxx.115:55310 xxx.com/63.xxx.xxx.115:55896
*

The second media session is created, but deleted by openfire due to innactivity.

Thanks

Hi,

In a Media Proxy, the behavior MUST be crossed. But not sure about current Openfire code, as I stopped working on it a few years ago.

Please check: http://xmppjingle.org

The Media Proxy Specs in Openfire are obsolete, I might update it at some point, but if you need same functionality you can have it by using a Jingle Node Service API, which is even simpler to install and use.

Regards,

Thiago

Thanks for your anwser,

At least we know how it is supposed to work, because there is a lack of documentation regarding this.

Then this is a bug, can someone submit this issue to jira ?

Regarding openfire being obsolete, I´m afraid that you are right to media proxy, and each day in everything, because this project is being slowly abandoned, which is a shame since it is the best and more administrator friendly

I would adopt jingle nodes, if I find it easy and had the time, but from what I´ve read so far, doesn´t sounds as simple as media proxy in openfire. Maybe you could add it to openfire, since I´ve read in your blog you are adding it to ejabberd as a service

Even so if you document in baby steps in http://xmppjingle.org how to implement jingle nodes (service and client api), I´m sure more people would join and improve it. Some benchmarks about memory consuption, cpu …etc…would be nice. I understand that the project is taking the first steps, and needs time…I´m sorry, but from what I´ve read I only managed to be confunsed

Hey,

Check Openfire Trunk for Jingle Nodes plugin for openfire.

Thanks, I will test and use it gladly