Getting Ip Address and Port From RTP Packet

493 Views Asked by At

Currently i am building an application for voice over IP using RTP in ad hoc network.I am using JMF to implement RTP. RTP packets are exchanged among peers during conversations. Now i want to get IP address and port number from RTP packets.Is their any way to do this in java?

1

There are 1 best solutions below

0
Salih Karagoz On

RTP is in Session Layer on OSI Model. Namely, RTP has Transport Layer too. It can be UDP or TCP. And RTP generally uses UDP because it's very fast. You can get the IP address and Port number with DatagramSocket class. Here is a little sample

May it be easy.