HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
REFER 277
REFER-Subscription API
RvSipSubsReferInit() function, and sends the REFER message
by calling the RvSipSubsRefer() function. After the REFER
message is sent, subscription A moves to the SUBS_SENT
state.
3. Call-leg B receives the REFER request and creates a new
Refer-subscription B to handle this REFER. The new
subscription assumes the SUBS_RCVD state.
4. The application decides to accept the REFER and calls the
RvSipSubsReferAccept() function on Subscription B. A 202
response is sent back to Subscription A and a new Call-leg B1
is created. B1 is initialized and ready to contact the referenced
party. Subscription B assumes the SUBS_ACTIVE state.
5. Subscription A receives the 202 response and assumes the
SUBS_2XX_RCVD state.
6. The application sends an initial NOTIFY request from
Subscription B. It first creates a notification with the
RvSipSubsCreateNotify() function and then follows the
following steps to initialize and sent the request:
Sets the Subscription-State header to “active” using
the RvSipNotifySetSubscriptionStateParams()
function.
Sets the “SIP\2.0 100 trying” body in the NOTIFY
message using the RvSipNotifySetReferNotifyBody()
function.
Sends the NOTIFY request from the new notification
by calling the RvSipNotifySend() function.
7. Calling the Connect() function on Call-leg B1 causes an
INVITE message to be sent to the referenced party.
8. Subscription A receives the NOTIFY request and calls the
RvSipSubsNotifyEv() callback to inform the application. The
application calls the RvSipNotifyAccept() function that causes
a 200 response to be sent for the NOTIFY request.
Subscription A then assumes the SUBS_ACTIVE state.
9. A 200 response is sent from Call-leg C.
10. Call-leg B1 receives the 200 response. It informs Subscription
B that it has reached a final status. Subscription B calls the
RvSipSubsReferNotifyReadyEv() callback to inform the
application that it is now time to send the final NOTIFY