What technology is used today for communicating in space? How might a person in Mars talk to somebody on Earth?
Using radio waves.
So, first of all, "real time" is a strong word. Depending on the relative position of earth and Mars, light (and thus, electromagnetic waves) take minutes to cross that distance. You can't "have a nice chat" when you say something, and then have to wait minutes until the other end can receive that, and answer it, and for the reply to reach you. Nothing can, physically, be faster than light, so point-to-point low-latency communication is plain impossible in the universe as we know it.
"UDP" and things like the differen VoIP methods are rather high-level things that you can do as soon as you have a working IP link. As you can imagine (if you've ever lost reception with your 3G/4G phone when leaving a metropolitan area or going through a tunnel), that's a rather hard thing to achieve if the distance between you and the other end is multiple astronomical units.
So, the hard part is actually not choosing anything that runs on such a high layer of the protocol stack, but first having contact at all – in fact, if you're on the wrong side of the planet, facing away from the other planet, that becomes a very hard problem, and you'll need a very capable system of satellites orbitting your planets to relay the signals around, so that there's effectively no shadow. The sun potentially being in the way (and being an enormous source of noise) doesn't help, either.
In fact, those satellite systems do not exist; Mars missions lose connectivity for a few hours every Mars-day, when the pure geometry doesn't allow a direct line of sight.
So, your question starts far too high-leveled; it's like asking "which furniture shops did early humans go to", when the real question would be "how did early humans build housing at all".
Let me add that communication technology is a very math-rich field, and we have a lot of equations that describe theoretical limits. So, rest assured, that without a humongous antenna (think: satellite dish with dozens of meters in diameter), you simply mathematically can't achieve sufficient signal reception (and thus, signal-to-noise ratio) to even theoretically allow (not: implement) a intellegible voice call from planet surface to planet surface. (Terms to Google, if you're doing a report: SNR, Shannon's Channel Capacity, Free Space Path Loss, Antenna Gain, Background Radiation, Noise Figure)