1sip_sendmsg(3SIP)Session Initiation Protocol Library Functionssip_sendmsg(3SIP)
2
3
4
6 sip_sendmsg - send an outbound SIP message to the SIP stack for pro‐
7 cessing
8
10 cc [ flag ... ] file ... -lsip [ library ... ]
11 #include <sip.h>
12
13 int sip_sendmsg(sip_conn_object_t obj, sip_msg_t sip_msg,
14 sip_dialog_t dialog, uint32_t flags);
15
16
18 The sip_sendmsg() function is used to send an outbound SIP message
19 sip_msg to the SIP stack on its way to the peer. The connection object
20 for the SIP message is passed as obj. The caller also provides the dia‐
21 log associated with the message, if one exists. The value of flags is
22 the result of ORing the following, as required:
23
24 SIP_SEND_STATEFUL Send the request or response statefully. This
25 results in the stack creating and maintaining a
26 transaction for this request/response. If this
27 flag is not set transactions are not created for
28 the request/response.
29
30
31 SIP_DIALOG_ON_FORK When this flag is set, the stack may create mul‐
32 tiple dialogs for a dialog completing response.
33 This may result due to forking of the dialog cre‐
34 ating request. If this flag is not set, the first
35 response to a dialog creating request creates a
36 dialog, but subsequent ones do not. It is only
37 meaningful if the stack is configured to maintain
38 dialogs.
39
40
42 The sip_sendmsg() function returns 0 on success and the appropriate
43 error on failure.
44
45
46 The value of errno is not changed by these calls in the event of an
47 error.
48
50 The sip_sendmsg() function can return one of the following errors on
51 failure:
52
53 EINVAL If a message is being statefully sent and the branchid in the
54 VIA header does not conform to RFC 3261 or when accessing
55 CSEQ header while creating a transaction.
56
57
58 ENOENT If a message is being statefully sent, error getting the CSEQ
59 header while creating a transaction.
60
61
62 EPROTO If a message is being statefully sent, error getting the CSEQ
63 value while creating a transaction.
64
65
66 ENOMEM If the message is being statefully sent, error allocating
67 memory for creating or adding a transaction or during trans‐
68 action related processing.
69
70
72 See attributes(5) for descriptions of the following attributes:
73
74
75
76
77 ┌─────────────────────────────┬─────────────────────────────┐
78 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
79 ├─────────────────────────────┼─────────────────────────────┤
80 │Interface Stability │Committed │
81 ├─────────────────────────────┼─────────────────────────────┤
82 │MT-Level │MT-Safe │
83 └─────────────────────────────┴─────────────────────────────┘
84
86 libsip(3LIB)
87
88
89
90SunOS 5.11 25 Jan 2007 sip_sendmsg(3SIP)