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

242 HP-UX C SIP Stack Programmers Guide
Notification Control API
You can call RvSipNotifyGetOutboundMsg() before you call the Notification
Control API functions that send a message. You should use this function to add
event status information to the message before it is sent.
Notify SubsState
The value of the Subscription-State header that was set to the NOTIFY request
of this Notify object.
Stack Instance
The handle to the SIP Stack instance to which this Notify object belongs.
SUBSCRIPTION EVENTS The Subscription API supplies several events, in the form of callback functions,
to which your application may listen and react. In order to listen to an event,
your application should first define a special function called the event handler
and then pass the event handler pointer to the SubscriptionMgr. When an event
occurs, the subscription calls the event handler function using the pointer.
The following events are supplied with the Subscription API:
RvSipSubsCreatedEv()
Notifies the application that a new incoming subscription has been created. The
newly created subscription always assumes the IDLE state. Your application can
exchange handles with the SIP Stack using this callback.
RvSipSubsStateChangedEv()
This event is probably the most useful of the events that the SIP subscription
reports. Through this function, you receive indications of SIP subscription state
changes and the associated state change reason. For example, upon receipt of an
SUBS_RCVD state indication, your application may decide whether to accept
or reject the subscription.
RvSipSubsSubscriptionExpiredEv()
Notifies the application that the subscription timer expired at this point. The
notifier should send a NOTIFY request with a “Subscription-State:terminated”
header in it. The subscriber may try to send a refresh SUBSCRIBE request or
wait for the NOTIFY request with “terminated” as the Subscription-State header
value.