Beruflich Dokumente
Kultur Dokumente
com
Initiating UA
1 INVITE
Proxy 1 (Stateful)
407 Proxy Authorization Required
This example illustrates, as a slide show, the structure of the SIP protocol, as outlined in chapter 5 of RFC 3261: Proxy 2 (Stateless)
INVITE 4 INVITE 100 Trying 5 4 180 Ringing 6 180 Ringing 6 INVITE 180 Ringing 6
3 4
"The lowest layer is the transport layer. It defines how a client sends requests and receives responses and how a server receives requests and sends responses over the network. All SIP elements contain a transport layer. The second layer is the transaction layer. A transaction is a request sent by a client transaction (using the transport layer) to a server transaction, along with all responses to that request sent from the server transaction back to the client. Any task that a user agent client (UAC) accomplishes takes place using a series of transactions. Stateless proxies do not contain a transaction layer. The layer above the transaction layer is called the transaction user (TU). Each of the SIP entities, except the stateless proxy, is a transaction user."
ACK
180 Ringing
200 OK 8 ACK
7 8 ACK
200 OK
200 OK
200 OK
8 Media Session
Note: we set aside the syntax and encoding as the lowest layer. In this example, the rejection of the first INVITE request, followed by a valid INVITE request, enables the analysis of the processing of the ACK for these two situations. It is assumed that both Proxy 1 and Proxy 3 stateful proxy servers are in the final signalling path because they requested it in the INVITE requests they routed on.
200 OK
21 pages
(1)
Initiating UA
SDP Offer
Open Session
Proxy 1 (Stateful)
SIP Transaction User (TU)
The UAC (User Agent Client) TU: - creates the initial INVITE request - creates a new client transaction (in the transaction layer) and passes it the INVITE message, plus the IP address, port and transport The proxy core TU first validates the INVITE request. It cannot authenticate the originator because no credentials are provided. It rejects the request by sending back (see next slide) a 407 (Proxy Authentication Required) response.
UAC core 1
INVITE request INV/br-a0
UAS core
proxy core
client transaction
server transaction
request
request
client transport
server transport
server transport
client transport
send
receive
TLS SCTP
(2)
Initiating UA
Proxy 1 (Stateful)
SIP Transaction User (TU)
The UAC analyses the response and prepares a new INVITE request. The proxy core TU: sends back a 407 (Proxy Authentication Required) response
UAC core
UAS core
proxy core 2
407 response
ACK
INV/br-a0
client transaction 3
ACK (request) response
server transaction
response
request
client transport
server transport
server transport
client transport
send
receive
send
receive
TLS SCTP
(3)
Initiating UA
Proxy 1 (Stateful)
SIP Transaction User (TU)
The UAC (User Agent Client) TU: (1) creates the new INVITE request containing the correct credentials (2) creates a new client transaction and passes it the INVITE message, plus the IP address, port and transport The proxy core TU: (1) validates the request (2) determines the target for the request (3) forwards the request (see next slide) towards the target
UAC core 4
INVITE request 100 (Trying)
UAS core
proxy core
INV/br-a1
client transaction
server transaction 5
100 (Trying) response request
request
response
client transport
server transport
server transport
client transport
send
receive
send
receive
TLS SCTP
(4)
Proxy 1 (Stateful)
The proxy core TU: (1) validates the request (2) determines the target for the request (3) forwards the request (see next slide) towards the target
Proxy 3 (Stateful)
proxy core 4
INVITE request INV/br-a1 INV/br-x10
For forwarding the INVITE request, the proxy core creates a new client transaction
proxy core
Proxy 2 (Stateless)
proxy core
server transaction
client transaction
server transaction 5
request
request
server transport
client transport
server transport
client transport
server transport
client transport
send
send
receive
TLS SCTP
(5)
Proxy 3 (Stateful)
proxy core 4
INVITE request INV/br-x10 180 (Ringing)
For forwarding the INVITE request, the proxy core creates a new client transaction
UAC core 6
UAS core
INVITE request
INV/br-x30
INV/br-x30
server transaction
client transaction
server transaction
request
response
response
request
server transport
client transport
client transport
server transport
send
receive
send
receive
TLS SCTP
(6)
Proxy 1 (Stateful)
Proxy 3 (Stateful)
proxy core 6
180 (Ringing) INV/br-a1 INV/br-x10
proxy core
Proxy 2 (Stateless)
proxy core 6
server transaction
client transaction
server transaction
client transaction
response
response response
response
server transport
client transport
server transport
client transport
server transport
client transport
receive
send receive
send
TLS SCTP
(7)
Initiating UA
Proxy 1 (Stateful)
UAC core
UAS core 6
180 (Ringing) 180 (Ringing)
proxy core
INV/br-a1
INV/br-a1
INV/br-x10
client transaction
server transaction
client transaction
response
response
client transport
server transport
server transport
client transport
receive
send
TLS SCTP
(8)
The callee answers the call, and an SDP answer is communicated to the UAS core
Proxy 3 (Stateful)
Retransmissions of 200 OK (whatever the UA transport protocol) are handled by the UAS core, not the transaction layer. The 200 OK response retransmission (if any) is passed to the transport with an interval that starts at T1 seconds and doubles for each retransmission until it reaches T2 seconds. 200 (OK) INV/br-x10 INV/br-x30 The INVITE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the proxy core TU. The INVITE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport.
proxy core
UAC core 7
200 (OK) response
UAS core
INV/br-x30
server transaction
client transaction
server transaction
response
response
server transport
client transport
client transport
server transport
receive
send
TLS SCTP
(9)
Proxy 1 (Stateful)
Proxy 3 (Stateful)
proxy core 7
200 (OK) INV/br-a1 INV/br-x10 The INVITE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the proxy core TU.
proxy core
Proxy 2 (Stateless)
proxy core 7
response response The INVITE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport.
server transaction
client transaction
server transaction
response
response
server transport
client transport
server transport
client transport
server transport
client transport
receive
send receive
send
TLS SCTP
(10)
Initiating UA
SDP Answer
Proxy 1 (Stateful)
UAC core
UAS core 7
200 (OK) 200 (OK) The INVITE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the UAC core TU. The INVITE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport.
proxy core
INV/br-a1
INV/br-a1
client transaction
server transaction
response
response
client transport
server transport
server transport
client transport
receive
send
TLS SCTP
(11)
Initiating UA
Proxy 1 (Stateful)
The ACK request (following a 2xx final response) is passed to the transport layer directly for transmission
UAC core 8
ACK request
UAS core
proxy core
ACK request
client transport
server transport
server transport
client transport
send
receive
TLS SCTP
(12)
Proxy 1 (Stateful)
Proxy 3 (Stateful)
proxy core 8
ACK request
proxy core
ACK request
Both Proxy 1 and Proxy 3 stateful proxy servers are in the final signalling path because they requested it in the INVITE request they routed on.
server transport
client transport
server transport
client transport
send
receive
TLS SCTP
(13)
Proxy 3 (Stateful)
proxy core 8
ACK request
UAC core
UAS core
ACK request
server transport
client transport
client transport
server transport
send
receive
TLS SCTP
(14)
Initiating UA
Media part
Media part
UAC core
UAS core
UAC core
UAS core
client transport
server transport
client transport
server transport
RTP UDP IP IP
TLS SCTP
(15)
Proxy 3 (Stateful)
proxy core x
BYE request BYE/br-b1 BYE request
UAC core
UAS core
BYE/br-b1
server transaction
client transaction
request
request
client transport
server transport
client transport
server transport
receive
send
TLS SCTP
(16)
Proxy 1 (Stateful)
Proxy 3 (Stateful)
proxy core x
BYE request BYE/br-b31 BYE request
proxy core
BYE/br-b31
BYE/br-b1
server transaction
client transaction
server transaction
request
request
client transport
server transport
client transport
server transport
receive
send
TLS SCTP
(17)
Initiating UA
Proxy 1 (Stateful)
UAC core
UAS core x
BYE request BYE/br-b11 BYE request
proxy core
BYE/br-b11
BYE/br-b31
server transaction
client transaction
server transaction
request
request
client transport
server transport
client transport
server transport
receive
send
TLS SCTP
(18)
Initiating UA
Proxy 1 (Stateful)
UAC core y
200 (OK)
UAS core
proxy core
200 (OK) The BYE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport. The BYE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the proxy core TU. BYE/br-b11 BYE/br-b31
BYE/br-b11
server transaction
client transaction
server transaction
response
response
client transport
server transport
client transport
server transport
send
receive
TLS SCTP
(19)
Proxy 1 (Stateful)
Proxy 3 (Stateful)
proxy core y
200 (OK) BYE/br-b31 The BYE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport. The BYE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the proxy core TU.
proxy core
server transaction
client transaction
server transaction
response
response
client transport
server transport
client transport
server transport
send
receive
TLS SCTP
Proxy 3 (Stateful)
proxy core y
200 (OK) BYE/br-b1 The BYE server transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the transport. The BYE client transaction is destroyed as soon as it receives the 200 (OK) response and passes it to the UAC core TU.
UAC core
UAS core
server transaction
client transaction
response
response
client transport
server transport
client transport
server transport
send
receive
TLS SCTP