Results 1 to 7 of 7

Thread: Client IP

  1. #1
    Join Date
    Mar 2013
    Posts
    9

    Default Client IP

    Hi,

    I developed a player to reproduce a wowza streaming and hosted both wowza and player (embedded in a website) in an Amazon Server.
    It's working perfectly, but now i need to gather a few user informations, such as IP, and I'm not sure whether the method I'm using is the correct one or not. What I am using is:

    if(stream.getRTPStream()!=null){
    IP = stream.getRTPStream().getOutHost();
    } else {
    if(stream.getHTTPStreamerSession()!=null){
    IP = stream.getHTTPStreamerSession().getIpAddress();
    } else {
    IP = stream.getClient().getIp();
    }
    }

    Well, right now I'm getting the same IP that appears in Wowza Logs. My problem is that the identified IP is from the Player server, and not from my client. Do you know any issues related to that, or if there is another method to get the Client IP from Wowza? Seems to me that the problem is in the player, but I'd like to confirm that.

    Thanks in advance,

    Joćo

  2. #2
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    Can you confirm that the IP is only incorrect when using RTP/RTSP?
    It looks like you will have to change this line

    IP = stream.getRTPStream().getOutHost();
    to
    IP = stream.getRTPStream().getSession().getIp();
    Jason

  3. #3
    Join Date
    Mar 2013
    Posts
    9

    Default

    Hi Jason,

    I already corrected that on my source, thanks a lot. However, the problem with RTMP streams, of course, continues..

    Is it now a player problem, or can I solve it wioth wowza?

  4. #4
    Join Date
    Sep 2011
    Posts
    1,933

    Default

    Hi
    The code above will definitely get you the IP address of the clients connected so I'd have to guess that this is a player problem.

    Jason

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    For RTMP streams you can use onConnect

    public void onConnect(IClient client, RequestFunction function, AMFDataList params)
    {
    String ip = client.getIp();
    }
    Richard

  6. #6
    Join Date
    Mar 2013
    Posts
    9

    Default

    Hi Richard,

    Yes, I know, the problem is that I need to have the duration information and the client IP. Therefore, I preferred to let this code in onStreamDestroy.. But, it works in both configurations, right?

    Joćo

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I would use IMediaStreamActionNotify3.onStop()

    http://www.wowza.com/forums/content....es-codec-info)

    Richard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •