1sip_create_OKack(3SSeIsPs)ion Initiation Protocol Library Funcstiipo_ncsreate_OKack(3SIP)
2
3
4
6 sip_create_OKack - create an ACK request for a final response
7
9 cc [ flag ... ] file ... -lsip [ library ... ]
10 #include <sip.h>
11
12 int sip_create_OKack(sip_msg_t response,
13 sip_msg_t ack_msg, char *transport,
14 char *sent_by, int sent_by_port,
15 char *via_params);
16
17
19 The sip_create_OKack() function constructs an ACK request in ack_msg
20 for the final 2XX SIP response. The request line is created using the
21 URI in the CONTACT header from the response. The SIP-Version in the
22 request line is "2.0". The VIA header for the ACK request is created
23 using transport, sent_by, sent_by_port (if non-zero), and via_params
24 (if non-null). The following headers are copied to ack_msg from
25 response:
26 FROM
27 TO
28 CALL-ID
29 MAX_FORWARDS
30
31
32 The CSEQ header is created using the method as ACK and the sequence
33 number from the CSEQ header in response.
34
36 The sip_create_OKack() function returns 0 on success and the appropri‐
37 ate error value in case of failure.
38
39
40 The value of errno is not changed by these calls in the event of an
41 error.
42
44 On failure, the sip_create_OKack() function could return one of the
45 following errors:
46
47 EINVAL If mandatory input is not provided or if the input is
48 invalid.
49
50 The sip_create_OKack() function can return this error if it
51 does not find a CONTACT header or if it is unable to obtain
52 the URI from the CONTACT header for the request line.
53
54
55 ENOTSUP If the input SIP message cannot be modified.
56
57
58 ENOMEM If memory allocation fails when creating the
59 request/response line or when creating headers in the ACK
60 request.
61
62
64 See attributes(5) for descriptions of the following attributes:
65
66
67
68
69 ┌─────────────────────────────┬─────────────────────────────┐
70 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │Interface Stability │Committed │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │MT-Level │MT-Safe │
75 └─────────────────────────────┴─────────────────────────────┘
76
78 libsip(3LIB)
79
80
81
82SunOS 5.11 25 Jan 2007 sip_create_OKack(3SIP)