Reliability of temporary response in SIP protocol

Source: Internet
Author: User
Tags require
In the process of this test, the most disturbing problem is that the gateway is not receiving the alerting event during the call, causing the state machine to be disturbed. In fact, the SIP protocol already defines the reliability of the temporary response. It is stipulated in the SIP standard that the definition of the reliable transmission of temporary messages during the call establishment process can be borrowed from this mechanism in other processes, but not as a standard formulation. If the call establishment needs to support the reliability of the temporary message, you need to add SIP header--supported or require, the header optional parameter is 100rel. Require indicates the need for peer support, supported indicates that this call does not require reliable transmission, but this support is determined by UAS. If it is not supported, a 420 message needs to be returned, and the unsupported field is added to the header, and the parameter of the field is 100rel. For example, if the invite message contains a require or supported field and is 100rel, then the next 101-199 event is sent after the end of the trying, which requires the timer to set the exponent type. This clock and invite should be independent of each other's retransmission clocks. When a prack is received, a match is needed, and if matched, the retransmission clock can be aborted. The so-called match refers to the Prack and the temporary response in the same session, and rack in the method, cseq-num,response-num in this pair of messages are consistent. The so-called coincidence, I see not easy to understand, through the following examples illustrate.
C->s:invite sip:watson@bell-tel.com sip/2.0
VIA:SIP/2.0/UDP saturn.bell-tel.com
Supported:100rel
From:sip:alexander@bell-tel.com
To:sip:watson@bell-tel.com
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
Subject:come here Watson
s->c:sip/2.0 Trying
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
To:sip:watson@bell-tel.com
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
S->C:SIP/2.0 183 Proceeding

Require:100rel

VIA:SIP/2.0/UDP saturn.bell-tel.com

rseq:776655

From:sip:alexander@bell-tel.com

to:sip:watson@bell-tel.com;tag=11

Call-id:70710@saturn.bell-tel.com

Cseq:1 INVITE

CONTENT-TYPE:APPLICATION/SDP v=0

S=let ' s talk b=ct:128

C=in IP4 north.east.isi.edu

M=audio 3456 RTP/AVP 5 0 7 m=video 2232 RTP/AVP 31

C->s:prack sip:watson@bell-tel.com sip/2.0
rack:776655 1 INVITE
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:2 Prack
Content-type:application/sdp
V=0
S=let ' s talk
b=ct:128
C=in IP4 machine.bell-tel.com
M=audio 3456 RTP/AVP 5 0 7
M=video 2232 RTP/AVP 31
s->c:sip/2.0 OK
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:2 Prack
s->c:sip/2.0 182 the Queue
VIA:SIP/2.0/UDP saturn.bell-tel.com
Require:100rel
rseq:776656
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
s->c:sip/2.0 182 one in the Queue
VIA:SIP/2.0/UDP saturn.bell-tel.com
Require:100rel
rseq:776657
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
C->s:prack sip:watson@bell-tel.com sip/2.0
rack:776656 1 INVITE
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:3 Prack
C->s:prack sip:watson@bell-tel.com sip/2.0
rack:776657 1 INVITE
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:4 Prack
s->c:sip/2.0 OK
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:3 Prack
s->c:sip/2.0 OK
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:4 Prack
s->c:sip/2.0 OK
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
Content-type:application/sdp
V=0
S=let ' s talk
b=ct:128
C=in IP4 north.east.isi.edu
M=audio 3456 RTP/AVP 5 0 7
M=video 2232 RTP/AVP 31
C->s:ack sip:watson@bell-tel.com sip/2.0
VIA:SIP/2.0/UDP saturn.bell-tel.com
From:sip:alexander@bell-tel.com
to:sip:watson@bell-tel.com;tag=11
Call-id:70710@saturn.bell-tel.com
Cseq:1 INVITE
The above example is excerpted from Draft-ietf-sip-100rel-02.txt, where you can see the principle and parameter requirements for prack sending. Prack is first as a request and responds with a $ OK. The prack is sent with a temporary response. Take 183 For example, the parameter is Require:100rel rseq:776655 so the corresponding prack parameter is

       rack:776655 1 INVITE cseq:2 prack corresponding to the parameter is Cseq:2 Prack if the received prack get no match , you need to send 481 as a response. If you get the correct response, you should remove the response from the list of responses.  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.