2 .\" Copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SIP_CREATE_RESPONSE 3SIP "Jan 25, 2007"
8 sip_create_response \- create a response for a SIP request
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsip\fR [ \fIlibrary\fR ... ]
15 \fBsip_msg_t\fR \fIsip_create_response\fR(\fBsip_msg_t\fR \fIsip_request\fR,
16 \fBint\fR \fIresponse_code\fR, \fBchar *\fR\fIresponse_phase\fR,
17 \fBchar *\fR\fItotag\fR, \fBchar *\fR\fIcontact_uri\fR);
23 The \fBsip_create_response()\fR function creates and returns a \fBSIP\fR
24 message in response to the \fBSIP\fR request \fIsip_request\fR. The response
25 line in the resulting \fBSIP\fR message is created using the response code in
26 \fIresponse_code\fR and the phrase in \fIresponse_phrase\fR. The response line
27 has the \fBSIP\fR-Version of "2.0". If a non-null \fItotag\fR is specified, the
28 resulting \fBSIP\fR response has a \fBTO\fR header with a tag value from
29 \fItotag\fR. If \fItotag\fR is null and the \fIresponse_code\fR is anything
30 other than \fB100\fR (\fBTRYING\fR), \fBsip_create_response()\fR adds a
31 \fBTO\fR header with a randomly generated tag value. If the \fIresponse_code\fR
32 is \fB100\fR and \fItotag\fR is null, the \fBSIP\fR response has a \fBTO\fR
33 header without a tag parameter. If \fIcontact_uri\fR is non-null, a
34 \fBCONTACT\fR header is added to the \fBSIP\fR response with the \fBURI\fR
35 specified in \fIcontact_uri\fR. The \fBSIP\fR response has the following
36 headers copied from \fIsip_request\fR:
47 \fBTO\fR header (with tag added, if required, as stated above)
59 All \fBRECORD-ROUTE\fR headers
64 The \fBsip_create_response()\fR function returns the resulting \fBSIP\fR
65 message on success and \fBNULL\fR on failure.
68 The value of \fBerrno\fR is not changed by these calls in the event of an
73 See \fBattributes\fR(5) for descriptions of the following attributes:
81 ATTRIBUTE TYPE ATTRIBUTE VALUE
83 Interface Stability Committed