sofia-sip/nta.h File Reference


Detailed Description

Nokia Transaction API for SIP.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Tue Jul 18 09:18:32 2000 ppessi

#include <sofia-sip/su_wait.h>
#include <sofia-sip/sip.h>
#include <sofia-sip/nta_tag.h>

Include dependency graph for nta.h:

Go to the source code of this file.

Defines

#define NTA_AGENT_MAGIC_T
 Default type of application context for NTA agents.
#define NTA_LEG_MAGIC_T
 Default type of application context for NTA call legs.
#define NTA_OUTGOING_MAGIC_T
 Default type of application context for outgoing NTA requests.
#define NTA_INCOMING_MAGIC_T
 Default type of application context for incoming NTA requests.
#define NTA_VERSION
 NTA API version number.
#define NTA_RELIABLE_MAGIC_T
 Default type of application context for reliable preliminary responses.

Typedefs

typedef nta_agent_s nta_agent_t
 NTA agent.
typedef nta_leg_s nta_leg_t
 NTA call leg.
typedef nta_outgoing_s nta_outgoing_t
 NTA outgoing request.
typedef nta_incoming_s nta_incoming_t
 NTA incoming request.
typedef NTA_AGENT_MAGIC_T nta_agent_magic_t
 Application context for NTA agents.
typedef NTA_LEG_MAGIC_T nta_leg_magic_t
 Application context for NTA call legs.
typedef NTA_OUTGOING_MAGIC_T nta_outgoing_magic_t
 Application context for outgoing NTA requests.
typedef NTA_INCOMING_MAGIC_T nta_incoming_magic_t
 Application context for incoming NTA requests.
typedef int nta_message_f (nta_agent_magic_t *context, nta_agent_t *agent, msg_t *msg, sip_t *sip)
 Callback for incoming messages.
typedef 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.
typedef 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.
typedef int nta_response_f (nta_outgoing_magic_t *magic, nta_outgoing_t *request, sip_t const *sip)
 Callback for replies to outgoing requests.
typedef nta_reliable_s nta_reliable_t
 NTA reliable response.
typedef NTA_RELIABLE_MAGIC_T nta_reliable_magic_t
 Application context for reliable preliminary responses.

Enumerations

enum  {
  NTA_SIP_T1,
  NTA_SIP_T2,
  NTA_SIP_T4,
  NTA_TIME_MAX
}

Functions

nta_agent_tnta_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.
void nta_agent_destroy (nta_agent_t *agent)
 Destroy an NTA agent object.
char const * nta_agent_version (nta_agent_t const *a)
 Return User-Agent header.
nta_agent_magic_tnta_agent_magic (nta_agent_t const *a)
 Return agent context.
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.
int nta_agent_close_tports (nta_agent_t *agent)
 Close all transports.
sip_contact_tnta_agent_contact (nta_agent_t const *a)
 Return Contact header.
sip_via_tnta_agent_via (nta_agent_t const *a)
 Return a list of Via headers.
sip_via_tnta_agent_public_via (nta_agent_t const *a)
 Return a list of public (UPnP, STUN) Via headers.
char const * nta_agent_newtag (su_home_t *, char const *fmt, nta_agent_t *)
 Calculate a new unique tag.
int nta_agent_set_params (nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
 Set NTA Parameters.
int nta_agent_get_params (nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
 Get NTA Parameters.
int nta_agent_get_stats (nta_agent_t *agent, tag_type_t tag, tag_value_t value,...)
 Get NTA statistics.
msg_tnta_msg_create (nta_agent_t *self, int flags)
 Create a new message belonging to the agent.
int nta_msg_complete (msg_t *msg)
 Complete a message.
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.
int nta_msg_is_internal (msg_t const *msg)
 Check if the message is internally generated by NTA.
int nta_sip_is_internal (sip_t const *sip)
 Check if the headers are from response generated locally by NTA.
nta_leg_tnta_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.
void nta_leg_destroy (nta_leg_t *leg)
 Destroy a leg.
nta_leg_tnta_default_leg (nta_agent_t const *agent)
 Return the default leg, if any.
nta_leg_magic_tnta_leg_magic (nta_leg_t const *leg, nta_request_f *callback)
 Return application context for the leg.
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.
char const * nta_leg_tag (nta_leg_t *leg, char const *tag)
 Add local tag.
char const * nta_leg_get_tag (nta_leg_t const *leg)
 Get local tag.
char const * nta_leg_rtag (nta_leg_t *leg, char const *tag)
 Add remote tag.
char const * nta_leg_get_rtag (nta_leg_t const *leg)
 Get remote tag.
uint32_t nta_leg_get_seq (nta_leg_t const *leg)
 Get local request sequence number.
uint32_t nta_leg_get_rseq (nta_leg_t const *leg)
 Get remote request sequence number.
int nta_leg_client_route (nta_leg_t *leg, sip_record_route_t const *route, sip_contact_t const *contact)
 Set UAC route.
int nta_leg_server_route (nta_leg_t *leg, sip_record_route_t const *route, sip_contact_t const *contact)
 Set UAS route.
int nta_leg_get_route (nta_leg_t *leg, sip_route_t const **return_route, sip_contact_t const **return_target)
 Get route.
nta_leg_tnta_leg_by_uri (nta_agent_t const *, url_string_t const *)
 Get leg by destination.
nta_leg_tnta_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.
sip_replaces_tnta_leg_make_replaces (nta_leg_t *leg, su_home_t *home, int early_only)
 Generate Replaces header.
nta_leg_tnta_leg_by_replaces (nta_agent_t *, sip_replaces_t const *)
 Get dialog leg by Replaces header.
nta_leg_tnta_leg_by_call_id (nta_agent_t *sa, const char *call_id)
 Get dialog leg by CallID.
nta_incoming_tnta_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.
nta_incoming_tnta_incoming_default (nta_agent_t *agent)
 Create a default server transaction.
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.
nta_incoming_magic_tnta_incoming_magic (nta_incoming_t *irq, nta_ack_cancel_f *callback)
 Get context pointer for an incoming transaction.
nta_incoming_tnta_incoming_find (nta_agent_t const *agent, sip_t const *sip, sip_via_t const *v)
 Find incoming transaction.
char const * nta_incoming_tag (nta_incoming_t *irq, char const *tag)
 Add a To tag to incoming request if needed.
char const * nta_incoming_gettag (nta_incoming_t const *irq)
 Get local tag for incoming request.
int nta_incoming_status (nta_incoming_t const *irq)
 Get status code of a server transaction.
sip_method_t nta_incoming_method (nta_incoming_t const *irq)
 Get method of a server transaction.
char const * nta_incoming_method_name (nta_incoming_t const *irq)
 Get method name of a server transaction.
url_t const * nta_incoming_url (nta_incoming_t const *irq)
 Get Request-URI of a server transaction.
uint32_t nta_incoming_cseq (nta_incoming_t const *irq)
 Get sequence number of a server transaction.
sip_time_t nta_incoming_received (nta_incoming_t *irq, su_nanotime_t *nano)
 When received.
int nta_incoming_set_params (nta_incoming_t *irq, tag_type_t tag, tag_value_t value,...)
 Set server transaction parameters.
msg_tnta_incoming_getrequest (nta_incoming_t *irq)
 Get request message.
msg_tnta_incoming_getrequest_ackcancel (nta_incoming_t *irq)
 Get ACK or CANCEL message.
msg_tnta_incoming_getresponse (nta_incoming_t *irq)
 Get response message.
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.
msg_tnta_incoming_create_response (nta_incoming_t *irq, int status, char const *phrase)
 Create a response message for request.
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.
int nta_incoming_mreply (nta_incoming_t *irq, msg_t *msg)
 Return a response message to client.
void nta_incoming_destroy (nta_incoming_t *irq)
 Destroy an incoming transaction.
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.
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.
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.
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.
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.
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.
nta_outgoing_tnta_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.
nta_outgoing_tnta_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.
nta_outgoing_tnta_outgoing_default (nta_agent_t *agent, nta_response_f *callback, nta_outgoing_magic_t *magic)
 Create a default outgoing transaction.
int nta_outgoing_bind (nta_outgoing_t *orq, nta_response_f *callback, nta_outgoing_magic_t *magic)
 Bind callback and application context to an client transaction.
int nta_outgoing_status (nta_outgoing_t const *orq)
 Get the status code of a client transaction.
sip_method_t nta_outgoing_method (nta_outgoing_t const *orq)
 Return method of the client transaction.
char const * nta_outgoing_method_name (nta_outgoing_t const *orq)
 Return method name of the client transaction.
uint32_t nta_outgoing_cseq (nta_outgoing_t const *orq)
 Get sequence number of a client transaction.
char const * nta_outgoing_branch (nta_outgoing_t const *orq)
 Get the branch parameter.
unsigned nta_outgoing_delay (nta_outgoing_t const *orq)
 Get the RTT delay measured using Timestamp header.
url_t const * nta_outgoing_request_uri (nta_outgoing_t const *orq)
 Return the request URI.
url_t const * nta_outgoing_route_uri (nta_outgoing_t const *orq)
 Return the URI used to route the request.
msg_tnta_outgoing_getresponse (nta_outgoing_t *orq)
 Get reference to response message.
msg_tnta_outgoing_getrequest (nta_outgoing_t *orq)
 Get request message.
nta_outgoing_tnta_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.
int nta_outgoing_cancel (nta_outgoing_t *)
 Cancel the request.
nta_outgoing_tnta_outgoing_tcancel (nta_outgoing_t *orq, nta_response_f *callback, nta_outgoing_magic_t *magic, tag_type_t, tag_value_t,...)
 Cancel the request.
void nta_outgoing_destroy (nta_outgoing_t *)
 Destroy a request object.
nta_outgoing_tnta_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.
int nta_tport_keepalive (nta_outgoing_t *orq)
 Initiate STUN keepalive controller to TPORT.
nta_outgoing_tnta_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.
uint32_t nta_outgoing_rseq (nta_outgoing_t const *orq)
 Get RSeq value stored with client transaction.
int nta_outgoing_setrseq (nta_outgoing_t *orq, uint32_t rseq)
 Set RSeq value stored with client transaction.
nta_reliable_tnta_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.
nta_reliable_tnta_reliable_mreply (nta_incoming_t *irq, nta_prack_f *callback, nta_reliable_magic_t *rmagic, msg_t *msg)
 Respond reliably with msg.
void nta_reliable_destroy (nta_reliable_t *)
 Destroy a reliable response.
void nta_msg_discard (nta_agent_t *agent, msg_t *msg)
 Discard a message.
int nta_is_internal_msg (msg_t const *msg)
 Check if the message is internally generated by NTA.

Variables

char const nta_version []
 NTA module version.


Define Documentation

#define NTA_AGENT_MAGIC_T
 

Default type of application context for NTA agents.

Application may define this to appropriate type before including <sofia-sip/nta.h>.

#define NTA_INCOMING_MAGIC_T
 

Default type of application context for incoming NTA requests.

Application may define this to appropriate type before including <sofia-sip/nta.h>.

#define NTA_LEG_MAGIC_T
 

Default type of application context for NTA call legs.

Application may define this to appropriate type before including <sofia-sip/nta.h>.

#define NTA_OUTGOING_MAGIC_T
 

Default type of application context for outgoing NTA requests.

Application may define this to appropriate type before including <sofia-sip/nta.h>.

#define NTA_RELIABLE_MAGIC_T
 

Default type of application context for reliable preliminary responses.

Application may define this to appropriate type before including <sofia-sip/nta.h>.


Typedef Documentation

nta_ack_cancel_f
 

Callback function prototype for CANCELed/ACKed requests.

This is a callback function is invoked by NTA when an incoming request has been cancelled or an response to an incoming INVITE request has been acknowledged.

Parameters:
magic incoming request context
ireq incoming request
sip ACK/CANCEL message
Return values:
0 This callback function should return always 0.

int nta_message_f
 

Callback for incoming messages.

The typedef nta_message_f() defines prototype for the callback functions invoked by NTA when it has received an incoming message that will be processed statelessly.

The application can either discard the message by calling nta_msg_discard(), forward it by calling nta_msg_tsend() or reply to the message by calling nta_msg_treply(). When application wants to process a request statefully, it passes the message to a leg with the function nta_leg_stateful(). A new leg can be created by calling the function nta_leg_tcreate().

Prototype
 int message_callback(nta_agent_magic_t *context,
                      nta_agent_t *agent,
                      msg_t *msg,
                      sip_t *sip);
Parameters:
context agent context
agent agent handle
msg received message
sip contents of message
Returns:
This callback function should always return 0.

nta_request_f
 

Callback for incoming requests.

This is a callback function invoked by NTA for each incoming SIP request.

Parameters:
lmagic call leg context
leg call leg handle
ireq incoming request
sip incoming request contents
Return values:
100..699 NTA constructs a reply message with given error code and corresponding standard phrase, then sends the reply.
0 The application takes care of sending (or not sending) the reply.
other All other return values will be interpreted as 500 Internal server error.

nta_response_f
 

Callback for replies to outgoing requests.

This is a callback function invoked by NTA when it has received a new reply to an outgoing request.

Parameters:
magic request context
request request handle
sip received status message
Returns:
This callback function should return always 0.


Enumeration Type Documentation

anonymous enum
 

Enumerator:
NTA_SIP_T1  SIP T1, 500 milliseconds.
NTA_SIP_T2  SIP T2, 4 seconds.
NTA_SIP_T4  SIP T4, 5 seconds.
NTA_TIME_MAX  Maximum value for timers.


Function Documentation

int nta_agent_add_tport nta_agent_t self,
url_string_t const *  uri,
tag_type_t  tag,
tag_value_t  value,
  ...
 

Add a transport to the agent.

Creates a new transport and binds it to the port specified by the uri. The uri must have sip: or sips: scheme or be a wildcard uri ("*"). The uri syntax allowed is as follows:

 url <scheme>:<host>[:<port>]<url-params> 
where <url-params> may be
 ;transport=<xxx>
 ;maddr=<actual addr>
 ;comp=sigcomp

The scheme part determines which transports are used. "sip" implies UDP and TCP, "sips" TLS over TCP. In the future, more transports can be supported, for instance, "sip" can use SCTP or DCCP, "sips" DTLS or TLS over SCTP.

The "host" part determines what address/domain name is used in Contact. An "*" in "host" part is shorthand for any local IP address. 0.0.0.0 means that the only the IPv4 addresses are used. [::] means that only the IPv6 addresses are used. If a domain name or a specific IP address is given as "host" part, an additional "maddr" parameter can be used to control which addresses are used by the stack when binding listen sockets for incoming requests.

The "port" determines what port is used in contact, and to which port the stack binds in order to listen for incoming requests. Empty or missing port means that default port should be used (5060 for sip, 5061 for sips). An "*" in "port" part means any port, i.e., the stack binds to an ephemeral port.

The "transport" parameter determines the transport protocol that is used and how they are preferred. If no protocol is specified, both UDP and TCP are used for SIP URL and TLS for SIPS URL. The preference can be indicated with a comma-separated list of transports, for instance, parameter

 transport=tcp,udp @endocde indicates that TCP is
 preferred to UDP.

 The "maddr" parameter determines to which address the stack binds in
 order to listen for incoming requests. An "*" in "maddr" parameter is
 shorthand for any local IP address. 0.0.0.0 means that only IPv4 sockets
 are created. [::] means that only IPv6 sockets are created.

 The "comp" parameter determines the supported compression protocol.
 Currently only sigcomp is supported (with suitable library.

 @par Examples:
 @code sip:172.21.40.24;maddr=* 

 sip:172.21.40.24:50600;transport=TCP,UDP;comp=sigcomp 

 sips:* 

Returns:
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

int nta_agent_close_tports nta_agent_t agent  ) 
 

Close all transports.

Since:
Experimental in 1.12.2.

sip_contact_t* nta_agent_contact nta_agent_t const *  agent  ) 
 

Return Contact header.

Get a Contact header, which can be used to reach agent.

Parameters:
agent NTA agent object
User agents can insert the Contact header in the outgoing REGISTER, INVITE, and ACK requests and replies to incoming INVITE and OPTIONS transactions.

Proxies can use the Contact header to create appropriate Record-Route headers:

 r_r = sip_record_route_create(msg_home(msg),
                                 sip->sip_request->rq_url,
                                 contact->m_url);

Returns:
A sip_contact_t object corresponding to the agent.

nta_agent_t* nta_agent_create su_root_t root,
url_string_t const *  contact_url,
nta_message_f callback,
nta_agent_magic_t magic,
tag_type_t  tag,
tag_value_t  value,
  ...
 

Create an NTA agent object.

Create an NTA agent object. The agent object creates and binds a server socket with address specified in url. If the host portion of the url is "*", the agent listens to all addresses available on the host.

When a message is received, the agent object parses it. If the result is a valid SIP message, the agent object passes the message to the application by invoking the nta_message_f callback function.

Note:
The url can be either parsed url (of type url_t ()), or a valid SIP URL as a string.

If url is NULL, the default url "sip:*" is used.

If url is NONE (iow, (void*)-1), no server sockets are bound.
If transport parameters are specified in url, agent uses only specified transport type.
If an maddr parameter is specified in url, agent binds to the specified address, but uses host part of url when it generates Contact and Via headers. The maddr parameter is also included, unless it equals to INADDR_ANY (0.0.0.0 or [::]).
Parameters:
root pointer to a su_root_t used for synchronization
contact_url URL that agent uses to bind the server sockets
callback pointer to callback function
magic pointer to user data
tag,value,... tagged arguments
Related Tags:
NTATAG_ALIASES(), NTATAG_BAD_REQ_MASK(), NTATAG_BAD_RESP_MASK(), NTATAG_BLACKLIST(), NTATAG_CANCEL_2543(), NTATAG_CANCEL_487(), NTATAG_CLIENT_RPORT(), NTATAG_DEBUG_DROP_PROB(), NTATAG_DEFAULT_PROXY(), NTATAG_EXTRA_100(), NTATAG_GRAYLIST(), NTATAG_MAXSIZE(), NTATAG_MAX_FORWARDS(), NTATAG_MERGE_482(), NTATAG_MCLASS() NTATAG_PASS_100(), NTATAG_PASS_408(), NTATAG_PRELOAD(), NTATAG_PROGRESS(), NTATAG_REL100(), NTATAG_SERVER_RPORT(), NTATAG_SIPFLAGS(), NTATAG_SIP_T1X64(), NTATAG_SIP_T1(), NTATAG_SIP_T2(), NTATAG_SIP_T4(), NTATAG_STATELESS(), NTATAG_TAG_3261(), NTATAG_TCP_RPORT(), NTATAG_TIMEOUT_408(), NTATAG_TIMER_C(), NTATAG_MAX_PROCEEDING(), NTATAG_UA(), NTATAG_UDP_MTU(), NTATAG_USER_VIA(), NTATAG_USE_NAPTR(), NTATAG_USE_SRV() and NTATAG_USE_TIMESTAMP().
Note:
The value from following tags are stored, but they currently do nothing: NTATAG_SIGCOMP_ALGORITHM(), NTATAG_SIGCOMP_OPTIONS(), NTATAG_SMIME()

It is possible to provide (url_string_t*)-1 as contact_url. In that case, no server sockets are bound.

Return values:
handle to the agent when successful,
NULL upon an error.
See also:
NUTAG_

void nta_agent_destroy nta_agent_t agent  ) 
 

Destroy an NTA agent object.

Parameters:
agent the NTA agent object to be destroyed.

int nta_agent_get_params nta_agent_t agent,
tag_type_t  tag,
tag_value_t  value,
  ...
 

Get NTA Parameters.

The nta_agent_get_params() function retrieves the stack parameters. The parameters determine the way NTA handles the retransmissions, how long NTA keeps transactions alive, does NTA apply proxy or user-agent logic to INVITE transactions, or how the Via headers are generated.

Related Tags:
NTATAG_ALIASES_REF(), NTATAG_BLACKLIST_REF(), NTATAG_CANCEL_2543_REF(), NTATAG_CANCEL_487_REF(), NTATAG_CLIENT_RPORT_REF(), NTATAG_CONTACT_REF(), NTATAG_DEBUG_DROP_PROB_REF(), NTATAG_DEFAULT_PROXY_REF(), NTATAG_EXTRA_100_REF(), NTATAG_GRAYLIST_REF(), NTATAG_MAXSIZE_REF(), NTATAG_MAX_FORWARDS_REF(), NTATAG_MCLASS_REF(), NTATAG_MERGE_482_REF(), NTATAG_MAX_PROCEEDING_REF(), NTATAG_PASS_100_REF(), NTATAG_PASS_408_REF(), NTATAG_PRELOAD_REF(), NTATAG_PROGRESS_REF(), NTATAG_REL100_REF(), NTATAG_SERVER_RPORT_REF(), NTATAG_SIGCOMP_ALGORITHM_REF(), NTATAG_SIGCOMP_OPTIONS_REF(), NTATAG_SIPFLAGS_REF(), NTATAG_SIP_T1_REF(), NTATAG_SIP_T1X64_REF(), NTATAG_SIP_T2_REF(), NTATAG_SIP_T4_REF(), NTATAG_SMIME_REF(), NTATAG_STATELESS_REF(), NTATAG_TAG_3261_REF(), NTATAG_TIMEOUT_408_REF(), NTATAG_TIMER_C_REF(), NTATAG_UA_REF(), NTATAG_UDP_MTU_REF(), NTATAG_USER_VIA_REF(), NTATAG_USE_NAPTR_REF(), NTATAG_USE_SRV_REF(), and NTATAG_USE_TIMESTAMP_REF().

int nta_agent_get_stats nta_agent_t agent,
tag_type_t  tag,
tag_value_t  value,
  ...
 

Get NTA statistics.

The nta_agent_get_stats() function retrieves the stack statistics.

Related Tags:
NTATAG_S_ACKED_TR_REF(), NTATAG_S_BAD_MESSAGE_REF(), NTATAG_S_BAD_REQUEST_REF(), NTATAG_S_BAD_RESPONSE_REF(), NTATAG_S_CANCELED_TR_REF(), NTATAG_S_CLIENT_TR_REF(), NTATAG_S_DIALOG_TR_REF(), NTATAG_S_DROP_REQUEST_REF(), NTATAG_S_DROP_RESPONSE_REF(), NTATAG_S_IRQ_HASH_REF(), NTATAG_S_IRQ_HASH_USED_REF(), NTATAG_S_LEG_HASH_REF(), NTATAG_S_LEG_HASH_USED_REF(), NTATAG_S_MERGED_REQUEST_REF(), NTATAG_S_ORQ_HASH_REF(), NTATAG_S_ORQ_HASH_USED_REF(), NTATAG_S_RECV_MSG_REF(), NTATAG_S_RECV_REQUEST_REF(), NTATAG_S_RECV_RESPONSE_REF(), NTATAG_S_RECV_RETRY_REF(), NTATAG_S_RETRY_REQUEST_REF(), NTATAG_S_RETRY_RESPONSE_REF(), NTATAG_S_SENT_MSG_REF(), NTATAG_S_SENT_REQUEST_REF(), NTATAG_S_SENT_RESPONSE_REF(), NTATAG_S_SERVER_TR_REF(), NTATAG_S_TOUT_REQUEST_REF(), NTATAG_S_TOUT_RESPONSE_REF(), NTATAG_S_TRLESS_200_REF(), NTATAG_S_TRLESS_REQUEST_REF(), NTATAG_S_TRLESS_RESPONSE_REF(), and NTATAG_S_TRLESS_TO_TR_REF(),

char const* nta_agent_newtag su_home_t home,
char const *  fmt,
nta_agent_t sa
 

Calculate a new unique tag.

This function generates a series of 2**64 unique tags for From or To headers. The start of the tag series is derived from the NTP time the NTA agent was initialized.

sip_via_t* nta_agent_public_via nta_agent_t const *  agent  ) 
 

Return a list of public (UPnP, STUN) Via headers.

Get public Via headers for all activated transports.

Parameters:
agent NTA agent object
Returns:
A list of sip_via_t objects used by the agent.

int nta_agent_set_params nta_agent_t agent,
tag_type_t  tag,
tag_value_t  value,
  ...
 

Set NTA Parameters.

The nta_agent_set_params() function sets the stack parameters. T