I can't get voipcheap to fail to give early media so far today. I thought it might be helpful to show a Wireshark flow diagram of a call I made from my OBi today via voipcheap to my mobile – see attached voipcheap1. Roughly speaking:
SIP signalling controls the call.
RTP (Real Time Protocol) carries any tones and speech.
SDP (Session Description Protocol) states which codecs are being offered and what ip address / port to send the RTP stream to.
Call sequence – just the important bits:
INVITE – first INVITE from OBi says "hello I want to talk to you" it includes SIP contact info plus SDP.
401 from voipcheap says "I don't know you, who are you?"
INVITE – second INVITE from OBi same as first, but now also includes your username and password.
183 Session Progress / SDP from voipcheap (heading is cut short on flow chart). This is instead of a 180 Ringing message. By sending SDP to the OBi it's telling OBi the ip address and port to send its RTP stream to. OBi automatically reacts to receiving this information by sending RTP to voipcheap. Voipcheap also sends RTP to OBi and so "early media" is established.
200 OK SDP is the signal that the called party has answered. RTP media is already established so chatting can commence.
The BYE sequence can be in any order depending who hangs up first.
I looked at a few other voip providers. SIP2SIP use 180 Ringing and never 183. This means the OBi always uses its internal tones. Sipgate uses both 180 and 183 – not sure why, but "early media" is always the result. All a bit messy!
Attached voipcheap2 is the frequency graph of the "early media" RTP, clearly shows the classic UK ring tone. I also listened to it. I hope it's not illegal to record and listen to calls to yourself