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

Event Notification 259
Out-of-Band Subscription
RvSipNotifySetSubscriptionStateParams(hNotify, eSubsState, eReason, UNDEFINED);
/*------------------------------------------------
Gets the outbound NOTIFY request message, in order
to set the status information to it.
--------------------------------------------------*/
rv = RvSipNotifyGetOutboundMsg(hNotify, &hNotifyMsg);
if(rv != RV_OK)
{
printf("Failed to get notify outbound message");
return rv;
}
/*Sets status information in the notify request message... */
/*-------------------------
Sends the NOTIFY message.
---------------------------*/
rv = RvSipNotifySend(hNotify);
if(rv != RV_OK)
{
printf("Failed to send NOTIFY request");
return rv;
}
printf("a notify message was sent for subscription %x/n", hSubs);
return RV_OK;
}
/*==================================================================================*/
OUT-OF-BAND
S
UBSCRIPTION
According to SIP-events draft, sending a SUBSCRIBE request is just one way
of establishing subscriptions. The application can also use other ways to
establish subscriptions (such as HTTP), or the application can use other SIP
messages to establish implicit subscriptions. In these cases, the application
should create an “out-of-band” subscription.
An out-of-band subscription is created in an ACTIVE state, and can receive or
send NOTIFY messages according to its type (subscriber or notifier). The
application should create the subscription after the application agreed with
remote party of the subscription.
Terminating an out-of-band subscription is done by sending and accepting a
NOTIFY request with a “Subscription-State:terminated” header in it (the same
as for a regular subscription).