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

Advanced Features 373
Replaces Header
different Replaces header to be inserted into the INVITE, or that the INVITE
will not contain any Replaces header, it can set the Replaces header of the call-
leg before connecting the call.
RECEIVING AN INVITE
M
ESSAGE WITH
R
EPLACES HEADER
When an initial INVITE message that contains a Replaces header is received,
the call-leg calls the evStateChanged callback with the
RVSIP_CALL_LEG_STATE_OFFERING state and the
RVSIP_CALL_LEG_REASON_REMOTE_INVITING_REPLACES reason.
The application should do the following:
1. Check if it has a call-leg that matches the Replaces header in
the INVITE message. The application can check it with the
RvSipCallLegReplacesGetMatchedCallExt() function.
2. If the application did not find a matched call-leg, it should
reject the INVITE.
3. If the application found a matched call-leg, it should
disconnect this call-leg and accept the INVITE.
Note If an application wants to work with Replaces, it must add the “replaces”
option tag to the Supported header.