| Article Index |
|---|
| Transaction layer operations in SIP |
| Page 2 |
| Page 3 |
| Page 4 |
| Page 5 |
| Page 6 |
| Page 7 |
| Page 8 |
| All Pages |
Page 5 of 8
17.1.2 Non-INVITE Client Transaction
17.1.2.1 Overview of the non-INVITE Transaction
Non-INVITE transactions do not make use of ACK. They are simple
request-response interactions. For unreliable transports, requests
are retransmitted at an interval which starts at T1 and doubles until
it hits T2. If a provisional response is received, retransmissions
continue for unreliable transports, but at an interval of T2. The
server transaction retransmits the last response it sent, which can
be a provisional or final response, only when a retransmission of the
request is received. This is why request retransmissions need to
continue even after a provisional response; they are to ensure
reliable delivery of the final response.
Unlike an INVITE transaction, a non-INVITE transaction has no special
handling for the 2xx response. The result is that only a single 2xx
response to a non-INVITE is ever delivered to a UAC.
17.1.2.2 Formal Description
The state machine for the non-INVITE client transaction is shown in
Figure 6. It is very similar to the state machine for INVITE.
The "Trying" state is entered when the TU initiates a new client
transaction with a request. When entering this state, the client
transaction SHOULD set timer F to fire in 64*T1 seconds. The request
MUST be passed to the transport layer for transmission. If an
unreliable transport is in use, the client transaction MUST set timer
E to fire in T1 seconds. If timer E fires while still in this state,
the timer is reset, but this time with a value of MIN(2*T1, T2).
When the timer fires again, it is reset to a MIN(4*T1, T2). This
process continues so that retransmissions occur with an exponentially
increasing interval that caps at T2. The default value of T2 is 4s,
and it represents the amount of time a non-INVITE server transaction
will take to respond to a request, if it does not respond
immediately. For the default values of T1 and T2, this results in
intervals of 500 ms, 1 s, 2 s, 4 s, 4 s, 4 s, etc.
If Timer F fires while the client transaction is still in the
"Trying" state, the client transaction SHOULD inform the TU about the
timeout, and then it SHOULD enter the "Terminated" state. If a
provisional response is received while in the "Trying" state, the
response MUST be passed to the TU, and then the client transaction
SHOULD move to the "Proceeding" state. If a final response (status
codes 200-699) is received while in the "Trying" state, the response
MUST be passed to the TU, and the client transaction MUST transition
to the "Completed" state.
If Timer E fires while in the "Proceeding" state, the request MUST be
passed to the transport layer for retransmission, and Timer E MUST be
reset with a value of T2 seconds. If timer F fires while in the
"Proceeding" state, the TU MUST be informed of a timeout, and the
client transaction MUST transition to the terminated state. If a
final response (status codes 200-699) is received while in the
"Proceeding" state, the response MUST be passed to the TU, and the
client transaction MUST transition to the "Completed" state.
Once the client transaction enters the "Completed" state, it MUST set
Timer K to fire in T4 seconds for unreliable transports, and zero
seconds for reliable transports. The "Completed" state exists to
buffer any additional response retransmissions that may be received
(which is why the client transaction remains there only for
unreliable transports). T4 represents the amount of time the network
will take to clear messages between client and server transactions.
The default value of T4 is 5s. A response is a retransmission when
it matches the same transaction, using the rules specified in Section
17.1.3. If Timer K fires while in this state, the client transaction
MUST transition to the "Terminated" state.
Once the transaction is in the terminated state, it MUST be destroyed
immediately.
17.1.3 Matching Responses to Client Transactions
When the transport layer in the client receives a response, it has to
determine which client transaction will handle the response, so that
the processing of Sections 17.1.1 and 17.1.2 can take place. The
branch parameter in the top Via header field is used for this
purpose. A response matches a client transaction under two
conditions:
1. If the response has the same value of the branch parameter in
the top Via header field as the branch parameter in the top
Via header field of the request that created the transaction.
2. If the method parameter in the CSeq header field matches the
method of the request that created the transaction. The
method is needed since a CANCEL request constitutes a
different transaction, but shares the same value of the branch
parameter.
If a request is sent via multicast, it is possible that it will
generate multiple responses from different servers. These responses
will all have the same branch parameter in the topmost Via, but vary
in the To tag. The first response received, based on the rules
above, will be used, and others will be viewed as retransmissions.
That is not an error; multicast SIP provides only a rudimentary
"single-hop-discovery-like" service that is limited to processing a
single response. See Section 18.1.1 for details.




