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

278 HP-UX C SIP Stack Programmers Guide
REFER-Subscription API
request. Using the steps described in step 6, the application
builds and sends a NOTIFY request to inform the REFER
initiator about the result of the reference attempt. This
NOTIFY has a “terminated” value in the Subscription-State
header.
11. Subscription A receives the NOTIFY request and informs the
application by calling the RvSipSubsNotifyEv() callback. The
application accepts this NOTIFY. Since this is a final NOTIFY
with a “terminated” value, accepting it also terminates
Subscription A. The REFER procedure is completed for Call-
leg A.
12. Subscription B receives the 200 response on the final
NOTIFY. It notifies the application of the response with the
RvSipSubsNotifyEv() callback. The 200 response on the final
NOTIFY request terminates Subscription B. The REFER
procedure is completed for Call-leg B.
At this point, Call-leg A is connected to Call-leg B, and Call-
leg B1 is connected to Call-leg C. It is up to the application to
decide whether to disconnect the call between Call-leg A and
Call-leg B.
REFER REQUEST
WITH DIFFERENT
METHOD PARAMETERS
The URI in the Refer-To header can include a method parameter that indicates
how to contact the referenced party.
Example 1
The Refer-To:<sip:C@xxx.com;method=INVITE> header indicates that
the referee should contact the REFER target with an INVITE request. (If there is
no method parameter, the case is handled in the same way as if method=INVITE
exists.)
Example 2
The “Refer-
To:<sip:C@xxx.com;method=SUBSCRIBE?event=MMM&expires=900>
header indicates that the referee should contact the refer target with a
SUBSCRIBE request, that will include the “
event:MMM” and “Expires:900
headers.