SIP protocol specification RFC3261 Chinese sharing
12.3 termination of a dialog
dialog's end process is independent of the use environment of this method. If an external dialog request generates a non 2XX final response, any communication needs to clean it up at this time. The historical dialogs created by the previous request response will end. The mechanism of ending confirmation dialogs depends on the specific method. In this specification, bye method will end the session associated with it and this dialog. Please refer to section 15 for details
13 initiating a session
13.1 overview
when a user agent client expects to initiate a session (for example, voice, video or game), it will send an invite request. This invite request will ask the server to create a session. The request may be forwarded through the proxy and finally arrive at one or more UAS ends, which are the server ends that finally accept the request. These UAS terminals will need to query this client regularly to confirm whether to accept this invitation request
after a certain time, those UAS ends return a 2XX response indicating that they can accept the invitation (indicating that the session has been created). If the invitation is not accepted, UAS will send a 3xx, 4xx, 5xx or 6xx response to the user agent, and the status error code will be sent depending on the reason for rejection. Before UAS sends the final response, UAS can also send a temporary response (1XX) to notify the other party that it is contacting the callee to handle the UAC process
after receiving one or more temporary responses, UAC will obtain one or more 2XX responses, or a non -2xx final response. Because it takes some time to wait for the final response message of the invitation, the reliability mechanism of the invite transaction is different from that of other requests (options). Once the UAC receives a final response, the UAC needs to send an ACK confirmation message for each final response it receives. The process of sending an ACK depends on the type of response. For the final response between 300 and 699, the ACK processing is completed at the transaction layer, and a series of rules need to be followed (refer to section 17 for specific rules). For 2XX response, ACK is generated by UAC core
the 2XX response received by invite creates a session, and it also creates a dialog between UA. It is best for a u to judge which manufacturer's experimental machine it buys. A initiates this invite request, and a UA generates a 2XX response. Therefore, when multiple 2XX responses are received from different remote UAS (because of the invite bifurcation), each 2XX creates a different dialog. All these dialogs belong to the same call
this chapter provides a detail of creating a session using invite. UA supporting invite must also support ACK, cancel and bye
13.2 UAC processing
13.2.1 creating the initial invite
because the initial request represents an external dialog request, its construction process complies with the processing flow of section 8.1.1. For this invite specific situation, additional steps need to be added
any allow header field (section 20.5) should appear in this invite. It indicates what methods are invoked by UA when sending this invite in a dialog life cycle. For example, in dialog, the ability of UA to receive info requests should [34] include an allow header, which lists the NFO method
any supported header field (section 20.37) should appear in this invite. It enumerates all the extensions that UAC can understand
any accept header field (section 20.1) may also appear in invite. It indicates what content types the UA can accept. The direction of accepting content types is not only the response side of the UA, but also the subsequent request side in the dialog created by this invite. The accept header field is very useful. It originally represents the support ability of various session description formats
uac can add an expires header field (section 20.19) to limit the validity of the request. If the time setting in the expires header times out and the last response to this invite is not received, the UAC core should generate a cancel request for this invite. Refer to section 9
uac can also find other useful header fields added to the consideration header field between cost and profit, including subject (section 20.36), organization (section 20.25) and user agent (section 20.41). All these header fields contain information related to invite
uac can add a message body to this invite. Section 8.1.1.10 specifically describes how to build a header field -- content type, and the content of the message body that needs to be explained
for message bodies containing session descriptions, the specification has some special rules. The corresponding content disposition of the message body is a session. SIP uses the offer/answer mode to support UA to send a session description, called the offer end, which contains the recommended description of this session. This offer indicates the desired communication mode (voice, video or game), the parameters supported by the communication mode (such as encoding type) and the address of the media received from the respondent. The peer UA responds with another session description, called answer, which indicates which media mode can be accepted, the parameters of the supported media mode, and the address of the media received from the provider. Offer/answer interaction is carried out in the context of dialog. Therefore, if SIP invite leads to multiple dialogs, each dialog is an independent offer/answer interaction. When an offer and an answer occur, the offer/answer description specifies restrictions (for example, when an offer is being processed, the user cannot create a new offer). Through this processing method, the offer and answer sides in the SIP message can reflect such restrictive measures. In this specification, offers and answers can only appear in invite requests, responses, and acks. Here, there are further restrictions on the offers and answers modes. For the initial invite transaction, the rules include:
the initial offer must be in an invite or not in an invite. If not, the initial offer is in the first reliable non failure message returned to UAC from UAS. 2XX final response in this specification
if the initial response is in invite, the response must be in a reliable non failure message returned from UAS to UAC, and UAC is associated with that invite. For this specification, it only represents the 2XX final response of this invite. Similarly, similar responses can also be placed in any temporary response, which is the response sent to the previous respondent. UAC must treat the first session description it receives as the responder, and must ignore any session descriptions in subsequent responses to this initial invite
if this initial offer is in the first reliable non failure message returned from UAS to UAC, the slave answer must be in the confirmation message of this message (in this specification, in the 2XX response supported by ACK)
for the first offer, if the UAC has sent or received a response, the UAC may generate subsequent offers in the request. The processing of these requests is based on the rule specified in the method. However, this processing method only supports two states. The first is the state after the UAC has received the response of the previous offer, and if the UAC has not received a response, it will not send any offer
for the initial offer, once the UAS sends or receives a response, the UAS must not generate subsequent offers in the response to the initial request. This means that until this initial transaction is completed, UAS based on this specification can never generate subsequent offers alone
specifically, in the above rules, this specification specifies two separate rules for interaction to support UA - offer is in invite, answer is in 2XX response (or 1XX response) or offer is in 2XX response, answer is in ack. All agents that support invite must support these two interactions
all user agents 6. Disposal according to use: stretching fixture, tightening fixture, zigzag fixture, shearing fixture, stripping fixture, tearing fixture, sealing fixture, bending fixture must support session description protocol (SDP) (RFC 2327 [1]) as a means to describe the session. The way they build offers and answers must follow this process, which is defined in chapter [13]
the limitation of this offer answer mode only applies to the message body, and the content disposition header value of this message body is a session. Therefore, it is possible for invite and ack to contain a message body. For example, an invite contains a picture (content disposition: render), and the slave ack is a session description (content disposition: session)
if the value of this content disposition header field is lost, the message of content type application/SDP will indicate this disposition session, and other content types will indicate the render value
once invite is created, UAC follows a processing mechanism, which is defined in the chapter of sending requests outside dialog in Chapter 8. This will lead to the transaction construction of a client, which eventually sends the request and returns a response to the UAC
LINK
Copyright © 2011 JIN SHI