HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
REFER 283
Implementing REFER-related Application Callbacks
{
printf("Failed to set notify parameters");
return;
}
rv = RvSipNotifySetReferNotifyBody(hNotify, statusCode);
if (RV_OK != rv)
{
printf("Failed to set notify body");
return;
}
/*send the notify request*/
rv = RvSipNotifySend(hNotify);
if (RV_OK != rv)
{
printf("Failed to send notify ");
return;
}
}
/*=========================================================================================*/
Sending a REFER Request
The following sample code demonstrates how to send a REFER request. In this
sample, a REFER is sent outside the context of a dialog. Therefore the
subscription dialog must be initiated as well.
Sample Code
*==========================================================================================*/
static void AppSubsRefer(RvSipSubsMgrHandle hSubsMgr)
{
RvChar* From = "sip:A@127.0.0.1";
RvChar* To = "sip:B@127.0.0.1";
RvChar* ReferTo = "sip:C@127.0.0.1";
RvChar* ReferredBy = "<sip:referrer@referrer.example>";
RvSipSubsHandle hReferSubs;
RvStatus rv;
/*--------------------------
Create a new subscription