Skip navigation
1688 Views 4 Replies Latest reply: Jul 28, 2010 1:43 AM by jcorreia RSS
jcorreia Bronze 113 posts since
Mar 29, 2005
Currently Being Moderated

Nov 24, 2009 9:58 AM

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
john 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                                      
mike@xxx.com     

                           Port A                                  Port B                   

xxx.com/63.xxx.xxx.115:51896  xxx.com/63.xxx.xxx.115:51634
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                                                    
mike@xxx.com    

                         Port A                                  Port B

xxx.com/63.xxx.xxx.115:51896  xxx.com/63.xxx.xxx.115:51310 
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 :

 

<iq to="rtpbridge.xxx.com" id="Jeti_0.3118336870507311_9" type="set">
  <rtpbridge xmlns='http://www.jivesoftware.com/protocol/rtpbridge' sid='3385253638444863176'>
    <relay  sid='3385253638444863176' pass='138273123999387531' porta='51896' portb='51310' hosta='xxx.com' hostb='xxx.com' />
  </rtpbridge>
</iq>

 

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

 

<iq to="rtpbridge.xxx.com" id="Jeti_0.8233371688830222_13" type="set">
  <rtpbridge xmlns='http://www.jivesoftware.com/protocol/rtpbridge' sid='2985147453666994015'>
    <relay  sid='2985147453666994015' pass='4577617191890996782' porta='51310' portb='51896' hosta='xxx.com' hostb='xxx.com' />
  </rtpbridge>
</iq>

 

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

  • barata7 Silver 192 posts since
    Mar 7, 2006
    Currently Being Moderated
    Nov 24, 2009 10:21 AM (in response to jcorreia)
    Re: media proxy ports logic - bug in openfire ?

    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

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points