Loading...
Searching...
No Matches
nta.h
Go to the documentation of this file.
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef NTA_H
#define NTA_H
#ifndef SU_WAIT_H
#include <sofia-sip/su_wait.h>
#endif
#ifndef SIP_H
#include <sofia-sip/sip.h>
#endif
#ifndef NTA_TAG_H
#include <sofia-sip/nta_tag.h>
#endif
SOFIA_BEGIN_DECLS
/* ----------------------------------------------------------------------
* 1) Types
*/
typedef struct nta_agent_s nta_agent_t;
typedef struct nta_leg_s nta_leg_t;
typedef struct nta_outgoing_s nta_outgoing_t;
typedef struct nta_incoming_s nta_incoming_t;
#ifndef NTA_AGENT_MAGIC_T
#define NTA_AGENT_MAGIC_T struct nta_agent_magic_s
#endif
#ifndef NTA_LEG_MAGIC_T
#define NTA_LEG_MAGIC_T struct nta_leg_magic_s
#endif
#ifndef NTA_OUTGOING_MAGIC_T
#define NTA_OUTGOING_MAGIC_T struct nta_outgoing_magic_s
#endif
#ifndef NTA_INCOMING_MAGIC_T
#define NTA_INCOMING_MAGIC_T struct nta_incoming_magic_s
#endif
typedef NTA_AGENT_MAGIC_T nta_agent_magic_t;
typedef NTA_LEG_MAGIC_T nta_leg_magic_t;
typedef NTA_OUTGOING_MAGIC_T nta_outgoing_magic_t;
typedef NTA_INCOMING_MAGIC_T nta_incoming_magic_t;
/* ----------------------------------------------------------------------
* 2) Constants
*/
#define NTA_VERSION "2.0"
SOFIAPUBVAR char const nta_version[];
enum {
/* Stack parameters */
NTA_SIP_T1 = 500,
NTA_SIP_T2 = 4000,
NTA_SIP_T4 = 5000,
NTA_TIME_MAX = 15 * 24 * 3600 * 1000
};
/* ----------------------------------------------------------------------
* 3) Agent-level prototypes
*/
typedef int nta_message_f(nta_agent_magic_t *context,
nta_agent_t *agent,
msg_t *msg,
sip_t *sip);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN void nta_agent_destroy(nta_agent_t *agent);
SOFIAPUBFUN char const *nta_agent_version(nta_agent_t const *a);
SOFIAPUBFUN nta_agent_magic_t *nta_agent_magic(nta_agent_t const *a);
SOFIAPUBFUN
int nta_agent_add_tport(nta_agent_t *agent,
url_string_t const *url,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int nta_agent_close_tports(nta_agent_t *agent);
SOFIAPUBFUN sip_contact_t *nta_agent_contact(nta_agent_t const *a);
SOFIAPUBFUN sip_via_t *nta_agent_via(nta_agent_t const *a);
SOFIAPUBFUN sip_via_t *nta_agent_public_via(nta_agent_t const *a);
SOFIAPUBFUN char const *nta_agent_newtag(su_home_t *,
char const *fmt, nta_agent_t *);
SOFIAPUBFUN int nta_agent_set_params(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int nta_agent_get_params(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int nta_agent_get_stats(nta_agent_t *agent,
tag_type_t tag, tag_value_t value, ...);
/* ----------------------------------------------------------------------
* 4) Message-level prototypes
*/
SOFIAPUBFUN msg_t *nta_msg_create(nta_agent_t *self, int flags);
SOFIAPUBFUN int nta_msg_complete(msg_t *msg);
SOFIAPUBFUN 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);
SOFIAPUBFUN int nta_msg_is_internal(msg_t const *msg);
SOFIAPUBFUN int nta_sip_is_internal(sip_t const *sip);
/* ----------------------------------------------------------------------
* 5) Leg-level prototypes
*/
typedef int nta_request_f(nta_leg_magic_t *lmagic,
nta_leg_t *leg,
nta_incoming_t *irq,
sip_t const *sip);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN void nta_leg_destroy(nta_leg_t *leg);
SOFIAPUBFUN nta_leg_t *nta_default_leg(nta_agent_t const *agent);
SOFIAPUBFUN nta_leg_magic_t *nta_leg_magic(nta_leg_t const *leg,
nta_request_f *callback);
SOFIAPUBFUN void nta_leg_bind(nta_leg_t *leg,
nta_request_f *callback,
nta_leg_magic_t *);
SOFIAPUBFUN char const *nta_leg_tag(nta_leg_t *leg, char const *tag);
SOFIAPUBFUN char const *nta_leg_get_tag(nta_leg_t const *leg);
SOFIAPUBFUN char const *nta_leg_rtag(nta_leg_t *leg, char const *tag);
SOFIAPUBFUN char const *nta_leg_get_rtag(nta_leg_t const *leg);
SOFIAPUBFUN uint32_t nta_leg_get_seq(nta_leg_t const *leg);
SOFIAPUBFUN uint32_t nta_leg_get_rseq(nta_leg_t const *leg);
SOFIAPUBFUN int nta_leg_client_route(nta_leg_t *leg,
sip_record_route_t const *route,
sip_contact_t const *contact);
SOFIAPUBFUN int nta_leg_client_reroute(nta_leg_t *leg,
sip_record_route_t const *route,
sip_contact_t const *contact,
int initial);
SOFIAPUBFUN int nta_leg_server_route(nta_leg_t *leg,
sip_record_route_t const *route,
sip_contact_t const *contact);
SOFIAPUBFUN int nta_leg_get_route(nta_leg_t *leg,
sip_route_t const **return_route,
sip_contact_t const **return_target);
SOFIAPUBFUN nta_leg_t *nta_leg_by_uri(nta_agent_t const *,
url_string_t const *);
SOFIAPUBFUN
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);
SOFIAPUBFUN sip_replaces_t *nta_leg_make_replaces(nta_leg_t *leg,
su_home_t *home,
int early_only);
SOFIAPUBFUN
nta_leg_t *nta_leg_by_replaces(nta_agent_t *, sip_replaces_t const *);
SOFIAPUBFUN
nta_leg_t *nta_leg_by_call_id(nta_agent_t *sa, const char *call_id);
/* ----------------------------------------------------------------------
* 6) Prototypes for incoming transactions
*/
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN nta_incoming_t *nta_incoming_default(nta_agent_t *agent);
typedef int nta_ack_cancel_f(nta_incoming_magic_t *imagic,
nta_incoming_t *irq,
sip_t const *sip);
SOFIAPUBFUN void nta_incoming_bind(nta_incoming_t *irq,
nta_ack_cancel_f *callback,
nta_incoming_magic_t *imagic);
SOFIAPUBFUN
nta_incoming_magic_t *nta_incoming_magic(nta_incoming_t *irq,
nta_ack_cancel_f *callback);
SOFIAPUBFUN
nta_incoming_t *nta_incoming_find(nta_agent_t const *agent,
sip_t const *sip,
sip_via_t const *v);
SOFIAPUBFUN char const *nta_incoming_tag(nta_incoming_t *irq, char const *tag);
SOFIAPUBFUN char const *nta_incoming_gettag(nta_incoming_t const *irq);
SOFIAPUBFUN int nta_incoming_status(nta_incoming_t const *irq);
SOFIAPUBFUN sip_method_t nta_incoming_method(nta_incoming_t const *irq);
SOFIAPUBFUN char const *nta_incoming_method_name(nta_incoming_t const *irq);
SOFIAPUBFUN url_t const *nta_incoming_url(nta_incoming_t const *irq);
SOFIAPUBFUN uint32_t nta_incoming_cseq(nta_incoming_t const *irq);
SOFIAPUBFUN sip_time_t nta_incoming_received(nta_incoming_t *irq, su_nanotime_t *nano);
SOFIAPUBFUN int nta_incoming_set_params(nta_incoming_t *irq,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN msg_t *nta_incoming_getrequest(nta_incoming_t *irq);
SOFIAPUBFUN msg_t *nta_incoming_getrequest_ackcancel(nta_incoming_t *irq);
SOFIAPUBFUN msg_t *nta_incoming_getresponse(nta_incoming_t *irq);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
msg_t *nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase);
SOFIAPUBFUN
int nta_incoming_treply(nta_incoming_t *ireq,
int status, char const *phrase,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg);
SOFIAPUBFUN void nta_incoming_destroy(nta_incoming_t *irq);
/* Functions for feature, method, mime, session-timer negotation */
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
int nta_check_supported(nta_incoming_t *irq,
sip_t const *sip,
sip_require_t *require,
tag_type_t tag, tag_value_t value, ...);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
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, ...);
/* ----------------------------------------------------------------------
* 7) Prototypes for outgoing transactions
*/
typedef int nta_response_f(nta_outgoing_magic_t *magic,
nta_outgoing_t *request,
sip_t const *sip);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
nta_outgoing_t *nta_outgoing_default(nta_agent_t *agent,
nta_response_f *callback,
nta_outgoing_magic_t *magic);
SOFIAPUBFUN int nta_outgoing_bind(nta_outgoing_t *orq,
nta_response_f *callback,
nta_outgoing_magic_t *magic);
SOFIAPUBFUN nta_outgoing_magic_t *nta_outgoing_magic(nta_outgoing_t const *orq,
nta_response_f *callback);
SOFIAPUBFUN int nta_outgoing_status(nta_outgoing_t const *orq);
SOFIAPUBFUN sip_method_t nta_outgoing_method(nta_outgoing_t const *orq);
SOFIAPUBFUN char const *nta_outgoing_method_name(nta_outgoing_t const *orq);
SOFIAPUBFUN uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq);
SOFIAPUBFUN char const *nta_outgoing_branch(nta_outgoing_t const *orq);
SOFIAPUBFUN unsigned nta_outgoing_delay(nta_outgoing_t const *orq);
SOFIAPUBFUN url_t const *nta_outgoing_request_uri(nta_outgoing_t const *orq);
SOFIAPUBFUN url_t const *nta_outgoing_route_uri(nta_outgoing_t const *orq);
SOFIAPUBFUN msg_t *nta_outgoing_getresponse(nta_outgoing_t *orq);
SOFIAPUBFUN msg_t *nta_outgoing_getrequest(nta_outgoing_t *orq);
SOFIAPUBFUN
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);
SOFIAPUBFUN int nta_outgoing_cancel(nta_outgoing_t *);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN void nta_outgoing_destroy(nta_outgoing_t *);
SOFIAPUBFUN
nta_outgoing_t *nta_outgoing_find(nta_agent_t const *sa,
msg_t const *msg,
sip_t const *sip,
sip_via_t const *v);
SOFIAPUBFUN int nta_tport_keepalive(nta_outgoing_t *orq);
/* ----------------------------------------------------------------------
* 8) Reliable provisional responses (100rel)
*/
/* UAC side */
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN uint32_t nta_outgoing_rseq(nta_outgoing_t const *orq);
SOFIAPUBFUN int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq);
/* UAS side */
typedef struct nta_reliable_s nta_reliable_t;
#ifndef NTA_RELIABLE_MAGIC_T
#define NTA_RELIABLE_MAGIC_T struct nta_reliable_magic_s
#endif
typedef NTA_RELIABLE_MAGIC_T nta_reliable_magic_t;
typedef int nta_prack_f(nta_reliable_magic_t *rmagic,
nta_reliable_t *rel,
nta_incoming_t *prack,
sip_t const *sip);
SOFIAPUBFUN
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, ...);
SOFIAPUBFUN
nta_reliable_t *nta_reliable_mreply(nta_incoming_t *irq,
nta_prack_f *callback,
nta_reliable_magic_t *rmagic,
msg_t *msg);
SOFIAPUBFUN void nta_reliable_destroy(nta_reliable_t *);
/* ----------------------------------------------------------------------
* Backward-compatibility stuff - going away soon
*/
#define nta_outgoing_tmcreate nta_outgoing_mcreate
#define nta_msg_response_complete(msg, irq, status, phrase) \
nta_incoming_complete_response((irq), (msg), (status), (phrase), TAG_END())
SOFIAPUBFUN void nta_msg_discard(nta_agent_t *agent, msg_t *msg);
SOFIAPUBFUN int nta_is_internal_msg(msg_t const *msg);
SOFIA_END_DECLS
#endif
sip_accept_t
struct sip_accept_s sip_accept_t
sip_allow_t
struct sip_allow_s sip_allow_t
sip_call_id_t
struct sip_call_id_s sip_call_id_t
sip_contact_t
struct sip_contact_s sip_contact_t
sip_record_route_t
struct sip_route_s sip_record_route_t
sip_replaces_t
struct sip_replaces_s sip_replaces_t
sip_require_t
msg_list_t sip_require_t
sip_route_t
struct sip_route_s sip_route_t
sip_rseq_t
struct sip_rseq_s sip_rseq_t
sip_supported_t
msg_list_t sip_supported_t
sip_via_t
struct sip_via_s sip_via_t
msg_t
struct msg_s msg_t
nta_incoming_method_name
char const * nta_incoming_method_name(nta_incoming_t const *irq)
Get method name of a server transaction.
Definition nta.c:5830
nta_sip_is_internal
int nta_sip_is_internal(sip_t const *sip)
Check if the headers are from response generated locally by NTA.
Definition nta.c:3371
nta_outgoing_status
int nta_outgoing_status(nta_outgoing_t const *orq)
Get the status code of a client transaction.
Definition nta.c:7574
nta_leg_tag
char const * nta_leg_tag(nta_leg_t *leg, char const *tag)
Add local tag.
Definition nta.c:4418
nta_request_f
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:179
nta_reliable_mreply
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:10876
nta_outgoing_find
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:9072
nta_agent_get_stats
int nta_agent_get_stats(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA statistics.
Definition nta.c:1873
nta_incoming_treply
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:6454
nta_agent_destroy
void nta_agent_destroy(nta_agent_t *agent)
Destroy an NTA agent object.
Definition nta.c:1010
nta_agent_magic
nta_agent_magic_t * nta_agent_magic(nta_agent_t const *a)
Return agent context.
Definition nta.c:1085
nta_outgoing_tcreate
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:7222
nta_leg_get_rseq
uint32_t nta_leg_get_rseq(nta_leg_t const *leg)
Get remote request sequence number.
Definition nta.c:4501
nta_outgoing_magic
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:7508
nta_leg_by_dialog
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:4805
nta_agent_magic_t
NTA_AGENT_MAGIC_T nta_agent_magic_t
Application context for NTA agents.
Definition nta.h:89
nta_reliable_t
struct nta_reliable_s nta_reliable_t
NTA reliable response.
Definition nta.h:458
nta_incoming_create_response
msg_t * nta_incoming_create_response(nta_incoming_t *irq, int status, char const *phrase)
Create a response message for request.
Definition nta.c:6414
nta_outgoing_method_name
char const * nta_outgoing_method_name(nta_outgoing_t const *orq)
Return method name of the client transaction.
Definition nta.c:7558
nta_incoming_magic_t
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 nta_reliable_magic_t
Application context for reliable preliminary responses.
Definition nta.h:468
NTA_AGENT_MAGIC_T
#define NTA_AGENT_MAGIC_T
Default type of application context for NTA agents.
Definition nta.h:67
nta_leg_make_replaces
sip_replaces_t * nta_leg_make_replaces(nta_leg_t *leg, su_home_t *home, int early_only)
Generate Replaces header.
Definition nta.c:4581
nta_incoming_tag
char const * nta_incoming_tag(nta_incoming_t *irq, char const *tag)
Add a To tag to incoming request if needed.
Definition nta.c:5730
nta_agent_public_via
sip_via_t * nta_agent_public_via(nta_agent_t const *a)
Return a list of public (UPnP, STUN) Via headers.
Definition nta.c:1136
nta_leg_t
struct nta_leg_s nta_leg_t
NTA call leg.
Definition nta.h:57
nta_version
char const nta_version[]
NTA module version.
Definition nta.c:98
nta_is_internal_msg
int nta_is_internal_msg(msg_t const *msg)
Check if the message is internally generated by NTA.
Definition nta.c:3388
nta_incoming_destroy
void nta_incoming_destroy(nta_incoming_t *irq)
Destroy an incoming transaction.
Definition nta.c:5444
nta_leg_magic
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:4378
nta_incoming_t
struct nta_incoming_s nta_incoming_t
NTA incoming request.
Definition nta.h:61
nta_outgoing_prack
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:11454
nta_check_required
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:70
nta_incoming_getresponse
msg_t * nta_incoming_getresponse(nta_incoming_t *irq)
Get response message.
Definition nta.c:5813
nta_leg_magic_t
NTA_LEG_MAGIC_T nta_leg_magic_t
Application context for NTA call legs.
Definition nta.h:91
nta_outgoing_bind
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:7482
nta_incoming_magic
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:5877
nta_incoming_default
nta_incoming_t * nta_incoming_default(nta_agent_t *agent)
Create a default server transaction.
Definition nta.c:5163
nta_check_method
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:167
nta_check_session_expires
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:410
nta_leg_bind
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:4397
nta_agent_get_params
int nta_agent_get_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Get NTA Parameters.
Definition nta.c:1764
nta_msg_create
msg_t * nta_msg_create(nta_agent_t *self, int flags)
Create a new message belonging to the agent.
Definition nta.c:3328
nta_outgoing_setrseq
int nta_outgoing_setrseq(nta_outgoing_t *orq, uint32_t rseq)
Set RSeq value stored with client transaction.
Definition nta.c:11609
nta_message_f
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
nta_outgoing_getresponse
msg_t * nta_outgoing_getresponse(nta_outgoing_t *orq)
Get reference to response message.
Definition nta.c:7606
nta_msg_is_internal
int nta_msg_is_internal(msg_t const *msg)
Check if the message is internally generated by NTA.
Definition nta.c:3379
nta_leg_get_route
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:4560
nta_outgoing_getrequest
msg_t * nta_outgoing_getrequest(nta_outgoing_t *orq)
Get request message.
Definition nta.c:7623
nta_tport_keepalive
int nta_tport_keepalive(nta_outgoing_t *orq)
Initiate STUN keepalive controller to TPORT.
Definition nta.c:11801
nta_leg_by_uri
nta_leg_t * nta_leg_by_uri(nta_agent_t const *, url_string_t const *)
Get leg by destination.
Definition nta.c:4929
nta_incoming_set_params
int nta_incoming_set_params(nta_incoming_t *irq, tag_type_t tag, tag_value_t value,...)
Set server transaction parameters.
Definition nta.c:6228
nta_incoming_status
int nta_incoming_status(nta_incoming_t const *irq)
Get status code of a server transaction.
Definition nta.c:5862
nta_check_session_content
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:244
nta_agent_create
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:855
nta_leg_by_replaces
nta_leg_t * nta_leg_by_replaces(nta_agent_t *, sip_replaces_t const *)
Get dialog leg by Replaces header.
Definition nta.c:4605
nta_outgoing_cancel
int nta_outgoing_cancel(nta_outgoing_t *)
Cancel the request.
Definition nta.c:7347
nta_outgoing_delay
unsigned nta_outgoing_delay(nta_outgoing_t const *orq)
Get the RTT delay measured using Timestamp header.
Definition nta.c:7581
nta_agent_via
sip_via_t * nta_agent_via(nta_agent_t const *a)
Return a list of Via headers.
Definition nta.c:1123
nta_leg_server_route
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:4552
nta_agent_close_tports
int nta_agent_close_tports(nta_agent_t *agent)
Close all transports.
Definition nta.c:11814
nta_incoming_cseq
uint32_t nta_incoming_cseq(nta_incoming_t const *irq)
Get sequence number of a server transaction.
Definition nta.c:5848
nta_incoming_getrequest_ackcancel
msg_t * nta_incoming_getrequest_ackcancel(nta_incoming_t *irq)
Get ACK or CANCEL message.
Definition nta.c:5792
nta_outgoing_mcreate
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:7318
nta_leg_rtag
char const * nta_leg_rtag(nta_leg_t *leg, char const *tag)
Add remote tag.
Definition nta.c:4471
nta_outgoing_tcancel
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:7379
nta_outgoing_tagged
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:11341
nta_reliable_destroy
void nta_reliable_destroy(nta_reliable_t *)
Destroy a reliable response.
Definition nta.c:11241
nta_outgoing_cseq
uint32_t nta_outgoing_cseq(nta_outgoing_t const *orq)
Get sequence number of a client transaction.
Definition nta.c:7565
NTA_OUTGOING_MAGIC_T
#define NTA_OUTGOING_MAGIC_T
Default type of application context for outgoing NTA requests.
Definition nta.h:79
nta_agent_t
struct nta_agent_s nta_agent_t
NTA agent.
Definition nta.h:55
nta_check_supported
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:124
nta_incoming_getrequest
msg_t * nta_incoming_getrequest(nta_incoming_t *irq)
Get request message.
Definition nta.c:5771
nta_reliable_treply
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:10831
nta_outgoing_request_uri
url_t const * nta_outgoing_request_uri(nta_outgoing_t const *orq)
Return the request URI.
Definition nta.c:7540
nta_outgoing_default
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:7155
nta_outgoing_route_uri
url_t const * nta_outgoing_route_uri(nta_outgoing_t const *orq)
Return the URI used to route the request.
Definition nta.c:7546
nta_check_accept
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:321
nta_leg_tcreate
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:4089
nta_leg_get_rtag
char const * nta_leg_get_rtag(nta_leg_t const *leg)
Get remote tag.
Definition nta.c:4486
nta_leg_get_seq
uint32_t nta_leg_get_seq(nta_leg_t const *leg)
Get local request sequence number.
Definition nta.c:4495
nta_leg_get_tag
char const * nta_leg_get_tag(nta_leg_t const *leg)
Get local tag.
Definition nta.c:4453
nta_leg_client_reroute
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:4536
nta_incoming_gettag
char const * nta_incoming_gettag(nta_incoming_t const *irq)
Get local tag for incoming request.
Definition nta.c:5854
nta_agent_add_tport
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:2135
nta_agent_newtag
char const * nta_agent_newtag(su_home_t *, char const *fmt, nta_agent_t *)
Calculate a new unique tag.
Definition nta.c:1931
nta_incoming_url
url_t const * nta_incoming_url(nta_incoming_t const *irq)
Get Request-URI of a server transaction.
Definition nta.c:5841
nta_response_f
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:366
nta_outgoing_t
struct nta_outgoing_s nta_outgoing_t
NTA outgoing request.
Definition nta.h:59
NTA_RELIABLE_MAGIC_T
#define NTA_RELIABLE_MAGIC_T
Default type of application context for reliable preliminary responses.
Definition nta.h:464
nta_incoming_bind
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:5716
nta_agent_set_params
int nta_agent_set_params(nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
Set NTA Parameters.
Definition nta.c:1434
nta_incoming_received
sip_time_t nta_incoming_received(nta_incoming_t *irq, su_nanotime_t *nano)
When received.
Definition nta.c:5890
nta_ack_cancel_f
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:276
nta_agent_contact
sip_contact_t * nta_agent_contact(nta_agent_t const *a)
Return Contact header.
Definition nta.c:1110
nta_agent_version
char const * nta_agent_version(nta_agent_t const *a)
Return User-Agent header.
Definition nta.c:1180
nta_default_leg
nta_leg_t * nta_default_leg(nta_agent_t const *agent)
Return the default leg, if any.
Definition nta.c:4304
nta_outgoing_rseq
uint32_t nta_outgoing_rseq(nta_outgoing_t const *orq)
Get RSeq value stored with client transaction.
Definition nta.c:11599
nta_incoming_complete_response
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:6357
NTA_INCOMING_MAGIC_T
#define NTA_INCOMING_MAGIC_T
Default type of application context for incoming NTA requests.
Definition nta.h:85
nta_msg_request_complete
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:3835
nta_leg_client_route
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:4515
nta_outgoing_branch
char const * nta_outgoing_branch(nta_outgoing_t const *orq)
Get the branch parameter.
Definition nta.c:7587
NTA_LEG_MAGIC_T
#define NTA_LEG_MAGIC_T
Default type of application context for NTA call legs.
Definition nta.h:73
nta_incoming_find
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:5905
nta_outgoing_method
sip_method_t nta_outgoing_method(nta_outgoing_t const *orq)
Return method of the client transaction.
Definition nta.c:7552
nta_incoming_mreply
int nta_incoming_mreply(nta_incoming_t *irq, msg_t *msg)
Return a response message to client.
Definition nta.c:6498
nta_incoming_method
sip_method_t nta_incoming_method(nta_incoming_t const *irq)
Get method of a server transaction.
Definition nta.c:5824
nta_msg_discard
void nta_msg_discard(nta_agent_t *agent, msg_t *msg)
Discard a message.
Definition nta.c:3365
nta_msg_complete
int nta_msg_complete(msg_t *msg)
Complete a message.
Definition nta.c:3359
nta_leg_by_call_id
nta_leg_t * nta_leg_by_call_id(nta_agent_t *sa, const char *call_id)
Get dialog leg by CallID.
Definition nta.c:4664
NTA_SIP_T1
@ NTA_SIP_T1
SIP T1, 500 milliseconds.
Definition nta.h:109
NTA_SIP_T4
@ NTA_SIP_T4
SIP T4, 5 seconds.
Definition nta.h:111
NTA_SIP_T2
@ NTA_SIP_T2
SIP T2, 4 seconds.
Definition nta.h:110
NTA_TIME_MAX
@ NTA_TIME_MAX
Maximum value for timers.
Definition nta.h:112
nta_leg_destroy
void nta_leg_destroy(nta_leg_t *leg)
Destroy a leg.
Definition nta.c:4341
nta_outgoing_magic_t
NTA_OUTGOING_MAGIC_T nta_outgoing_magic_t
Application context for outgoing NTA requests.
Definition nta.h:93
nta_incoming_create
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:5217
nta_outgoing_destroy
void nta_outgoing_destroy(nta_outgoing_t *)
Destroy a request object.
Definition nta.c:7525
nta_tag.h
NTA tags.
sip.h
sip_t
struct sip_s sip_t
sip_time_t
msg_time_t sip_time_t
sip_method_t
sip_method_t
url_t
su_home_t
SU_HOME_T su_home_t
SOFIAPUBFUN
#define SOFIAPUBFUN
SOFIAPUBVAR
#define SOFIAPUBVAR
tag_value_t
intptr_t tag_value_t
tag_type_t
struct tag_type_s const * tag_type_t
su_nanotime_t
su_time64_t su_nanotime_t
uint32_t
SU_U32_T uint32_t
su_wait.h
su_root_t
struct su_root_t su_root_t
url_string_t

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