Have you ever thought about how this simple announcement works? Most of the (IMS aware) people believe that in order to establish a media session an UAC (originator’s handset) has to send the SIP ACK. This is true as long as we don’t need to inform the originator before the real voice or video call is established – e.g. running low on credit, informing about calling into foreign network, playing customized ring back tones etc.
In order to achieve this functionality the RFC 3960 introduced a concept of Early Media. The basic call can look like this:
In general this early media can be generated by caller, callee or both. In case that B2BUA is present – which is the case of TAS in VoLTE, the B2BUA can establish the Early Media session too.
There are two basic ways how to establish the early media. Firstly it can be based on forking. This simple mechanism has problems which relate to forking itself and security. Generally this method is supposed to be obsolete. Therefore we will not go into the details.
The second way requires a support of early media by network elements. Actually there are two models – Gateway Model and Application Server Model. The Gateway Model is only acceptable in situations where the UA can’t distinguish between early media and regular media e.g. PSTN GW. The Application Server Model is the most important for us and requires a support of early media by UA.
P-Early-Media: supported Supported: early-session Content-Disposition: early-session
In a common scenario when we need to play an announcement before the regular media session the TAS and MRF will do the job. That’s why we call it Application Server Model. TAS is responsible for the signalling and selection of the announcement and MRF is responsible for the media.
I hope you noticed that the flow is a bit simplified. Of course, the response has to always backtrack the path of the request and we can’t skip like this 🙂
Once the TAS is informed that the announcement was played it can continue with forwarding of the original SIP INVITE. Or it can send a final response as e.g. 487 Request Terminated (see the example for Outgoing Call Barring). Note that early media can be triggered by both O-TAS (e.g. calling in a foreign network) and T-TAS (e.g. ring back tones).