I have read a little bit about VOIP lately and as it seems most successful VOIP applications use the real-time protocol for sending data.
However I would like to know if the usage of rtp is necessary for an voip application.
Why shouldn't it work with simple UDP too?
What's the readon to use rtp? Do you get a higher routing priority through out the internet (quality of service)?
Would one be able to write a reasonably working voip application without using rtp?
First of all when you say that why we can not use UDP, that leads me to the assumption that you are not using TCP at all for this discussion.
UDP is the packet which contains some x number of bytes. When it reaches your application, then application needs to know its sequence number to avoid all sorts of issues with UDP over network(Like reordering, drop, restransmission). So need to have some bytes in UDP packets to keep the sequence number. Then when you receive the packet then application may need to know the codec or the type of payload. Then you would like to save that information in the udp packet too. Similarly you need to save timestamp of packet which tells you the timestamp relative to first packet. You also need ssrc, market bit, etc to make sense of eack packet when it reaches the application. This is very important for UDP as UDP is stateless protocol. So to save all the necessary information that will enable application to make sense of each packet, you need RTP header. And yes, RTP is the way on which many real time communication is based upon.
Now to answer your question: However I would like to know if the usage of rtp is necessary for an voip application. RTP is necessary when your application is sending data in packets and not in streams.
Why shouldn't it work with simple UDP too? My explanation above address this.
What's the readon to use rtp? Do you get a higher routing priority through out the internet (quality of service)? Routing is done based upon the IP layer and udp/tcp are transport layer protocol. So I guess in general no, but may be some service provider may do that by inspecting further into packet.
Would one be able to write a reasonably working voip application without using rtp? Receive the audio/video streams and just play them but I donot know how you would do the lip sync if one of the connection gets slow. It all depends the playing rate of the player.