Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
understanding-SIP.pdf
Скачиваний:
118
Добавлен:
01.03.2016
Размер:
4 Мб
Скачать
☆

9

Services in SIP

In this chapter, ways and techniques to implement services using SIP will be covered. Typical services include telephony gateway services, trunking, business services, voicemail, conferencing, fax, and video. Architectures such as application sequencing, service oriented architecture (SOA), and service delivery platforms will also be introduced.

9.1 Gateway Services

A common application of SIP is in PSTN interworking and replacement. For this application, the most important function is that of a gateway to the PSTN. A gateway is an element that converts one protocol to another—a PSTN gateway converts a SIP and RTP session into a PSTN session. As SIP is a signaling protocol, the gateway will map SIP messages to a PSTN signaling protocol such as ISDN (Integrated Services Digital Network) or ISUP (ISDN User Part). The RTP media session is converted by a gateway into a PCM trunk. Gateways are often decomposed using media gateway protocols such as MGCP and H.248. For more details on these PSTN protocols, see Chapter 11.

We have already seen how SIP can handle telephone numbers, either through a telephony URI [1] or SIP URI [2] with a telephone number in the user part. A SIP proxy server can determine when an INVITE needs to be routed to a gateway for termination in the PSTN. Other types of SIP requests, (e.g., presence, instant messaging, and so fourth) do not make sense to route to the PSTN. A proxy can also manage a dial plan for a set of UAs. A dial plan maps a dial string (digits dialed on a telephone) into a telephone number suitable for routing on the PSTN. For example, “dial 9 for an outside line” is an example of

219

220

SIP: Understanding the Session Initiation Protocol

a very simple dial plan commonly used in business telephone systems. Dial plans also allow private dialing plans within an enterprise. An example of this is when 3 or 4 digit extensions can be used to dial other extensions within the enterprise. A dial string is indicated in a SIP URI when the user=dialstring [3] parameter is present.

A gateway receives incoming INVITEs and maps the telephone number digits, which are then mapped to the called party number in the PSTN signaling. Common gateway INVITE mappings and interworking are defined in [4].

Calls from SIP to the PSTN through a gateway often make use of early media. Early media is RTP media sent prior to the call being answered. In SIP, this means media sent prior to the 200 OK response. This is usually done in SIP by the gateway sending a 183 Session Progress response, which creates an early dialog. RTP media is then sent from the gateway to the UA. Often early media carries special ringback tones to recorded announcements and tones. This is shown in Figure 9.1.

In the other direction, a telephone number dialed in the PSTN can be routed and answered by a SIP UA. PSTN routing is done by assigning telephone numbers to telephone switches. The telephone switch then sends the call to the copper loop or PBX trunk that causes the telephone to ring. For a SIP UA to ring, the SIP/PSTN gateway must appear to the PSTN as a local telephone switch. When the call is routed to the gateway, instead of sending the call to the copper loop or PBX trunk, the gateway creates an INVITE and routes it to a UA on an IP network. The INVITE can be routed to a SIP proxy server to determine the appropriate contact device.

Figure 9.1 Early media in SIP.

Services in SIP

221

9.2 SIP Trunking

In the PSTN, a trunk is a dedicated connection between PSTN switches or between a PSTN switch and a Private Branch Exchange (PBX). A trunk has both signaling and media parts. Trunks in the PSTN originally used one or two pairs of copper wires. With digital trunking and time division multiplexing, the T-1 became the standard trunk in North America with 24 voice circuits multiplexed over two pairs of wires. The E-1 was the European version with 32 voice circuits. With ISDN, the T-1 trunk became a primary rate interface (PRI), which also had 24 circuits. While there is no exact analog in SIP and Internet communications to a trunk, a SIP trunk usually means a connection between SIP telephony devices which uses IP transport and involves RTP media transport. The SIP forum [5] has published a technical recommendation called SIPconnect [6], which describes how SIP and RTP can be configured to provide SIP trunking between a service provider and an enterprise PBX. There are some similarities between SIP trunks and PSTN trunks:

•The interconnection requires configuration on both sides to work.

•VoIP and telephony services can be delivered over it.

•Telephone numbers or E.164 numbers are the identifiers used.

There are some important differences, however:

•SIP trunks do not have an inherent capacity—they are limited only by the bandwidth of the underlying IP transport and the call setup capacity of the SIP servers.

•Media quality can be better than PSTN quality.

•SIP trunks will be extended in the future to provide presence, IM, and multimedia capabilities.

SIPconnect is not a profile of the SIP protocol. Instead, it is a profile of the set of SIP-related protocols. For example, it references the following SIP standards shown in Table 9.1. These references cover SIP as well as identity and security, and RTP media. Figure 9.2 shows a typical use of SIP trunks between an enterprise IP PBX and a service provider.

9.3 SIP Service Examples

The SIP service examples document [7] shows examples of how common PBX, centrex, and business telephony features can be implemented using SIP. The

222

SIP: Understanding the Session Initiation Protocol

 

 

 

Table 9.1

 

 

SIPconnect Trunking Specifications

 

Signaling

 

 

 

 

 

 

 

 

 

RFC 3261

Core SIP

 

 

 

RFC 3264

SIP offer/answer protocol

 

 

 

RFC 3263

SIP DNS usage

 

 

 

RFC 3265

SIP events

 

 

 

RFC 3311

SIP UPDATE method

 

 

 

RFC 3323

Privacy mechanism for SIP

 

 

 

RFC 3325

SIP network asserted identity

 

 

 

RFC 3725

Third part call control

 

 

 

RFC 4028

Session timer

 

 

 

RFC 2327

SDP

 

 

 

RFC 2782

DNS SRV

 

 

 

RFC 3262

PRACK

 

 

 

RFC 3311

UPDATE

 

 

 

RFC 3325

P-asserted-identity

 

 

 

E.164

Telephone numbers

 

 

 

RFC 3761

ENUM

 

 

Media

 

 

 

 

 

 

 

 

 

RFC 3550

RTP

 

 

 

RFC 3581

Symmetric SIP

 

 

 

RFC 3966

Telephony URI

 

 

 

RFC 4028

SIP session timer

 

 

 

RFC 2833

Telephone events for DTMF

 

 

 

T.38

Fax

 

 

 

G.168

ITU-T digital echo cancellation

 

 

 

G.711

ITU-T PCM coded

 

 

NAT Traversal

 

 

 

 

 

 

 

 

 

RFC 3489

STUN

 

 

 

RFC 3581

rport

 

 

Security

 

 

 

 

 

 

 

 

 

RFC 2246

TLS

 

 

QoS

 

 

 

 

 

 

 

 

 

RFC 2474

DiffServ QoS

 

features discussed are listed in Table 9.2. For some features, the IETF has developed more detailed best current practice documents such as for call transfer [8], automatic call completion [9], and bridged line appearance/multiple line appearance [10].

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]