1sip_create_responsSee(s3sSiIoPn)Initiation Protocol Library Fsuinpc_tciroenaste_response(3SIP)
2
3
4

NAME

6       sip_create_response - create a response for a SIP request
7

SYNOPSIS

9       cc [ flag ... ] file ... -lsip [ library ... ]
10       #include <sip.h>
11
12       sip_msg_t sip_create_response(sip_msg_t sip_request,
13            int response_code, char *response_phase,
14            char *totag, char *contact_uri);
15
16

DESCRIPTION

18       The sip_create_response() function creates and returns a SIP message in
19       response to the SIP request  sip_request.  The  response  line  in  the
20       resulting   SIP   message   is  created  using  the  response  code  in
21       response_code and the phrase in response_phrase. The response line  has
22       the SIP-Version of "2.0". If a non-null totag is specified, the result‐
23       ing SIP response has a TO header with a tag value from totag. If  totag
24       is  null  and  the  response_code  is anything other than 100 (TRYING),
25       sip_create_response() adds a TO header with a  randomly  generated  tag
26       value.  If the response_code is 100 and totag is null, the SIP response
27       has a TO header without a tag parameter. If contact_uri is non-null,  a
28       CONTACT  header  is added to the SIP response with the URI specified in
29       contact_uri. The SIP response has the  following  headers  copied  from
30       sip_request:
31         All VIA headers
32         FROM header
33         TO header (with tag added, if required, as stated above)
34         CALL-ID header
35         CSEQ header
36         All RECORD-ROUTE headers
37

RETURN VALUES

39       The sip_create_response() function returns the resulting SIP message on
40       success and NULL on failure.
41
42
43       The value of errno is not changed by these calls in  the  event  of  an
44       error.
45

ATTRIBUTES

47       See attributes(5) for descriptions of the following attributes:
48
49
50
51
52       ┌─────────────────────────────┬─────────────────────────────┐
53       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
54       ├─────────────────────────────┼─────────────────────────────┤
55       │Interface Stability          │Committed                    │
56       ├─────────────────────────────┼─────────────────────────────┤
57       │MT-Level                     │MT-Safe                      │
58       └─────────────────────────────┴─────────────────────────────┘
59

SEE ALSO

61       libsip(3LIB)
62
63
64
65SunOS 5.11                        25 Jan 2007        sip_create_response(3SIP)
Impressum