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

Event Notification 245
Subscription State Machine
RVSIP_SUBS_STATE_UNAUTHENTICATED
A subscription in the SUBS_SENT state may receive a 401 or 407 response. In
this case, the subscription assumes the UNAUTHENTICATED state. At this
point, you can re-send your request with authentication information by calling
the RvSipSubsSubscribe() function again. You can also terminate the call using
the RvSipSubsTerminate() function.
RVSIP_SUBS_STATE_2XX_RCVD
Upon receipt of a 2xx response to an initial SUBSCRIBE request, the
subscription assumes the 2XX_RCVD state. The subscription remains in this
state until it receives and accepts a NOTIFY request from the notifier. The
SIP Stack sets a timer in this state (called a subsNoNotifyTimer). If this timer
expires before the NOTIFY request is received and accepted, the subscription
assumes the TERMINATED state.
When the application receives and accepts the NOTIFY request, it releases the
subsNoNotifyTimer and the subscription assumes the ACTIVE or PENDING
state (according to the Subscription-State header in the NOTIFY request).
RVSIP_SUBS_STATE_NOTIFY_BEFORE_2XX_RCVD
If the subscription received a NOTIFY request in the SUBS_SENT state, the
subscription assumes the NOTIFY_BEFORE_2XX_RCVD state. When the
subscription receives the 2xx response on the SUBSCRIBE request, it will
assume the ACTIVE or PENDING state (according to a 200 or 202 response).
RVSIP_SUBS_STATE_SUBS_RCVD
Upon receipt of the initial SUBSCRIBE request by a notifier subscription, the
subscription assumes the SUBS_RCVD state. In this state, it is up to the
application to decide whether to accept or reject the subscription using the
Subscription API.
RVSIP_SUBS_STATE_PENDING
The PENDING state indicates that the initial SUBSCRIBE request has been
received and understood, but the subscription has not been authorized yet.
A subscriber subscription reaches this state when a 202 final response is
received for an initial SUBSCRIBE request, and a NOTIFY request with
“pending” as the Subscription-State header value is received and accepted.
A notifier subscription reaches this state when a 202 final response is sent for an
initial SUBSCRIBE request.