1sip_add_request_liSnees(s3iSoInP)Initiation Protocol LibrarysFiupn_catdido_nrsequest_line(3SIP)
2
3
4

NAME

6       sip_add_request_line,  sip_add_response_line  -  add a request/response
7       line to a SIP message
8

SYNOPSIS

10       cc [ flag ... ] file ... -lsip [ library ... ]
11       #include <sip.h>
12
13       int sip_add_request_line(sip_msg_t sip_request,
14            sip_method_t method, char *request_uri);
15
16
17       int sip_add_response_line(sip_msg_t sip_response,
18            int response_code, char *response_phase);
19
20

DESCRIPTION

22       The sip_add_request_line() function adds a request line to the SIP mes‐
23       sage  sip_request.  The  request  line  is created using the SIP method
24       specified in method and the URI in request_uri. The SIP method  can  be
25       one of the following:
26         INVITE
27         ACK
28         OPTIONS
29         BYE
30         CANCEL
31         REGISTER
32         REFER
33         SUBSCRIBE
34         NOTIFY
35         PRACK
36         INFO
37
38
39       The resulting request line has the SIP-Version of "2.0".
40
41
42       The  sip_add_response_line()  function  adds a response line to the SIP
43       message sip_response. The response line is created using  the  response
44       code   response_code   and   the  phrase  in  response_phrase.  If  the
45       response_code is one that is listed in  RFC  3261,  sip_get_resp_desc()
46       can  be  used  to  get  the  response  phase for the response_code. The
47       resulting response line has the SIP-Version of "2.0".
48

RETURN VALUES

50       The sip_add_response_line() and sip_add_request_line() functions return
51       0 on success and the appropriate error value in case of failure.
52
53
54       The  value  of  errno  is not changed by these calls in the event of an
55       error.
56

ERRORS

58       On  failure,  the  sip_add_response_line()  and  sip_add_request_line()
59       functions could return one of the following errors:
60
61       EINVAL     If  mandatory  input  is  not  provided  or  if the input is
62                  invalid.
63
64
65       ENOTSUP    If the input SIP message cannot be modified.
66
67
68       ENOMEM     If   memory   allocation    fails    when    creating    the
69                  request/response  line  or  when creating headers in the ACK
70                  request.
71
72

ATTRIBUTES

74       See attributes(5) for descriptions of the following attributes:
75
76
77
78
79       ┌─────────────────────────────┬─────────────────────────────┐
80       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │Committed                    │
83       ├─────────────────────────────┼─────────────────────────────┤
84       │MT-Level                     │MT-Safe                      │
85       └─────────────────────────────┴─────────────────────────────┘
86

SEE ALSO

88       libsip(3LIB)
89
90
91
92SunOS 5.11                        25 Jan 2007       sip_add_request_line(3SIP)
Impressum