libeXosip2 3.6.0

eXosip2 configuration API

General purpose API.


int eXosip_init (void)
void eXosip_quit (void)
int eXosip_execute (void)
int eXosip_set_option (int opt, const void *value)
int eXosip_lock (void)
int eXosip_unlock (void)
struct osip_naptr * eXosip_dnsutils_naptr (const char *domain, const char *protocol, const char *transport, int keep_in_cache)
int eXosip_dnsutils_dns_process (struct osip_naptr *output_record, int force)
int eXosip_dnsutils_rotate_srv (struct osip_srv_record *output_record)
int eXosip_listen_addr (int transport, const char *addr, int port, int family, int secure)
int eXosip_set_socket (int transport, int socket, int port)
void eXosip_set_user_agent (const char *user_agent)
const char * eXosip_get_version (void)
int eXosip_set_cbsip_message (CbSipCallback cbsipCallback)
void eXosip_enable_ipv6 (int ipv6_enable)
void eXosip_masquerade_contact (const char *public_address, int port)
int eXosip_find_free_port (int free_port, int transport)

Function Documentation

int eXosip_init ( void  )

Initiate the eXtented oSIP library.

void eXosip_quit ( void  )

Release ressource used by the eXtented oSIP library.

int eXosip_execute ( void  )

Process (non-threaded mode ONLY) eXosip events.

int eXosip_set_option ( int  opt,
const void *  value 

Set eXosip options. See eXosip_option for available options.

optoption to configure.
valuevalue for options.
int eXosip_lock ( void  )

Lock the eXtented oSIP library.

int eXosip_unlock ( void  )

UnLock the eXtented oSIP library.

struct osip_naptr* eXosip_dnsutils_naptr ( const char *  domain,
const char *  protocol,
const char *  transport,
int  keep_in_cache 
) [read]

Start and return osip_naptr context. Note that DNS results might not yet be available.

domaindomain name for NAPTR record
protocolprotocol to use ("SIP")
transporttransport to use ("UDP")
keep_in_cachekeep result in cache if >0
int eXosip_dnsutils_dns_process ( struct osip_naptr *  output_record,
int  force 

Continue to process asynchronous DNS request (if implemented).

output_recordresult structure.
forceforce waiting for final answer if >0
int eXosip_dnsutils_rotate_srv ( struct osip_srv_record *  output_record)

Rotate first SRV entry to last SRV entry.

output_recordresult structure.
int eXosip_listen_addr ( int  transport,
const char *  addr,
int  port,
int  family,
int  secure 

Listen on a specified socket.

transportIPPROTO_UDP for udp. (soon to come: TCP/TLS?)
addrthe address to bind (NULL for all interface)
portthe listening port. (0 for random port)
familythe IP family (AF_INET or AF_INET6).
secure0 for UDP or TCP, 1 for TLS (with TCP).
int eXosip_set_socket ( int  transport,
int  socket,
int  port 

Listen on a specified socket.

transportIPPROTO_UDP for udp. (soon to come: TCP/TLS?)
socketsocket to use for listening to UDP sip messages.
portthe listening port for masquerading.
void eXosip_set_user_agent ( const char *  user_agent)

Set the SIP User-Agent: header string.

user_agentthe User-Agent header to insert in messages.
const char* eXosip_get_version ( void  )

Get the eXosip version as a sring

int eXosip_set_cbsip_message ( CbSipCallback  cbsipCallback)

Set a callback to get sent and received SIP messages.

cbsipCallbackthe callback to retreive messages.
void eXosip_enable_ipv6 ( int  ipv6_enable)

Use IPv6 instead of IPv4.

ipv6_enableThis paramter should be set to 1 to enable IPv6 mode.
void eXosip_masquerade_contact ( const char *  public_address,
int  port 

This method is used to replace contact address with the public address of your NAT. The ip address should be retreived manually (fixed IP address) or with STUN. This address will only be used when the remote correspondant appears to be on an DIFFERENT LAN.

public_addressthe ip address.
portthe port for masquerading.

If set to NULL, then the local ip address will be guessed automatically (returns to default mode).

int eXosip_find_free_port ( int  free_port,
int  transport 

This method is used to find out an free IPPROTO_UDP or IPPROTO_TCP port.

free_portinitial port for search.
transportIPPROTO_UDP or IPPROTO_TCP protocol.