sip 协议 --PRACK

1.   概念 :   sip 协议中的PRACK 英文全称:Provisional Response ACKnowledgement      。临时恢复确认。

详细描述在:RFC3262中  http://www.ietf.org/rfc/rfc3262.txt

2. 目的:确保sip中  1xx  响应的可靠传输。  PRACK一般是对收到183 call in progress/180 ringing的确认,

 

3.实例1  :sip:[email protected]  发送INVITE请求到sip:[email protected]

Supported 头域中:带有100rel。 但是sip:[email protected] 不支持100rel 扩展。就回复 420 Bad extension (unsupported)

消息流:

 

INVITE sip:[email protected]:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.1.112:5060;rport;branch=z9hG4bKPj0693c29ace0342c4a795524325069634

Max-Forwards: 70

From: "6034" ;tag=294aa51771234110b1a838243477d504

To:

Contact:

Call-ID: 3c746f1e06db45c0a87d2c93f21d76da

CSeq: 19095 INVITE

Allow: INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, SUBSCRIBE, NOTIFY, REFER, OPTIONS, MESSAGE

Supported: replaces, 100rel, timer

Require: 100rel

User-Agent: AT940 V1.0.0

Content-Type: application/sdp

Content-Length:   430

 

v=0

o=ATCOM 3587281334 3587281334 IN IP4 192.168.1.112

s=ATCOM Audio Call

c=IN IP4 192.168.1.112

t=0 0

m=audio 16384 RTP/AVP 0 4 8 9 98 18 108 101

c=IN IP4 192.168.1.112

a=sendrecv

a=rtpmap:0 PCMU/8000

a=rtpmap:4 G723/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:9 G722/8000

a=rtpmap:98 iLBC/8000

a=fmtp:98 mode=30

a=rtpmap:18 G729/8000

a=rtpmap:108 G726/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-15

a=ptime:10

 

 

SIP/2.0 420 Bad extension (unsupported)

Via: SIP/2.0/UDP 192.168.1.112:5060;branch=z9hG4bKPj0693c29ace0342c4a795524325069634;received=192.168.1.112;rport=5060

From: "6034" ;tag=294aa51771234110b1a838243477d504

To: ;tag=as706ac5f3

Call-ID: 3c746f1e06db45c0a87d2c93f21d76da

CSeq: 19095 INVITE

Server: Asterisk PBX SVN--r2564M

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Date: Wed, 04 Sep 2013 11:02:03 GMT

Unsupported: 100rel

Content-Length: 0

 

ACK sip:[email protected]:5060 SIP/2.0

Via: SIP/2.0/UDP 192.168.1.112:5060;rport;branch=z9hG4bKPj0693c29ace0342c4a795524325069634

Max-Forwards: 70

From: "6034" ;tag=294aa51771234110b1a838243477d504

To: ;tag=as706ac5f3

Call-ID: 3c746f1e06db45c0a87d2c93f21d76da

CSeq: 19095 ACK

Content-Length:  0

 

4.实例2:sip:[email protected]  发送INVITE请求到sip:[email protected]

 

SIP/2.0 180 Ringing

Via: SIP/2.0/UDP 192.168.1.120:5060;received=192.168.1.120;branch=z9hG4bK144c5a17

Call-ID: [email protected]:5060

From: "6089" ;tag=as2c6fa1ac

To: ;tag=d7d3541eb96043cea79ff98658665e7d

CSeq: 102 INVITE

Contact:

Allow: INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, SUBSCRIBE, NOTIFY, REFER, OPTIONS, MESSAGE

Require: 100rel

RSeq: 1225

Content-Length:  0

 


 


 

你可能感兴趣的:(SIP)