Code Monkey home page Code Monkey logo

Comments (2)

sobomax avatar sobomax commented on June 10, 2024 1

@vasilakisfil thanks for your interest and sorry for a delay with the reply. The situation with the "IP" in the response is somewhat convoluted. It stems from the fact that initially both RTPProxy and control protocol had no notion of listening on a specific IP along with the fact that rtpproxy was supposed to run on the same machine as Kamailio/OpenSIPS. In this the most simplistic mode of operation the RTPproxy would use bind(INADDR_ANY) for its RTP/RTCP ports allowing call control component to pick whatever IP it deems the most appropriate.

As the time went on, it became clear that in multi-homed scenarios as well as in cases when RTPproxy is running on a separate node it needs to communicate both IP and port back to the call controller. Perhaps I will have to review this situation and see if the behavior can be collapsed to a single case somehow.

from rtpproxy.

vasilakisfil avatar vasilakisfil commented on June 10, 2024

I think I found something from Kamailio's code in rtpproxy module. If I read the code right though, I think the docs are wrong. Basically these are the cases:

  • just port (like 5060): RTPProxy keeps the same AF as the request sent (so if it's IPv4, port is also in IPv4 // if it's IPv6 port is also in IPv6).
  • port with IP (like 5060 127.0.0.1): according to Kamailio, for historical reasons if RTPProxy returns a bare address (port + IP), then it is assumed that the IP address is in IPv4)
  • port with IP + '6' (like 5060 ::1 6): 6 here denotes that it's an IPv6.

In practice, in Rust parsing just the IP address using STD is possible to figure out if it's IPv4 or IPv6, but it's nice to have a complete documentation of what RTPProxy returns.

I am closing this ticket, but would be nice to get a confirmation from @sobomax

from rtpproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.