HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
274 HP-UX C SIP Stack Programmer’s Guide
REFER-Subscription API
created. The newly created call-leg is initialized and ready to contact the
referenced party. To issue the INVITE request to the referenced party, you
should call RvSipCallLegConnect().
Note The Refer-To address in the incoming REFER request can include a
method parameter that will indicate that the referenced party should be contacted
with a method other than INVITE. According to the method, the newly created
object can be a call-leg, subscription or transaction. More details of such cases are
illustrated in REFER Request with Different Method Parameters.
RvSipSubsGetReferNotifyStatus()
Returns the status code that was received in the body of the NOTIFY request of
a refer-subscription. The NOTIFY message is used to inform the agent sending
the REFER about the status of the reference. The body of a NOTIFY begins
with a SIP response status line. The response class in this status line indicates
the status of the reference attempt. To receive this status without parsing the
message body, you should call the RvSipSubsGetReferNotifyStatus() function.
REFER-
S
UBSCRIPTION NOTIFY
CONTROL
The NOTIFY mechanism defined in RFC 3265 is used to inform the agent
sending the REFER about the status of the reference attempt. The following API
function was added to the Subscription layer for REFER Notify control:
RvSipNotifySetReferNotifyBody()
Builds the body of a NOTIFY request of a refer-subscription. Whenever there is
a need to send a NOTIFY request, the stack calls the
RvSipSubsReferNotifyReadyEv() callback. The application should then create a
Notify object using the RvSipSubsCreateNotify() function and set the value of
the Subscription-State header using the
RvSipNotifySetSubscriptionStateParams() function. When a Notify is sent for a
refer-subscription, the notify body should indicate the status of the reference
attempt. To set such a body the application should call the
RvSipNotifySetReferNotifyBody() function with the correct status. The
SIP Stack will then build the Notify body according to RFC 3515 and set the
correct body and Content-Type header in the NOTIFY request message.
Note The RvSipSubsReferNotifyReadyEv() callback will supply you with the
correct parameters to set in the message body.