HP-UX C SIP Stack Programmer's Guide (Novembery 2007)
Working with Call-legs (Dialogs) 67
Call-leg re-INVITE
RvChar *strFrom = "From:sip:user1@172.20.1.49:5060";
RvChar *strTo = "To:sip:user2@172.20.1.49:5060";
/*Creating a new call-leg.*/
RvSipCallLegMgrCreateCallLeg (hCallLegMgr,NULL,&hCallLeg);
/*Get the outbound message object.*/
RvSipCallLegGetOutboundMsg(hCallLeg,&hMsg);
/*Construct Other header in message*/
RvSipOtherHeaderConstructInMsg(hMsg,RV_TRUE,&hSubject);
/*Set the other header fields.*/
RvSipOtherHeaderSetName(hSubject,"Subject");
RvSipOtherHeaderSetValue(hSubject,"Hello");
/*Send Invite call by calling the Make() function.*/
printf("Connecting a call: %s -> %s\n", strFrom, strTo);
RvSipCallLegMake(hCallLeg,strFrom,strTo);
}
/*===================================================================*/
CALL-LEG RE-
INVITE
Modifying an existing call to alter the session media description and settings is
done by a re-INVITE procedure. A re-INVITE process can occur only after the
call-leg received a 2xx final response for its initial INVITE request, and when
there are no other pending re-INVITE processes.
RE-INVITE OBJECT A re-INVITE object handles a re-INVITE procedure. The re-INVITE object is
identified using a dedicated handle. You must supply this handle when using the
Re-Invite API. RvSipCallLegInviteHandle defines a Stack re-INVITE object.
For an outgoing re-INVITE you receive this handle from
RvSipCallLegReInviteCreate(). For incoming re-INVITE you receive this
handle from the RvSipCallLegReInviteCreatedEv() callback.
RE-INVITE CONTROL The following API functions provide re-INVITE control:
RvSipCallLegReInviteCreate()
Creates a new re-INVITE object in a call-leg.