HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

56 HP-UX C SIP Stack Programmers Guide
Call-leg State Machine
BASIC CALL-LEG STATE
M
ACHINE
Figure 6-1 illustrates the Basic Call-leg state machine, showing the main states
involved in connecting and disconnecting calls.
Figure 6-1 Basic Call-leg State Machine
ADVANCED CALL-LEG
S
TATES
The call-leg associates with the advanced states that appear below. Figure 6-2,
Figure 6-3 and Figure 6-4 illustrate the Advanced Call-leg state machines.
IDLE
CONNECTED
DISCONNECTING
DISCONNECTED
TERMINATED
INVITING
OFFERING
ACCEPTED
ACK Recv (remote ack)
Disconnect()/
BYE Sent
(local disconnecting)
UNAUTHENTICATED
CANCELLING
3xx-6xx/ACK Sent/
timeout Recv
ACK Rcvd
terminates transactions
frees resources
BYE Recv
(local
disconnected)
CANCELLED
487 response
sent for the
Invite
(local reject)
Reject()/
3xx-6xx Sent
(local reject)
1xx Sent
(no state
change)
3xx Recv
(redirected)
Connect()/
INVITE Sent
(local inviting)
Connect()/
invite SENT
(local inviting)
200 OK Recv + ACK Sent
(remote accepted)
401/407 Recv
(auth needed)
Cancel()/
CANCEL Sent
(local cancelling)
2xx Recv
+ ACK Sent
+ BYE Sent
Disconnect()/
BYE Sent
(local disconnecting)
Respond Recv
(not 401/407)
(disconnected)
INVITE Recv
(remote inviting)
Accept()/
200 OK Sent
(local accepted)
BYE Recv +
200 OK Sent
(remote
disconnected)
1xx Recv
(remote prov. resp.)
Cancel Recv +
200 response
sent for
the Cancel
(remote
cancelling)
Authenticate()/
INVITE Sent
(local inviting)
REDIRECTED
PROCEEDING
200 OK Recv + ACK Sent
(remote accepted)