nta 1.13.18
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
35
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
114};
115
116typedef struct nta_outgoing_query_results_data_s {
117 char **results;
118 size_t found;
119} nta_outgoing_query_results_data_t;
120
121/* ----------------------------------------------------------------------
122 * 3) Agent-level prototypes
123 */
124
125typedef int nta_message_f(nta_agent_magic_t *context,
126 nta_agent_t *agent,
127 msg_t *msg,
128 sip_t *sip);
129
132 url_string_t const *name,
133 nta_message_f *callback,
134 nta_agent_magic_t *magic,
135 tag_type_t tag, tag_value_t value, ...);
136
138SOFIAPUBFUN void nta_agent_resolver_clean_cache(nta_agent_t *agent);
139SOFIAPUBFUN int nta_agent_reload_tls(nta_agent_t *agent, char const *cert_dir);
140
141SOFIAPUBFUN char const *nta_agent_version(nta_agent_t const *a);
143
146 url_string_t const *url,
147 tag_type_t tag, tag_value_t value, ...);
148
150
154
156 char const *fmt, nta_agent_t *);
157
159 tag_type_t tag, tag_value_t value, ...);
161 tag_type_t tag, tag_value_t value, ...);
162
164 tag_type_t tag, tag_value_t value, ...);
165
166/* ----------------------------------------------------------------------
167 * 4) Message-level prototypes
168 */
169
171
173
175 nta_leg_t *leg,
176 sip_method_t method,
177 char const *method_name,
178 url_string_t const *req_url);
179
182
183/* ----------------------------------------------------------------------
184 * 5) Leg-level prototypes
185 */
186typedef int nta_request_f(nta_leg_magic_t *lmagic,
187 nta_leg_t *leg,
188 nta_incoming_t *irq,
189 sip_t const *sip);
190
193 nta_request_f *req_callback,
194 nta_leg_magic_t *magic,
195 tag_type_t tag, tag_value_t value, ...);
196
198
200
202 nta_request_f *callback);
203
205 nta_request_f *callback,
207
209SOFIAPUBFUN char const *nta_leg_tag(nta_leg_t *leg, char const *tag);
210
212SOFIAPUBFUN char const *nta_leg_get_tag(nta_leg_t const *leg);
213
215SOFIAPUBFUN char const *nta_leg_rtag(nta_leg_t *leg, char const *tag);
216
218SOFIAPUBFUN char const *nta_leg_get_rtag(nta_leg_t const *leg);
219
222
225
227 sip_record_route_t const *route,
228 sip_contact_t const *contact);
229
231 sip_record_route_t const *route,
232 sip_contact_t const *contact,
233 int initial);
234
236 sip_record_route_t const *route,
237 sip_contact_t const *contact);
238
241 sip_route_t const **return_route,
242 sip_contact_t const **return_target);
243
246 url_string_t const *);
247
251 url_t const *request_uri,
252 sip_call_id_t const *call_id,
253 char const *from_tag,
254 url_t const *from_url,
255 char const *to_tag,
256 url_t const *to_url);
257
260 su_home_t *home,
261 int early_only);
265
268nta_leg_t *nta_leg_by_call_id(nta_agent_t *sa, const char *call_id);
269
270/* ----------------------------------------------------------------------
271 * 6) Prototypes for incoming transactions
272 */
273
276 nta_leg_t *leg,
277 msg_t *msg,
278 sip_t *sip,
279 tag_type_t tag, tag_value_t value, ...);
280
282
284 nta_incoming_t *irq,
285 sip_t const *sip);
286
288 nta_ack_cancel_f *callback,
289 nta_incoming_magic_t *imagic);
290
293 nta_ack_cancel_f *callback);
294
297 sip_t const *sip,
298 sip_via_t const *v);
299
300SOFIAPUBFUN char const *nta_incoming_tag(nta_incoming_t *irq, char const *tag);
301SOFIAPUBFUN char const *nta_incoming_gettag(nta_incoming_t const *irq);
302
309
311 tag_type_t tag, tag_value_t value, ...);
312
316
319 msg_t *msg,
320 int status,
321 char const *phrase,
322 tag_type_t tag, tag_value_t value, ...);
323
325msg_t *nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase);
326
329 int status, char const *phrase,
330 tag_type_t tag, tag_value_t value, ...);
331
333
335
336/* Functions for feature, method, mime, session-timer negotation */
337
340 sip_t const *sip,
341 sip_supported_t const *supported,
342 tag_type_t tag, tag_value_t value, ...);
345 sip_t const *sip,
346 sip_require_t *require,
347 tag_type_t tag, tag_value_t value, ...);
350 sip_t const *sip,
351 sip_allow_t const *allow,
352 tag_type_t tag, tag_value_t value, ...);
355 sip_accept_t const *session_accepts,
356 tag_type_t tag, tag_value_t value, ...);
359 sip_t const *sip,
360 sip_accept_t const *acceptable,
361 sip_accept_t const **return_acceptable,
362 tag_type_t tag, tag_value_t value, ...);
363
366 sip_t const *sip,
367 sip_time_t my_min_se,
368 tag_type_t tag, tag_value_t value, ...);
369
370/* ----------------------------------------------------------------------
371 * 7) Prototypes for outgoing transactions
372 */
374 nta_outgoing_t *request,
375 sip_t const *sip);
376
379 nta_response_f *callback,
381 url_string_t const *route_url,
382 sip_method_t method,
383 char const *method_name,
384 url_string_t const *request_uri,
385 tag_type_t tag, tag_value_t value, ...);
386
389 nta_response_f *callback,
391 url_string_t const *route_url,
392 msg_t *msg,
393 tag_type_t tag, tag_value_t value, ...);
394
397 nta_response_f *callback,
398 nta_outgoing_magic_t *magic);
399
401 nta_response_f *callback,
402 nta_outgoing_magic_t *magic);
404 nta_response_f *callback);
409SOFIAPUBFUN char const *nta_outgoing_branch(nta_outgoing_t const *orq);
410
412
413SOFIAPUBFUN char const *nta_outgoing_cannon(nta_outgoing_t const *orq);
414SOFIAPUBFUN char const *nta_outgoing_host(nta_outgoing_t const *orq);
415SOFIAPUBFUN nta_outgoing_query_results_data_t *nta_outgoing_query_results(nta_outgoing_t const *orq, char ***results, size_t *found);
416
419
422
425 nta_response_f *callback,
427 char const *to_tag,
428 sip_rseq_t const *rseq);
429
431
434 nta_response_f *callback,
436 tag_type_t, tag_value_t, ...);
437
439
442 msg_t const *msg,
443 sip_t const *sip,
444 sip_via_t const *v);
445
447
448/* ----------------------------------------------------------------------
449 * 8) Reliable provisional responses (100rel)
450 */
451
452/* UAC side */
453
456 nta_outgoing_t *oorq,
457 nta_response_f *callback,
459 url_string_t const *route_url,
460 sip_t const *response_to_prack,
461 tag_type_t, tag_value_t, ...);
462
465
466/* UAS side */
467
469typedef struct nta_reliable_s nta_reliable_t;
470
471#ifndef NTA_RELIABLE_MAGIC_T
475#define NTA_RELIABLE_MAGIC_T struct nta_reliable_magic_s
476#endif
477
480
481typedef int nta_prack_f(nta_reliable_magic_t *rmagic,
482 nta_reliable_t *rel,
483 nta_incoming_t *prack,
484 sip_t const *sip);
485
488 nta_prack_f *callback,
489 nta_reliable_magic_t *rmagic,
490 int status, char const *phrase,
491 tag_type_t tag,
492 tag_value_t value, ...);
493
496 nta_prack_f *callback,
497 nta_reliable_magic_t *rmagic,
498 msg_t *msg);
499
501
502/* ----------------------------------------------------------------------
503 * Backward-compatibility stuff - going away soon
504 */
505
506#define nta_outgoing_tmcreate nta_outgoing_mcreate
507#define nta_msg_response_complete(msg, irq, status, phrase) \
508 nta_incoming_complete_response((irq), (msg), (status), (phrase), TAG_END())
509
511
513
514SOFIA_END_DECLS
515
516#endif
struct sip_accept_s sip_accept_t
struct sip_allow_s sip_allow_t
struct sip_call_id_s sip_call_id_t
struct sip_contact_s sip_contact_t
struct sip_route_s sip_record_route_t
struct sip_replaces_s sip_replaces_t
msg_list_t sip_require_t
struct sip_route_s sip_route_t
struct sip_rseq_s sip_rseq_t
msg_list_t sip_supported_t
struct sip_via_s sip_via_t
struct msg_s msg_t
char const * nta_incoming_method_name(nta_incoming_t const *irq)
Get method name of a server transaction.
Definition nta.c:6059
int nta_sip_is_internal(sip_t const *sip)
Check if the headers are from response generated locally by NTA.
Definition nta.c:3586
int nta_outgoing_status(nta_outgoing_t const *orq)
Get the status code of a client transaction.
Definition nta.c:7826
char const * nta_leg_tag(nta_leg_t *leg, char const *tag)
Add local tag.
Definition nta.c:4644
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:186
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:11228
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:9416
int nta_agent_get_stats(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA statistics.
Definition nta.c:1920
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:6693
void nta_agent_destroy(nta_agent_t *agent)
Destroy an NTA agent object.
Definition nta.c:1040
nta_agent_magic_t * nta_agent_magic(nta_agent_t const *a)
Return agent context.
Definition nta.c:1131
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:7474
uint32_t nta_leg_get_rseq(nta_leg_t const *leg)
Get remote request sequence number.
Definition nta.c:4727
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:7760
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:5034
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:469
msg_t * nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase)
Create a response message for request.
Definition nta.c:6653
char const * nta_outgoing_method_name(nta_outgoing_t const *orq)
Return method name of the client transaction.
Definition nta.c:7810
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:479
#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:4807
char const * nta_incoming_tag(nta_incoming_t *irq, char const *tag)
Add a To tag to incoming request if needed.
Definition nta.c:5959
sip_via_t * nta_agent_public_via(nta_agent_t const *a)
Return a list of public (UPnP, STUN) Via headers.
Definition nta.c:1182
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:3603
void nta_incoming_destroy(nta_incoming_t *irq)
Destroy an incoming transaction.
Definition nta.c:5673
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:4604
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:11803
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
@ 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
msg_t * nta_incoming_getresponse(nta_incoming_t *irq)
Get response message.
Definition nta.c:6042
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:7734
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:6106
nta_incoming_t * nta_incoming_default(nta_agent_t *agent)
Create a default server transaction.
Definition nta.c:5392
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:4623
int nta_agent_get_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA Parameters.
Definition nta.c:1809
msg_t * nta_msg_create(nta_agent_t *self, int flags)
Create a new message belonging to the agent.
Definition nta.c:3543
int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq)
Set RSeq value stored with client transaction.
Definition nta.c:11958
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:125
msg_t * nta_outgoing_getresponse(nta_outgoing_t *orq)
Get reference to response message.
Definition nta.c:7881
int nta_msg_is_internal(msg_t const *msg)
Check if the message is internally generated by NTA.
Definition nta.c:3594
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:4786
msg_t * nta_outgoing_getrequest(nta_outgoing_t *orq)
Get request message.
Definition nta.c:7898
int nta_tport_keepalive(nta_outgoing_t *orq)
Initiate STUN keepalive controller to TPORT.
Definition nta.c:12162
nta_leg_t * nta_leg_by_uri(nta_agent_t const *, url_string_t const *)
Get leg by destination.
Definition nta.c:5158
int nta_incoming_set_params(nta_incoming_t *irq, tag_type_t tag, tag_value_t value,...)
Set server transaction parameters.
Definition nta.c:6461
int nta_incoming_status(nta_incoming_t const *irq)
Get status code of a server transaction.
Definition nta.c:6091
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:886
nta_leg_t * nta_leg_by_replaces(nta_agent_t *, sip_replaces_t const *)
Get dialog leg by Replaces header.
Definition nta.c:4831
int nta_outgoing_cancel(nta_outgoing_t *)
Cancel the request.
Definition nta.c:7599
unsigned nta_outgoing_delay(nta_outgoing_t const *orq)
Get the RTT delay measured using Timestamp header.
Definition nta.c:7833
sip_via_t * nta_agent_via(nta_agent_t const *a)
Return a list of Via headers.
Definition nta.c:1169
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:4778
int nta_agent_close_tports(nta_agent_t *agent)
Close all transports.
Definition nta.c:12175
uint32_t nta_incoming_cseq(nta_incoming_t const *irq)
Get sequence number of a server transaction.
Definition nta.c:6077
msg_t * nta_incoming_getrequest_ackcancel(nta_incoming_t *irq)
Get ACK or CANCEL message.
Definition nta.c:6021
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:7570
char const * nta_leg_rtag(nta_leg_t *leg, char const *tag)
Add remote tag.
Definition nta.c:4697
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:7631
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:11692
void nta_reliable_destroy(nta_reliable_t *)
Destroy a reliable response.
Definition nta.c:11592
uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq)
Get sequence number of a client transaction.
Definition nta.c:7817
#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:6000
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:11183
url_t const * nta_outgoing_request_uri(nta_outgoing_t const *orq)
Return the request URI.
Definition nta.c:7792
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:7407
url_t const * nta_outgoing_route_uri(nta_outgoing_t const *orq)
Return the URI used to route the request.
Definition nta.c:7798
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:4314
char const * nta_leg_get_rtag(nta_leg_t const *leg)
Get remote tag.
Definition nta.c:4712
uint32_t nta_leg_get_seq(nta_leg_t const *leg)
Get local request sequence number.
Definition nta.c:4721
char const * nta_leg_get_tag(nta_leg_t const *leg)
Get local tag.
Definition nta.c:4679
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:4762
char const * nta_incoming_gettag(nta_incoming_t const *irq)
Get local tag for incoming request.
Definition nta.c:6083
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:2198
char const * nta_agent_newtag(su_home_t *, char const *fmt, nta_agent_t *)
Calculate a new unique tag.
Definition nta.c:1992
url_t const * nta_incoming_url(nta_incoming_t const *irq)
Get Request-URI of a server transaction.
Definition nta.c:6070
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:373
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:475
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:5945
int nta_agent_set_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Set NTA Parameters.
Definition nta.c:1467
sip_time_t nta_incoming_received(nta_incoming_t *irq, su_nanotime_t *nano)
When received.
Definition nta.c:6119
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:283
sip_contact_t * nta_agent_contact(nta_agent_t const *a)
Return Contact header.
Definition nta.c:1156
char const * nta_agent_version(nta_agent_t const *a)
Return User-Agent header.
Definition nta.c:1226
nta_leg_t * nta_default_leg(nta_agent_t const *agent)
Return the default leg, if any.
Definition nta.c:4529
uint32_t nta_outgoing_rseq(nta_outgoing_t const *orq)
Get RSeq value stored with client transaction.
Definition nta.c:11948
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:6596
nta_outgoing_query_results_data_t * nta_outgoing_query_results(nta_outgoing_t const *orq, char ***results, size_t *found)
Get the nta_outgoing_query_results_t.
Definition nta.c:7839
#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:4050
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:4741
char const * nta_outgoing_branch(nta_outgoing_t const *orq)
Get the branch parameter.
Definition nta.c:7862
#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:6134
sip_method_t nta_outgoing_method(nta_outgoing_t const *orq)
Return method of the client transaction.
Definition nta.c:7804
int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
Return a response message to client.
Definition nta.c:6737
sip_method_t nta_incoming_method(nta_incoming_t const *irq)
Get method of a server transaction.
Definition nta.c:6053
void nta_msg_discard(nta_agent_t *agent, msg_t *msg)
Discard a message.
Definition nta.c:3580
int nta_msg_complete(msg_t *msg)
Complete a message.
Definition nta.c:3574
nta_leg_t * nta_leg_by_call_id(nta_agent_t *sa, const char *call_id)
Get dialog leg by CallID.
Definition nta.c:4890
void nta_leg_destroy(nta_leg_t *leg)
Destroy a leg.
Definition nta.c:4566
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:5446
void nta_outgoing_destroy(nta_outgoing_t *)
Destroy a request object.
Definition nta.c:7777
NTA tags.
struct sip_s sip_t
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.18 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.