You are here: CSP Developer’s Guide: Internet Protocol > 5 Session-Initiation Protocol (SIP) Software > Early Media

Early Media

Overview

Early media is the ability of two SIP User Agents to communicate before a SIP call is actually established. Typically, this scenario occurs when the called party is a PSTN gateway. Before the call is set up, the gateway might provide in-band tones or announcements that inform the caller of the call progress.

Early media can involve the transfer of media from caller to callee. Within the PSTN, forward channels can be established to convey DTMF signaling to select a final destination to call. This feature can be used to access Interactive Voice Response (IVR) systems "behind" 800 numbers.

Pertinent Specification

RFC 2543/3261

Description

The SIP implementation:

• connects the media path prior to the 200 OK message.

• supports pre-answer DTMF and announcements.

• converts the SS7 Call Progress (CPG) message to a 183 response message with SDP.

When the called party wishes to send early media to the caller, the called party sends a 183 response to the caller. That response contains the SDP. When the caller receives the 183 response, it suppresses any local alerting of the user (for example, audible ring tones or pop-up window) and plays out media that it receives.

If the call is ultimately rejected, that called party generates a non-2xx final response. When the caller receives this response, the caller stops playing out or sending media. If the call is accepted, the called party generates a 2xx response and sends that to the caller. Media transmission continue as before.

API Messages

See the PPL Event Request message (Event ID 0x001F) which is used to generate early media.

Call Flow

Inbound Call - Initiated by host application

In the following call flow, the host application can use PPL Event Request (event id 31) to initiate early media.

Example: For Bearer On Call:

X->H - 00 11 00 44 00 02 ff 00 01 0d 03 00 00 00 00 a7 00 1f 00

Example: For Bearer Off Call:

X->H

00 3f 00 44 00 06 ff 00 01 0d 03 00 07 01 00 a7 00 1f 01 03
00 33 00 29 00 01 29 ff 00 23 2a 0e 00 04 0a 0a 41 87
2a 01 00 17 2a 03 00 01 00 2a 07 00 04 00 00 15 a0 2a
02 00 06 2a 08 00 02 00 02

Outbound Calls

For outbound calls, the CSP detects early media when it receives the 183 response with the Session Description Protocol (SDP) from the host application.

The SIP layer would inform early media detection to host application via PPL Event Indication (Event ID 31) and send the internal Call Progress message.

Example:

X ->H

00 3f 00 43 00 06 ff 00 01 0d 03 00 07 01 00 a7 00 1f 01 03
00 33 00 29 00 01 29 ff 00 23 2a 0e 00 04 0a 0a 41 87
2a 01 00 17 2a 03 00 01 00 2a 07 00 04 00 00 15 a0 2a
02 00 06 2a 08 00 02 00 02

The following is a typical 183 response message:

SIP/2.0 183 Session Progress

To: <sip:4566@10.10.65.20>;tag=414327a01

From: "User id" <sip:36388@10.10.65.20>

Call-ID: c3943000-22807c6-2737ef30-312e3031@10.10.65.137

CSeq: 101 INVITE

Contact: 4566<sip:4566@10.10.65.20:5060>

Via: SIP/2.0/UDP 10.10.65.137:5060

User-Agent: Excel/80.60.133

Content-Type: application/SDP

Content-Length: 143

v=0

o=sip 162471 162471 IN IP4 10.10.65.20

s=SIP_Call

c=IN IP4 10.10.65.101

t=2209151129 0

m=audio 10844 RTP/AVP 0

a=rtpmap:0 PCMU/8000

Session-Initiation Protocol. A signaling protocol used for establishing sessions in an IP network. A session could be a simple, two-way telephone call, or it could be a collaborative multi-media conference session.
Public Switched Telephone Network
See Integrated Voice Response.
See Signaling System Number Seven.
See Programmable Protocol Language.
A condition that, when met, drives a state machine from one state to another. A condition that drives a Component out of its current state by invoking an associated primitive.
In PPL, a condition that, when met, drives a state machine (PPL Component) from one state to another, by invoking an associated Primitive. In PPL files, an Event is marked by an arrow and text.
Real-Time Transport Protocol. Supports transport of real-time data like interactive voice and video over packet-switched networks.