Вы находитесь на странице: 1из 69

-

. . .. -

..
..
..

SIP




210400 "" :
210406 " ,
210404 " ",
210402 " ,
210407 "
,
230100 " :
230101 " , , ",
230102 " ",
230105 "
"

-
2011

621.395:658.512.22
32.882
63

:
, .. ()
, .. ()

63 SIP: / .. , .. , ..
; . , 2011.

SIP NGN. -i
SNTlite. ,
, .

621.395:658.512.22
32.882

.. , .. , .. , 2011


-
. . .. -, 2011
2

DSS1
HTTP
IETF
ISDN
NGN
P2PE
RFC
SDP
SIP
SIPT
SNTlite
UA
UAC
UAS
URI


;
;
(LAN);
;
;
7;
(PC);
;
;
;
Digital Subscriber Signaling #1 1;
HyperText Transport Protocol
;
Internet Engineering Task Force TCP/IP
,
;
Integrate Service Digital Network
;
Next Generation Network
;
Peer-to-Peer Education ;
Request For Comment - IETF , , ,
..;
Session Description Protocol -
(SIP);
Session Initiation Protocol
;
SIP for Telephony (IETF Draft) - SIP
;
Signaling Network Tester - ;
User Agent - ;
User Agent Client - ;
User Agent Server - ;
Universal Resource Identificator -
.

1. SIP
1.1.
SIP (Session Initiation Protocol) , , . ,
, , ..
[1].
SIP :
, ,
;
, , , SIP;
, ;
TCP/IP ,
Internet Engineering Task Force (IETF);
,
.323 DSS1
7, SIP SIP-, .164
.
1.2.
SIP-
. SIP- -,
, (. 1.1.).
, , ,
SIP-. , SIP- .

. 1.1. SIP

: ,
SIP (UA) SIP- , . SIP.
, , . , .

, , , , User Agent Client (UAC) User


Agent Server (UAS). UAS, UAC, User Agent (UA),
SIP.

-
- . , , , . ,
, .. - , ,
. -
, , . - (stateful)
(stateless).


.
,
.
.
. ,
.

, . ,
. ,
.

, registrar, . , (), . , .

1.3.
SIP
HTTP. SIP (. 1.2).
, , . ,
,
, , .

. 1.2. -

SIP , : . . ( ) , , .
, , .
, . - (stateful).


IP- SIP , .

SIP URI.
SIP- :
@
@
@I-
_@
, .
, .
, .
- ,
. SIP-
sip:, , SIP,
(, mailto:).
SIP:
7

sip:userA@loniis.ru

sip:userB@192.168.0.14

sip:387-76-58@gateway.ru

SIP URI,
,
SIPS URI. , sips:userB@domainB.ru. , SIPS URI,
TLS, SIP-, . .
1.4.

SIP , ISO 10646 UTF-8. SIP , .


, , (. 1.3).
: , , , , ().

. 1.3. SIP

SIP. ,
, .
, , ,
.
, , , ..
.
, -, ,
SIP. SIP , . Session Description
Protocol (SDP). SDP- SIP- ,
, , web, HTTP.


,
.
: .
. , - (Via, Route, Record-Route, Proxy-Require, Max-Forwards, ProxyAuthorization ), .
.
,
, .
: ; = ; =

, , .

Request-Line
[1]. SIP Request-Line (.
1.4). Request-Line , Request-URI
, .
(CRLF).

Request

RLF
URI

. 1.4. Request-Line

IETF RFC 3261 6 :


REGISTER, INVITE, ACK ANCEL, BYE OPTIONS.
, .
Request-URI
Request-URI .
SIP Request-URI , sip sips, tel.

, SIP-.
, SIP-, SIP-Version
SIP/2.0.

INVITE
INVITE
(. 1.5).
INVITE sip:userB@domainB.ru SIP/2.0
Via: SIP/2.0/UDP domainA.ru;branch=z9hG4bK776asdhds
Max-Forwards: 70
To: User B <sip:userB@domainB.ru>
From: User A <sip:userA@domainA.ru>;tag=1928301774
Call-ID: a84b4c76e66710@domainA.ru
CSeq: 314159 INVITE
Contact: <sip:userA@domainA.ru>
Content-Type: application/sdp
Content-Length: 142

, - . , , , SIP-.
INVITE .
ACK
ACK INVITE. UA ,
INVITE. ACK (
ACK . ).
CANCEL
CANCEL , CANCEL Call-ID, To, From
CSeq ( CANCEL .
).
BYE
BYE . ,
BYE, -
200 (OK) ( . ).
REGISTER
C REGISTER UA ,
( . ).
OPTIONS
OPTIONS
10

.
.
INFO
SIP ,
. IETF . : INFO, PRACK, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE.
INFO
SIP . INFO SIP-, , SIP.
,

, SIP .
INFO, .
UAS INFO 200
PRACK
SIP
, .
, ,
.
,
2 INVITE.

, . , PRACK. PRACK
, ACK, .
UPDATE
, INVITE. , ,
UPDATE,
offer ( SDP),
.
answer ( SDP). , UPDATE
offer, answer 2
UPDATE.

11

SUBSCRIBE NOTIFY
SUBSCRIBE
. .
, (event package),
( ) 2.
, NOTIFY, . , ,
NOTIFY. , 200 (OK), .
1.6.
UA

UA
SUBSCRIBE (1)
200 OK (2)
NOTIFY (3)
200 OK (4)
NOTIFY(5)
200 (OK) (6)

. 1.6.

REFER
REFER , , . ,
(Call Transfer). REFER Refer-To, . , UA 202 (Accepted). UA
(. 1.7).

12

Agent A

Agent B

REFER (1)
202 Accepted (2)

Agent C

NOTIFY (3)
200 OK (4)
NOTIFY(5)
200 (OK) (6)

. 1.7.

, REFER,
, , SUBSCRIBE. REFER
,
refer.
NOTIFY. NOTIFY UA, REFER, .
NOTIFY message/sipfrag, .
NOTIFY , .
MESSAGE
(Instant Messaging)
, . SIP MESSAGE
. , . , UA 200 (OK). , , , .

To, From, Call-ID, Cseq
branch Via, ,
, .
Status-Line
SIP-
Status-Line (. 1.8). Status-Line :
(Status-Code)
13

(Reason-Phrase), .
(R) (LF) CRLF.

StatusReason
ode
Phrase
. 1.8. Status-Line

RLF

, . Reason-Phrase
Status-Code, .
Reason-Phrase : - , Accept-Language .
- .

. ,
. : . ,
.
,
. [1].
(1xx)
(. 1.1)
, .
, 1 , , 200 .
1.1

100
180
183

14

Trying. . ,
,

Ringing. .
UA
Session Progress. , , , (SDP-)
(,
Call-)

(2xx)
2 (. 1.2) , .

200
202

1.2

OK.
Accepted. , . , ,

(3xx)
3 (. 1.3)

, .
1.3

300
302

Multiple Choices.
. ,
,
Moved Temporarily.
, Contact

(4xx)
4 (. 1.4) ,
. , 4,
.
1.4

400
401
404
407
480

481

Bad Request.
Unauthorized.
Not Found. . , RequestURI
Proxy Authentication Required.

Temporarily Unavailable. , (,
, , , )
Call/Transaction Does Not Exist. ,
.

15


486
487

Busy Here. ,


Request Terminated. BYE
CANCEL

(5xx)
5 (. 1.5) , - .
1.5

500
501
503

Server Internal Error.


Not Implemented. ,
Service Unavailable.
-

(6xx)
6 (. 1.6) , . .
1.6

600
603
604
606

Busy Everywhere.

Decline.
,
Does Not Exist Anywhere.
Not Acceptable. ,
, , ,


,
.
Via
, , , . branch, . -
Via, .
- Via , , , ,
.
16

To
, , . tag To.
From
, , . From
tag, UA.
Call-ID
C ,
IP- , SIP-. tag To, tag
From Call-ID SIP- A B .
CSeq
C .
.
Contact
C ,
,
. Via , , Contact
, .
Max-Forwards
C , .
Content-Type
Content-Type .
Content-Length
Content-Length .
1.5.

REGISTER
, (registrar).
REGISTER
.
, , -, 17

. REGISTER ,
.
. 2 REGISTER Contact , .
Register:
Request-URI ,
. @
SIP- Request-URI. To
,
. From
; To, , . REGISTER Contact, . expires URI
- ,
3600.
REGISTER,
.

( ), INVITE. INVITE
. - , , UAS,
. UAS 2xx (OK),
. , 3xx, 4xx, 5xx 6xx . UAS (1) , UAC .
INVITE
. UAC
INVITE . , , Content-Disposition
session. SIP /
(offer/answer), UA
. (, ),
( ) 18

. UA , , , ,
, - . offer/answer , INVITE
, .
, :
Offer INVITE, answer 2 (, , 1
).
Offer 2, answer ACK.
INVITE UAC , , .
, , , .

1.
3 Contact
, , .
INVITE ,
2. 4xx, 5xx 6xx Contact ,
. , 2, , , .
INVITE ACK.

INVITE , offer/answer.
,
..
INVITE , . INVITE,
, re-INVITE. re-INVITE , . ,
.
.
re-INVITE, SDP- sendonly,
re-INVITE,
sendrecv.
19


INVITE, 1
2 UAS ,
offer/answer, . ,
. INVITE
2, ( ), . ,
2
INVITE.
BYE.
BYE, , , . UA
BYE , , , UA BYE . UA
BYE , ACK
2.

CANCEL, , , . ,
UAS
. CANCEL ,
UAS .
,
. CANCEL
INVITE,
.
1.6.
(. 1.9) SIP User A User B. User A SIP- ( softphone) User B ;
User B SIP-. - SIP,
, ,
.

20

. 1.9. SIP

softphone A B, INVITE SIP-,


A, domainA.ru. SIP-
domainA.ru, SIP- A. - INVITE SIP A 100 (Trying). A , INVITE .
To, From, Call-ID,
Cseq branch Via, INVITE, . -
domainA.ru -
domainB.ru INVITE. Via, (INVITE A
Via). - domainB.ru
INVITE 100 (Trying), 21

- domainA.ru, INVITE
. - ,
(location server),
IP- B. - Via INVITE SIP B.
SIP- B INVITE 100
(Trying). SIP-
SIP- 180
(Ringing), -.
User B .
, SIP- 200 (OK), , . 200 (OK) SDP- ,
User B User A. To tag .
Contact URI, User B. Content-Type Content-Length
(SDP- B).
200 SIP- A , . , SIP- User A
ACK ,
200 (OK). INVITE/200/ACK, SIP-. User A User B , , , SDP. ,
,
SIP.
User B BYE. User A BYE
200 (OK), BYE- . ACK INVITE.
-, SIP, , . -
INVITE , RecordRoute URI ( IP-) -. SIP- User B, (- , Record-Route 200OK) SIP A . -
22

,
.
-, . -,
.
1.7. SIP

SIP , , , .
, ,
, .
( ) ,
,
, .

, ,
. : ( ) ( ).
SIP SIP, RFC 3261:


-
(Registrar)
SIP
.
. :
. ;
; ;
; ;

;
. ACK;
23

;
;
.
;
.
.
.
- SNT
-, , , . , ,
VoIP , -:
;
, ;
;
, ;
;

/ .
.
- SNT, SNTlite,
(. 1.10).

24

. 1.10. - SNTlite

SNTlite
-, ,
VoIP. , - -
.
, - / SIP
.
1.8. SIP NGN

NGN (Next Generation Network) ,
-
NGN, NGN
SIP.
. . .. - -- NGN, ,
IP-, , , Softswitch , , NGN .
. 1.11 NGN SIP
IP-,
IP--, NGN,
.
25

. 1.11
(), Softswitch 5
. . , .. VoIP- IP-.
() , .
, , .
-
NGN
1

Softswitch
-
Ethernet 100 /c

ISDN PRI

ISDN BRI

NT

SHDSL

-IP

ISDN PRI

Ethernet 100 /c

VoIP

IP

Ethernet 100 /c

Call-
-

IAD-A

Ethernet 100 /c

. 1.11. NGN

, i,
, .
-,
NGN, (), SIP - IP-.
- , .
26

, ,
IP--.
, -IP IP-,
i -,
IP-. , NGN .
1.9.
1) SIP?
2) SIP
IP-?
3) ?
4) SIP URI?
5) SIP?
6) SIP ?

27

2. - -
2.1.
,

, .

, -.
- - Peer-to-Peer Education (P2PE)
.
- - (. 1.9) , , , , ..
-,
, (, SNTlite), , . , , .
- : ( ),
( ) ( ). , ,
.
2.2.
- -
POTS, ISDN, NGN, 2G, 2.5G, 3G, VoIP .
28

- , , ,
, .
,
, , . ,
,
.
2.3.
- -
:
( )

( )
(
).
-
- (. 2.1) :
, -;
,
- ( ), ;
, ;
;
, ;
.

29

. 2.1. - CC/NGN/ 2G, 2.5G, 3G



, ( ),
, , . -
( )
.


, .
. , , ,
- . 30

.


.
,
.

,
/ , ,
/ . . , ,
.

, ( , , , ..),
( , ) ( , ).

,
( ).
. , ,
, .

, . () .
.

31


- , .
, .
1. , [1] [2] . , -,
.
- -
-
-
- ,
, ,
, .
-
,
(), , , .
- -,
Macromedia Flash, , . ,
, .
,
.
, , , ,
.
, [1].
/, / , 32

, , ( /
). , .

. -

. , ,
, , ,
.. - ,
,
Flash Macromedia.

. -
,
.

.

-

, ,
. - SNT (. 1.9)
TDM- VoIP,
[5].
, .

,
, . , 33

, ,
.
2.4. - -
- , , , .
Web- [7].

34

3.
3.1. -


,
(. 3.1).
,
(,
). , ,
.
4 .

. 3.1.

,
, ,
. ,
(. 3.1). , ( ).
, ( -
.
. ). 35

+
. . - . .

(.
3.2), ,
: ( ,
, ), ( , , ), ( , ,
), ( ), .

. 3.2.

36


(. 3.3).

. 3.3.

, , , ,
- (POTS, ISDN, NGN ).
, , ,
, .

.
,
.
,
(. 3.1).

37

3.1

- ,

, , , , , , ,
.

(. 3.4).

38

. 3.4.


(. 3.2) .
3.2

39


(. 3.3).
3.3

(, , .)

(. 3.4)
.
3.4

:

40

: , , ,


.


(. 3.5)
.
3.5



.
, .

: ; ; , .
. - .

. 3.5.

41

, ,
, ,
.

(. 3.6) :
3.6

42



(-).

:
.

43


,
(. 3.6), . Ctrl+C
Ctrl+V, ,
, .
:
1) ( );
2) ;
3) ( ).
, ,
.

: ,
- .
.

. 3.6.

44


, . 1,
[1], , , , . ,
,
. .

, (. 3.7): ; ; ; ; / ; .
,
.
, .

. 3.7.

,
. -

45

, ,
.
, , (
, ), ,
(. 3.8),
.

. 3.8.

,
, .
.
, , , ,
.
, (. 3.9).

46

. 3.9.


, , . , (. 3.10).

. 3.10.

SIP 2 : 1
1 2, SIP,
; 2 3,
. 19 ,
18 .
:

, , , ,
;
, ..
, .

47



75% ( .)
, , . , . .
, , , . (. 3.11, 3.12). .

. 3.11.

48

3.12.


,
, .
:
, 10 , .


, .
.
.
:
() (. 3.14)
() (. 3.15)
:

,
, :
.

49

.
. ,
SIP. , (.., ,
, ,
, )
.

, ,
. , - .

. 3.14. ( )

50



.
,
(. 3.15). (.. , , ),
.

. 3.15.



: ; ;
.

51

3.7

.

(, . . ,
),
SIP
(, INVITE,
BYE)

,
.
SIP
.
SIP.
.
,
. , ,
. ,
( ,
, , ).
,
, , . ,
.

52

, ,


,
, ,
( ). , .


.

, ,
.

.
. , . , , , ,
, .
.

53

,

.



,
.

,
.
,
.

, .

.

, ,
(. 3.7).
, ( ) ,
(. 3.14).

54

, ,
. , .
, , .
( 5 ,
), , , .
, -
.
, (. 3.16).

. 3.16.


, . ,
(. 3.17).

. 3.17.

(9 7 ), SIP.
(3 )
,
SIP , ISUP DSS.
55

:
, ,
, . ,
;
,
.
, ,
(), , ,
;
,
,
;
, , . .
, -
;
, , .

.
,
.


, , . :
1. ;
2. ;
3. .

56

. 3.18.

( ) ,

(. 3.18) .
,
(. 3.19):
, .
.
, .
.
,
.
. (. 3.19) ( ) , , .
57

. ,
.

(. 3.18).
,
.
,
(. 3.19).

. 3.19.

58



.
, ,
. . , .
, : , , .

:



( ): ,
, ,
, ( / ),
, , , -

(. 3.20).
. 3.20.

, .
59

.

.
, .
:


, ,
: , (. 3.21):
, , .
, ( ), , , .

(/ ), , ( ), , ,
, , , .
.

. 3.21.

60

,
.

.

. 3.22.

,

(. 3.22).
(. 3.23), , , ().

61

. 3.23.

,
/, (/ ), , .

.
3.2.

( ,
, ) .
, .


SIP. SIP . SIP.
62

1. SIP

1.1.
SIP.
1.2. -
SIP- SIP-
- (. 3.24).
1.3.
,
.
1.4.
,
.
1.5.
SIP
1.6. c -
SIP- c -.

63

. 3.24. 1

1.7.
.
1.8. ( )
, - .
1.9.
.
2 SIP (ISUP, DSS)
2.1. SIP (
EDSS-1)

SIP .
2.2. (ISUP) SIP

SIP.
2.3. SIP (ISUP)

SIP .
64

3 SIP.
.
3.1. SIP
.
3.2. Request-line
Requestline .
3.3. Status-line
Status-line
.
3.4. INVITE
INVITE.
3.5. 200 OK INVITE
200 OK
INVITE.
3.6. INVITE
INVITE
-.
3.7. REGISTER 200OK
REGISTER
200OK .

65

. 3.25. 3

66

1.
..,
. SIP / .., .., .. .: - -, 2007.

1. .., IP-. / .., ..,


..;, , 2007.
2. .., Softswitch / .., ..
- .: - -, 2006.
3. .., : 7 / ..,
.. - , , 2003.

4.
5.
6.
7.

http://www.skri.sut.ru
http://www.niits.ru
http://www.sotsbi.spb.ru
http://www.seventest.ru

67


.......................................................................................3
1. SIP..........................................................................4
1.1. .................................................................4
1.2. .....................................................................................4
1.3. ...............................................................................7
1.4. ................................................................................................8
1.5. ............................................................................17
1.6. ........................................................................................20
1.7. SIP .......................................23
1.8. SIP NGN ........................25
1.9. ...........................................................................27
2. - -..........................................28
2.1. ..........................................................................28
2.2. ................................................................................................38
2.3. ...................................................................29
2.4. T- - ...........................34
3. ..................................................................................35
3.1. - ................................35
3.2. .............................................................62
.........................................................................................................66

68

SIP

..
..
.2011
3 . . . . .. . .
. 191186 , . . , 61

69