In a previous blog, I addressed the concepts of early offer and late offer. You are welcome to read the article, SIP Media Management: Early Offer vs. Late Offer, but it all boils down to a simple notion. With early offer you put SDP in the INVITE message and with late offer you put SDP in the ACK. This changes who gets to decide which codec will be used for the session. The called party decides with early offer and the calling party decides with late offer.
However, this has nothing to do with when media actually starts. Early and late offer simply define when media capabilities are exchanged. With early offer, you can put SDP in the INVITE request, but that doesn’t mean that media will be sent prior to the call being answered.
Early and late media have to do with when media starts to flow. Simply put, early media indicates that media is sent prior to the call being answered and late media indicates that media waits until the call has been answered.
Early and late media actually have nothing to do with early and late offer. You can have late offer and early media and its possible to have early offer and late media.
In order to make sense of this, you need to shift from thinking about SIP and VoIP to that analog telephone back home. For those of you who don’t own a land line, you can think about the phone at grandma’s house. The point is you need to focus on telephony prior to SIP.
When you pick up that home phone, what’s the first thing you hear? Dial tone, of course. The phone company sends dial tone to let you know that the line is working and is ready to accept digits. This is not media. This is simply a friendly, comfort noise that acts like the on/off light on a piece of electronic equipment.
Let’s keep going. You hear the dial tone, you enter the telephone number, and the call is launched. Depending on the number you dialed and the state of the called party you will hear a variety of different sounds.
Ringing is a good thing. That tells you that the called party’s telephone is alerting. You might also hear a busy signal if the other party is on an existing call.
You might also hear a message telling you that “the number you dialed is no longer in service.” Lastly, it’s possible to hear what we telephone people know of as re-order tone. This “fast busy” is often used to indicate that all circuits are busy and the call cannot be placed.
Whether it’s ring-back or re-order tone, this is media. These sounds are sent from the telephone company to tell you something about your call. If you think about it, how else can they inform you of call progress? Those old analog telephones don’t have displays. So, instead of your eyes, you use your ears to monitor how your call is progressing.
In SIP, we don’t use sounds to indicate call progress. Instead, we have response messages. 180 Ringing tells you that far-end is ringing. 486 Busy Here informs you that the far-end is busy. Your SIP device can do whatever it wants with those messages including playing sounds or displaying messages. However, if a sound is played it’s a local sound. It is not media sent to the SIP device from either the far-end or the communications system.
So, what happens when you need to interface the SIP world with the non-SIP world? Specifically, how do you deal with a system that uses media for call progress?
You let it.
Early media is simply media that is sent before a call is answered. It’s not the voice of the person you called, but rather system tones, announcements, or any other sound that the phone company wants to send your way. It’s the distinctive ringing you hear when you call a telephone in England. It’s an “all circuits are busy” message. It’s anything you might hear until you hear the called party’s voice.
Early media is typically supported by the use of the 183 Session In Progress response. Unlike a 180 Ringing response, 183 will contain SDP. This SDP is used to establish a media connection that carries those network tones and messages. It will eventually be torn down when the call is answered, but until then, it’s a way for the caller to audibly hear call progress.
I have been talking about early media in terms of the public switched telephone network (PSTN), but early media is also used by some IP PBXs. Why? Because they want to play the same kinds of sounds that the PSTN uses. They want to play announcements and country specific ring-back. Remember, PBXs are rooted in the same TDM world as the PSTN and have adopted much of its behavior.
On an Avaya system, there are a couple of places where you can enable early media. First, you can configure it on the Communication Manager by enabling Direct IP-IP Early Media on the SIP signaling group. Second, the 46xxSettings.txt file contains the parameter Enable_Early_Media. Setting it to 1 instructs the telephone to include SDP in 18x progress messages.
That’s it, folks. If you work with SIP as much as I do, I guarantee that you will run into early media, so it’s important that you are aware of what is happening. It’s not a change in SIP. It’s simply a difference in behavior that creates a bridge from the old world of TDM to the new world of IP telephony.