nta 1.13.17
Loading...
Searching...
No Matches
nta.h
Go to the documentation of this file.
1/*
2 * This file is part of the Sofia-SIP package
3 *
4 * Copyright (C) 2005 Nokia Corporation.
5 *
6 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1 of
11 * the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 *
23 */
24
25#ifndef NTA_H
27#define NTA_H
28
36#ifndef SU_WAIT_H
37#include <sofia-sip/su_wait.h>
38#endif
39
40#ifndef SIP_H
41#include <sofia-sip/sip.h>
42#endif
43
44#ifndef NTA_TAG_H
45#include <sofia-sip/nta_tag.h>
46#endif
47
48SOFIA_BEGIN_DECLS
49
50/* ----------------------------------------------------------------------
51 * 1) Types
52 */
53
55typedef struct nta_agent_s nta_agent_t;
57typedef struct nta_leg_s nta_leg_t;
59typedef struct nta_outgoing_s nta_outgoing_t;
61typedef struct nta_incoming_s nta_incoming_t;
62
63#ifndef NTA_AGENT_MAGIC_T
67#define NTA_AGENT_MAGIC_T struct nta_agent_magic_s
68#endif
69#ifndef NTA_LEG_MAGIC_T
73#define NTA_LEG_MAGIC_T struct nta_leg_magic_s
74#endif
75#ifndef NTA_OUTGOING_MAGIC_T
79#define NTA_OUTGOING_MAGIC_T struct nta_outgoing_magic_s
80#endif
81#ifndef NTA_INCOMING_MAGIC_T
85#define NTA_INCOMING_MAGIC_T struct nta_incoming_magic_s
86#endif
87
96
97/* ----------------------------------------------------------------------
98 * 2) Constants
99 */
100
102#define NTA_VERSION "2.0"
103
105SOFIAPUBVAR char const nta_version[];
106
107enum {
108 /* Stack parameters */
110 NTA_SIP_T2 = 4000,
111 NTA_SIP_T4 = 5000,
112 NTA_TIME_MAX = 15 * 24 * 3600 * 1000
115
116/* ----------------------------------------------------------------------
117 * 3) Agent-level prototypes
118 */
119
120typedef int nta_message_f(nta_agent_magic_t *context,
121 nta_agent_t *agent,
122 msg_t *msg,
123 sip_t *sip);
124
127 url_string_t const *name,
128 nta_message_f *callback,
129 nta_agent_magic_t *magic,
130 tag_type_t tag, tag_value_t value, ...);
131
133SOFIAPUBFUN void nta_agent_resolver_clean_cache(nta_agent_t *agent);
134
135SOFIAPUBFUN char const *nta_agent_version(nta_agent_t const *a);
137
140 url_string_t const *url,
141 tag_type_t tag, tag_value_t value, ...);
142
144
148
150 char const *fmt, nta_agent_t *);
151
153 tag_type_t tag, tag_value_t value, ...);
155 tag_type_t tag, tag_value_t value, ...);
156
158 tag_type_t tag, tag_value_t value, ...);
159
160/* ----------------------------------------------------------------------
161 * 4) Message-level prototypes
162 */
163
165
167
169 nta_leg_t *leg,
170 sip_method_t method,
171 char const *method_name,
172 url_string_t const *req_url);
173
176
177/* ----------------------------------------------------------------------
178 * 5) Leg-level prototypes
179 */
180typedef int nta_request_f(nta_leg_magic_t *lmagic,
181 nta_leg_t *leg,
182 nta_incoming_t *irq,
183 sip_t const *sip);
184
187 nta_request_f *req_callback,
188 nta_leg_magic_t *magic,
189 tag_type_t tag, tag_value_t value, ...);
190
192
194
196 nta_request_f *callback);
197
199 nta_request_f *callback,
201
203SOFIAPUBFUN char const *nta_leg_tag(nta_leg_t *leg, char const *tag);
204
206SOFIAPUBFUN char const *nta_leg_get_tag(nta_leg_t const *leg);
207
209SOFIAPUBFUN char const *nta_leg_rtag(nta_leg_t *leg, char const *tag);
210
212SOFIAPUBFUN char const *nta_leg_get_rtag(nta_leg_t const *leg);
213
216
219
221 sip_record_route_t const *route,
222 sip_contact_t const *contact);
223
225 sip_record_route_t const *route,
226 sip_contact_t const *contact,
227 int initial);
228
230 sip_record_route_t const *route,
231 sip_contact_t const *contact);
232
235 sip_route_t const **return_route,
236 sip_contact_t const **return_target);
237
240 url_string_t const *);
241
245 url_t const *request_uri,
246 sip_call_id_t const *call_id,
247 char const *from_tag,
248 url_t const *from_url,
249 char const *to_tag,
250 url_t const *to_url);
251
254 su_home_t *home,
255 int early_only);
259
262nta_leg_t *nta_leg_by_call_id(nta_agent_t *sa, const char *call_id);
263
264/* ----------------------------------------------------------------------
265 * 6) Prototypes for incoming transactions
266 */
267
270 nta_leg_t *leg,
271 msg_t *msg,
272 sip_t *sip,
273 tag_type_t tag, tag_value_t value, ...);
274
276
278 nta_incoming_t *irq,
279 sip_t const *sip);
280
282 nta_ack_cancel_f *callback,
283 nta_incoming_magic_t *imagic);
284
287 nta_ack_cancel_f *callback);
288
291 sip_t const *sip,
292 sip_via_t const *v);
293
294SOFIAPUBFUN char const *nta_incoming_tag(nta_incoming_t *irq, char const *tag);
295SOFIAPUBFUN char const *nta_incoming_gettag(nta_incoming_t const *irq);
296
303
305 tag_type_t tag, tag_value_t value, ...);
306
310
313 msg_t *msg,
314 int status,
315 char const *phrase,
316 tag_type_t tag, tag_value_t value, ...);
317
319msg_t *nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase);
320
323 int status, char const *phrase,
324 tag_type_t tag, tag_value_t value, ...);
325
327
329
330/* Functions for feature, method, mime, session-timer negotation */
331
334 sip_t const *sip,
335 sip_supported_t const *supported,
336 tag_type_t tag, tag_value_t value, ...);
339 sip_t const *sip,
340 sip_require_t *require,
341 tag_type_t tag, tag_value_t value, ...);
344 sip_t const *sip,
345 sip_allow_t const *allow,
346 tag_type_t tag, tag_value_t value, ...);
349 sip_accept_t const *session_accepts,
350 tag_type_t tag, tag_value_t value, ...);
353 sip_t const *sip,
354 sip_accept_t const *acceptable,
355 sip_accept_t const **return_acceptable,
356 tag_type_t tag, tag_value_t value, ...);
357
360 sip_t const *sip,
361 sip_time_t my_min_se,
362 tag_type_t tag, tag_value_t value, ...);
363
364/* ----------------------------------------------------------------------
365 * 7) Prototypes for outgoing transactions
366 */
368 nta_outgoing_t *request,
369 sip_t const *sip);
370
373 nta_response_f *callback,
375 url_string_t const *route_url,
376 sip_method_t method,
377 char const *method_name,
378 url_string_t const *request_uri,
379 tag_type_t tag, tag_value_t value, ...);
380
383 nta_response_f *callback,
385 url_string_t const *route_url,
386 msg_t *msg,
387 tag_type_t tag, tag_value_t value, ...);
388
391 nta_response_f *callback,
392 nta_outgoing_magic_t *magic);
393
395 nta_response_f *callback,
396 nta_outgoing_magic_t *magic);
398 nta_response_f *callback);
403SOFIAPUBFUN char const *nta_outgoing_branch(nta_outgoing_t const *orq);
404
406
409
412
415 nta_response_f *callback,
417 char const *to_tag,
418 sip_rseq_t const *rseq);
419
421
424 nta_response_f *callback,
426 tag_type_t, tag_value_t, ...);
427
429
432 msg_t const *msg,
433 sip_t const *sip,
434 sip_via_t const *v);
435
437
438/* ----------------------------------------------------------------------
439 * 8) Reliable provisional responses (100rel)
440 */
441
442/* UAC side */
443
446 nta_outgoing_t *oorq,
447 nta_response_f *callback,
449 url_string_t const *route_url,
450 sip_t const *response_to_prack,
451 tag_type_t, tag_value_t, ...);
452
455
456/* UAS side */
457
459typedef struct nta_reliable_s nta_reliable_t;
460
461#ifndef NTA_RELIABLE_MAGIC_T
465#define NTA_RELIABLE_MAGIC_T struct nta_reliable_magic_s
466#endif
467
470
471typedef int nta_prack_f(nta_reliable_magic_t *rmagic,
472 nta_reliable_t *rel,
473 nta_incoming_t *prack,
474 sip_t const *sip);
475
478 nta_prack_f *callback,
479 nta_reliable_magic_t *rmagic,
480 int status, char const *phrase,
481 tag_type_t tag,
482 tag_value_t value, ...);
483
486 nta_prack_f *callback,
487 nta_reliable_magic_t *rmagic,
488 msg_t *msg);
489
491
492/* ----------------------------------------------------------------------
493 * Backward-compatibility stuff - going away soon
494 */
495
496#define nta_outgoing_tmcreate nta_outgoing_mcreate
497#define nta_msg_response_complete(msg, irq, status, phrase) \
498 nta_incoming_complete_response((irq), (msg), (status), (phrase), TAG_END())
499
501
503
504SOFIA_END_DECLS
505
506#endif
char const * nta_incoming_method_name(nta_incoming_t const *irq)
Get method name of a server transaction.
Definition nta.c:6041
@ NTA_SIP_T1
SIP T1, 500 milliseconds.
Definition nta.h:109
@ NTA_SIP_T4
SIP T4, 5 seconds.
Definition nta.h:111
@ NTA_SIP_T2
SIP T2, 4 seconds.
Definition nta.h:110
@ NTA_TIME_MAX
Maximum value for timers.
Definition nta.h:112
int nta_sip_is_internal(sip_t const *sip)
Check if the headers are from response generated locally by NTA.
Definition nta.c:3568
int nta_outgoing_status(nta_outgoing_t const *orq)
Get the status code of a client transaction.
Definition nta.c:7808
char const * nta_leg_tag(nta_leg_t *leg, char const *tag)
Add local tag.
Definition nta.c:4626
int nta_request_f(nta_leg_magic_t *lmagic, nta_leg_t *leg, nta_incoming_t *irq, sip_t const *sip)
Callback for incoming requests.
Definition nta.h:180
nta_reliable_t * nta_reliable_mreply(nta_incoming_t *irq, nta_prack_f *callback, nta_reliable_magic_t *rmagic, msg_t *msg)
Respond reliably with msg.
Definition nta.c:11154
nta_outgoing_t * nta_outgoing_find(nta_agent_t const *sa, msg_t const *msg, sip_t const *sip, sip_via_t const *v)
Find an outgoing request corresponging to a message and Via line.
Definition nta.c:9363
int nta_agent_get_stats(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA statistics.
Definition nta.c:1902
int nta_incoming_treply(nta_incoming_t *ireq, int status, char const *phrase, tag_type_t tag, tag_value_t value,...)
Reply to an incoming transaction request.
Definition nta.c:6675
void nta_agent_destroy(nta_agent_t *agent)
Destroy an NTA agent object.
Definition nta.c:1029
nta_agent_magic_t * nta_agent_magic(nta_agent_t const *a)
Return agent context.
Definition nta.c:1113
nta_outgoing_t * nta_outgoing_tcreate(nta_leg_t *leg, nta_response_f *callback, nta_outgoing_magic_t *magic, url_string_t const *route_url, sip_method_t method, char const *method_name, url_string_t const *request_uri, tag_type_t tag, tag_value_t value,...)
Create an outgoing request and client transaction belonging to the leg.
Definition nta.c:7456
uint32_t nta_leg_get_rseq(nta_leg_t const *leg)
Get remote request sequence number.
Definition nta.c:4709
nta_outgoing_magic_t * nta_outgoing_magic(nta_outgoing_t const *orq, nta_response_f *callback)
Get application context bound to a client transaction.
Definition nta.c:7742
nta_leg_t * nta_leg_by_dialog(nta_agent_t const *agent, url_t const *request_uri, sip_call_id_t const *call_id, char const *from_tag, url_t const *from_url, char const *to_tag, url_t const *to_url)
Get leg by dialog.
Definition nta.c:5016
NTA_AGENT_MAGIC_T nta_agent_magic_t
Application context for NTA agents.
Definition nta.h:89
struct nta_reliable_s nta_reliable_t
NTA reliable response.
Definition nta.h:459
msg_t * nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase)
Create a response message for request.
Definition nta.c:6635
char const * nta_outgoing_method_name(nta_outgoing_t const *orq)
Return method name of the client transaction.
Definition nta.c:7792
NTA_INCOMING_MAGIC_T nta_incoming_magic_t
Application context for incoming NTA requests.
Definition nta.h:95
NTA_RELIABLE_MAGIC_T nta_reliable_magic_t
Application context for reliable preliminary responses.
Definition nta.h:469
#define NTA_AGENT_MAGIC_T
Default type of application context for NTA agents.
Definition nta.h:67
sip_replaces_t * nta_leg_make_replaces(nta_leg_t *leg, su_home_t *home, int early_only)
Generate Replaces header.
Definition nta.c:4789
char const * nta_incoming_tag(nta_incoming_t *irq, char const *tag)
Add a To tag to incoming request if needed.
Definition nta.c:5941
sip_via_t * nta_agent_public_via(nta_agent_t const *a)
Return a list of public (UPnP, STUN) Via headers.
Definition nta.c:1164
struct nta_leg_s nta_leg_t
NTA call leg.
Definition nta.h:57
char const nta_version[]
NTA module version.
Definition nta.c:100
int nta_is_internal_msg(msg_t const *msg)
Check if the message is internally generated by NTA.
Definition nta.c:3585
void nta_incoming_destroy(nta_incoming_t *irq)
Destroy an incoming transaction.
Definition nta.c:5655
nta_leg_magic_t * nta_leg_magic(nta_leg_t const *leg, nta_request_f *callback)
Return application context for the leg.
Definition nta.c:4586
struct nta_incoming_s nta_incoming_t
NTA incoming request.
Definition nta.h:61
nta_outgoing_t * nta_outgoing_prack(nta_leg_t *leg, nta_outgoing_t *oorq, nta_response_f *callback, nta_outgoing_magic_t *magic, url_string_t const *route_url, sip_t const *response_to_prack, tag_type_t, tag_value_t,...)
PRACK a provisional response.
Definition nta.c:11729
int nta_check_required(nta_incoming_t *irq, sip_t const *sip, sip_supported_t const *supported, tag_type_t tag, tag_value_t value,...)
Check that we support all features which UAC requires.
Definition nta_check.c:61
msg_t * nta_incoming_getresponse(nta_incoming_t *irq)
Get response message.
Definition nta.c:6024
NTA_LEG_MAGIC_T nta_leg_magic_t
Application context for NTA call legs.
Definition nta.h:91
int nta_outgoing_bind(nta_outgoing_t *orq, nta_response_f *callback, nta_outgoing_magic_t *magic)
Bind callback and application context to a client transaction.
Definition nta.c:7716
nta_incoming_magic_t * nta_incoming_magic(nta_incoming_t *irq, nta_ack_cancel_f *callback)
Get application context for a server transaction.
Definition nta.c:6088
nta_incoming_t * nta_incoming_default(nta_agent_t *agent)
Create a default server transaction.
Definition nta.c:5374
int nta_check_method(nta_incoming_t *irq, sip_t const *sip, sip_allow_t const *allow, tag_type_t tag, tag_value_t value,...)
Check that we allow the request method.
Definition nta_check.c:149
int nta_check_session_expires(nta_incoming_t *irq, sip_t const *sip, sip_time_t my_min_se, tag_type_t tag, tag_value_t value,...)
Check Session-Expires header.
Definition nta_check.c:359
void nta_leg_bind(nta_leg_t *leg, nta_request_f *callback, nta_leg_magic_t *)
Bind a callback function and context to a leg object.
Definition nta.c:4605
int nta_agent_get_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA Parameters.
Definition nta.c:1791
msg_t * nta_msg_create(nta_agent_t *self, int flags)
Create a new message belonging to the agent.
Definition nta.c:3525
int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq)
Set RSeq value stored with client transaction.
Definition nta.c:11884
int nta_message_f(nta_agent_magic_t *context, nta_agent_t *agent, msg_t *msg, sip_t *sip)
Callback for incoming messages.
Definition nta.h:120
msg_t * nta_outgoing_getresponse(nta_outgoing_t *orq)
Get reference to response message.
Definition nta.c:7840
int nta_msg_is_internal(msg_t const *msg)
Check if the message is internally generated by NTA.
Definition nta.c:3576
int nta_leg_get_route(nta_leg_t *leg, sip_route_t const **return_route, sip_contact_t const **return_target)
Get route.
Definition nta.c:4768
msg_t * nta_outgoing_getrequest(nta_outgoing_t *orq)
Get request message.
Definition nta.c:7857
int nta_tport_keepalive(nta_outgoing_t *orq)
Initiate STUN keepalive controller to TPORT.
Definition nta.c:12088
nta_leg_t * nta_leg_by_uri(nta_agent_t const *, url_string_t const *)
Get leg by destination.
Definition nta.c:5140
int nta_incoming_set_params(nta_incoming_t *irq, tag_type_t tag, tag_value_t value,...)
Set server transaction parameters.
Definition nta.c:6443
int nta_incoming_status(nta_incoming_t const *irq)
Get status code of a server transaction.
Definition nta.c:6073
int nta_check_session_content(nta_incoming_t *irq, sip_t const *sip, sip_accept_t const *session_accepts, tag_type_t tag, tag_value_t value,...)
Check that we understand session content in the request.
Definition nta_check.c:210
nta_agent_t * nta_agent_create(su_root_t *root, url_string_t const *name, nta_message_f *callback, nta_agent_magic_t *magic, tag_type_t tag, tag_value_t value,...)
Create an NTA agent object.
Definition nta.c:875
nta_leg_t * nta_leg_by_replaces(nta_agent_t *, sip_replaces_t const *)
Get dialog leg by Replaces header.
Definition nta.c:4813
int nta_outgoing_cancel(nta_outgoing_t *)
Cancel the request.
Definition nta.c:7581
unsigned nta_outgoing_delay(nta_outgoing_t const *orq)
Get the RTT delay measured using Timestamp header.
Definition nta.c:7815
sip_via_t * nta_agent_via(nta_agent_t const *a)
Return a list of Via headers.
Definition nta.c:1151
int nta_leg_server_route(nta_leg_t *leg, sip_record_route_t const *route, sip_contact_t const *contact)
Save target and route set at UAS side.
Definition nta.c:4760
int nta_agent_close_tports(nta_agent_t *agent)
Close all transports.
Definition nta.c:12101
uint32_t nta_incoming_cseq(nta_incoming_t const *irq)
Get sequence number of a server transaction.
Definition nta.c:6059
msg_t * nta_incoming_getrequest_ackcancel(nta_incoming_t *irq)
Get ACK or CANCEL message.
Definition nta.c:6003
nta_outgoing_t * nta_outgoing_mcreate(nta_agent_t *agent, nta_response_f *callback, nta_outgoing_magic_t *magic, url_string_t const *route_url, msg_t *msg, tag_type_t tag, tag_value_t value,...)
Create an outgoing client transaction.
Definition nta.c:7552
char const * nta_leg_rtag(nta_leg_t *leg, char const *tag)
Add remote tag.
Definition nta.c:4679
nta_outgoing_t * nta_outgoing_tcancel(nta_outgoing_t *orq, nta_response_f *callback, nta_outgoing_magic_t *magic, tag_type_t, tag_value_t,...)
Cancel the request.
Definition nta.c:7613
nta_outgoing_t * nta_outgoing_tagged(nta_outgoing_t *orq, nta_response_f *callback, nta_outgoing_magic_t *magic, char const *to_tag, sip_rseq_t const *rseq)
Create a tagged fork of outgoing request.
Definition nta.c:11618
void nta_reliable_destroy(nta_reliable_t *)
Destroy a reliable response.
Definition nta.c:11518
uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq)
Get sequence number of a client transaction.
Definition nta.c:7799
#define NTA_OUTGOING_MAGIC_T
Default type of application context for outgoing NTA requests.
Definition nta.h:79
struct nta_agent_s nta_agent_t
NTA agent.
Definition nta.h:55
int nta_check_supported(nta_incoming_t *irq, sip_t const *sip, sip_require_t *require, tag_type_t tag, tag_value_t value,...)
Check that UAC supports all the required features.
Definition nta_check.c:111
msg_t * nta_incoming_getrequest(nta_incoming_t *irq)
Get request message.
Definition nta.c:5982
nta_reliable_t * nta_reliable_treply(nta_incoming_t *ireq, nta_prack_f *callback, nta_reliable_magic_t *rmagic, int status, char const *phrase, tag_type_t tag, tag_value_t value,...)
Respond reliably.
Definition nta.c:11109
url_t const * nta_outgoing_request_uri(nta_outgoing_t const *orq)
Return the request URI.
Definition nta.c:7774
nta_outgoing_t * nta_outgoing_default(nta_agent_t *agent, nta_response_f *callback, nta_outgoing_magic_t *magic)
Create a default outgoing transaction.
Definition nta.c:7389
url_t const * nta_outgoing_route_uri(nta_outgoing_t const *orq)
Return the URI used to route the request.
Definition nta.c:7780
int nta_check_accept(nta_incoming_t *irq, sip_t const *sip, sip_accept_t const *acceptable, sip_accept_t const **return_acceptable, tag_type_t tag, tag_value_t value,...)
Check that UAC accepts one of listed MIME content-types.
Definition nta_check.c:290
nta_leg_t * nta_leg_tcreate(nta_agent_t *agent, nta_request_f *req_callback, nta_leg_magic_t *magic, tag_type_t tag, tag_value_t value,...)
Create a new leg object.
Definition nta.c:4296
char const * nta_leg_get_rtag(nta_leg_t const *leg)
Get remote tag.
Definition nta.c:4694
uint32_t nta_leg_get_seq(nta_leg_t const *leg)
Get local request sequence number.
Definition nta.c:4703
char const * nta_leg_get_tag(nta_leg_t const *leg)
Get local tag.
Definition nta.c:4661
int nta_leg_client_reroute(nta_leg_t *leg, sip_record_route_t const *route, sip_contact_t const *contact, int initial)
Save target and route set at UAC side.
Definition nta.c:4744
char const * nta_incoming_gettag(nta_incoming_t const *irq)
Get local tag for incoming request.
Definition nta.c:6065
int nta_agent_add_tport(nta_agent_t *agent, url_string_t const *url, tag_type_t tag, tag_value_t value,...)
Add a transport to the agent.
Definition nta.c:2180
char const * nta_agent_newtag(su_home_t *, char const *fmt, nta_agent_t *)
Calculate a new unique tag.
Definition nta.c:1974
url_t const * nta_incoming_url(nta_incoming_t const *irq)
Get Request-URI of a server transaction.
Definition nta.c:6052
int nta_response_f(nta_outgoing_magic_t *magic, nta_outgoing_t *request, sip_t const *sip)
Callback for replies to outgoing requests.
Definition nta.h:367
struct nta_outgoing_s nta_outgoing_t
NTA outgoing request.
Definition nta.h:59
#define NTA_RELIABLE_MAGIC_T
Default type of application context for reliable preliminary responses.
Definition nta.h:465
void nta_incoming_bind(nta_incoming_t *irq, nta_ack_cancel_f *callback, nta_incoming_magic_t *imagic)
Bind a callback and context to an incoming transaction object.
Definition nta.c:5927
int nta_agent_set_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Set NTA Parameters.
Definition nta.c:1449
sip_time_t nta_incoming_received(nta_incoming_t *irq, su_nanotime_t *nano)
When received.
Definition nta.c:6101
int nta_ack_cancel_f(nta_incoming_magic_t *imagic, nta_incoming_t *irq, sip_t const *sip)
Callback function prototype for CANCELed/ACKed requests.
Definition nta.h:277
sip_contact_t * nta_agent_contact(nta_agent_t const *a)
Return Contact header.
Definition nta.c:1138
char const * nta_agent_version(nta_agent_t const *a)
Return User-Agent header.
Definition nta.c:1208
nta_leg_t * nta_default_leg(nta_agent_t const *agent)
Return the default leg, if any.
Definition nta.c:4511
uint32_t nta_outgoing_rseq(nta_outgoing_t const *orq)
Get RSeq value stored with client transaction.
Definition nta.c:11874
int nta_incoming_complete_response(nta_incoming_t *irq, msg_t *msg, int status, char const *phrase, tag_type_t tag, tag_value_t value,...)
Complete a response message.
Definition nta.c:6578
#define NTA_INCOMING_MAGIC_T
Default type of application context for incoming NTA requests.
Definition nta.h:85
int nta_msg_request_complete(msg_t *msg, nta_leg_t *leg, sip_method_t method, char const *method_name, url_string_t const *req_url)
Complete a request with values from dialog.
Definition nta.c:4032
int nta_leg_client_route(nta_leg_t *leg, sip_record_route_t const *route, sip_contact_t const *contact)
Save target and route set at UAC side.
Definition nta.c:4723
char const * nta_outgoing_branch(nta_outgoing_t const *orq)
Get the branch parameter.
Definition nta.c:7821
#define NTA_LEG_MAGIC_T
Default type of application context for NTA call legs.
Definition nta.h:73
nta_incoming_t * nta_incoming_find(nta_agent_t const *agent, sip_t const *sip, sip_via_t const *v)
Find incoming transaction.
Definition nta.c:6116
sip_method_t nta_outgoing_method(nta_outgoing_t const *orq)
Return method of the client transaction.
Definition nta.c:7786
int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
Return a response message to client.
Definition nta.c:6719
sip_method_t nta_incoming_method(nta_incoming_t const *irq)
Get method of a server transaction.
Definition nta.c:6035
void nta_msg_discard(nta_agent_t *agent, msg_t *msg)
Discard a message.
Definition nta.c:3562
int nta_msg_complete(msg_t *msg)
Complete a message.
Definition nta.c:3556
nta_leg_t * nta_leg_by_call_id(nta_agent_t *sa, const char *call_id)
Get dialog leg by CallID.
Definition nta.c:4872
void nta_leg_destroy(nta_leg_t *leg)
Destroy a leg.
Definition nta.c:4548
NTA_OUTGOING_MAGIC_T nta_outgoing_magic_t
Application context for outgoing NTA requests.
Definition nta.h:93
nta_incoming_t * nta_incoming_create(nta_agent_t *agent, nta_leg_t *leg, msg_t *msg, sip_t *sip, tag_type_t tag, tag_value_t value,...)
Create a server transaction.
Definition nta.c:5428
void nta_outgoing_destroy(nta_outgoing_t *)
Destroy a request object.
Definition nta.c:7759
NTA tags.
msg_time_t sip_time_t
sip_method_t
SU_HOME_T su_home_t
#define SOFIAPUBFUN
#define SOFIAPUBVAR
intptr_t tag_value_t
struct tag_type_s const * tag_type_t
SU_U32_T uint32_t
struct su_root_t su_root_t

Sofia-SIP 1.13.17 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.