HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
244 HP-UX C SIP Stack Programmer’s Guide
Subscription State Machine
This event notifies both subscriber and notifier applications about the
termination of the notification.
RvSipSubsFinalDestResolvedEv()
Notifies the application that the subscription is about to send a message after the
destination address was resolved.
SUBSCRIPTION
S
TATE MACHINE
The Subscription state machine represents the state of the subscription
establishment between two SIP User Agents. The RvSipSubsStateChangedEv()
callback reports subscription state changes and state change reasons. The state
change reason indicates how the subscription reached the new state.
The subscription associates with the following states:
RVSIP_SUBS_STATE_IDLE
The IDLE state is the initial state of the Subscription state machine. Upon
subscription creation, the subscription assumes the IDLE state. It remains in this
state until RvSipSubsSubscribe() is called, whereupon it should move to the
SUBS_SENT state.
RVSIP_SUBS_STATE_SUBS_SENT
After calling RvSipSubsSubscribe() and sending a SUBSCRIBE request, the
subscription enters the SUBS_SENT 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 SUBS_2XX_RCVD state. If a 3xx class
response is received, the subscription moves to the REDIRECTED state. If the
subscription is rejected with a 401 or 407 response, the subscription moves to
the UNAUTHENTICATED state. For all other response codes, subscription
assumes the TERMINATED state.
If a NOTIFY request is received before a 2xx response is received, the
subscription assumes the NOTIFY_BEFORE_2XX_RCVD state.
RVSIP_SUBS_STATE_REDIRECTED
A subscription in the SUBS_SENT state may receive a 3xx class response. In
this case, the subscription assumes the REDIRECTED state. At this point, you
may confirm the redirection by calling the RvSipSubsSubscribe() function
again. You can also terminate the subscription using the RvSipSubsTerminate()
function.