HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Event Notification 247
Subscription State Machine
RVSIP_SUBS_STATE_UNSUBSCRIBING
A subscriber subscription can call the RvSipSubsUnsubscribe() function to send
an UNSUBSCRIBE request. After sending the UNSUBSCRIBE, the
subscription enters the UNSUBSCRIBING state. The subscription remains in
this state until it receives a final response from the notifier.
If a 2xx class response is received, the subscription assumes the
UNSUBSCRIBE_2XX_RCVD state, while waiting for the NOTIFY request
that terminates the subscription. If a non-2xx response is received, the
subscription assumes the previous state—the state that was before sending the
UNSUBSCRIBE request. For more information, see Table 12-1.
RVSIP_SUBS_STATE_UNSUBSCRIBE_RCVD
Upon receipt of an UNSUBSCRIBE request by a notifier subscription, the
subscription assumes the UNSUBSCRIBE_RCVD state. In this state, the
application must decide whether to accept or reject the UNSUBSCRIBE request
using the Subscription API.
If the application rejects the request, the subscription assumes the previous
state—the state that was before receiving the unsubscribe request. For more
information, see Table 12-2.
If the application accepts the request, it must immediately send a NOTIFY
request with a “Subscription-State:terminated” header in it. When sending this
NOTIFY request, the subscription assumes the TERMINATING state.
RVSIP_SUBS_STATE_UNSUBSCRIBE_2XX_RCVD
Upon receipt of a a 2xx class response on an UNSUBSCRIBE request, the
subscription assumes the UNSUBSCRIBE_2XX_RCVD state. The subscription
remains in this state until it receives a NOTIFY request from the notifier with
“Subscription-State:terminated” header in it. 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.
RVSIP_SUBS_MSG_SEND_FAILURE
Failure in sending a Subscribe request because of a timeout, network error, or
503 response. The application may try to re-send the request to the next IP
address in the DNS list. For more information, see the Call-leg DNS Functions
section in the Call-leg Functions chapter in the SIP Stack Reference Guide.