Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ex_setup.h(3) [debian man page]

eX_setup.h(3)							    libeXosip2							     eX_setup.h(3)

NAME
eX_setup.h - eXosip setup API SYNOPSIS
#include <eXosip2/eXosip.h> #include <osipparser2/osip_message.h> #include <time.h> Functions 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) int eXosip_transport_set (osip_message_t *msg, const char *transport) int eXosip_guess_localip (int family, char *address, int size) Detailed Description eXosip setup API This file provide the API needed to setup and configure the SIP endpoint. Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 eX_setup.h(3)

Check Out this Related Man Page

How-To initialize libeXosip2.(3)				    libeXosip2					  How-To initialize libeXosip2.(3)

NAME
How-To initialize libeXosip2. - When using eXosip, your first task is to initialize both eXosip context and libosip library (parser and state machines). This must be done prior to any use of libeXosip2. #include <eXosip2/eXosip.h> int i; TRACE_INITIALIZE (6, stdout); i=eXosip_init(); if (i!=0) return -1; i = eXosip_listen_addr (IPPROTO_UDP, NULL, port, AF_INET, 0); if (i!=0) { eXosip_quit(); fprintf (stderr, 'could not initialize transport layer '); return -1; } ... then you have to send messages and wait for eXosip events... In the previous code, you've learned how to: o Initialize the osip trace (compile this code with -DENABLE_TRACE) o Initialize eXosip (and osip) stack o Open a socket for signalling (only UDP with initial eXosip2 version) Now you have to handle eXosip events. Here is some code to get eXosip_event from the eXosip2 stack. eXosip_event_t *je; for (;;) { je = eXosip_event_wait (0, 50); eXosip_lock(); eXosip_automatic_action (); eXosip_unlock(); if (je == NULL) break; if (je->type == EXOSIP_CALL_NEW) { .... .... } else if (je->type == EXOSIP_CALL_ACK) { .... .... } else if (je->type == EXOSIP_CALL_ANSWERED) { .... .... } else ..... .... .... eXosip_event_free(je); } You will receive one event for each SIP message sent. Each event contains the original request of the affected transaction and the last response that triggers the event when available. You can access all headers from those messages and store them in your own context for other actions or graphic displays. For example, when you receive a REFER request for a call transfer, you'll typically retreive the 'refer-To' header: osip_header_t *referto_head = NULL; i = osip_message_header_get_byname (evt->sip, 'refer-to', 0, &referto_head); if (referto_head == NULL || referto_head->hvalue == NULL) The eXosip_event also contains identifiers for calls, registrations, incoming subscriptions or outgoing subscriptions when applicable. Those identifiers are used in API to control calls, registrations, incoming or outgoing subscriptions. These API will build default messages with usual SIP headers (From, To, Call-ID, CSeq, Route, Record-Route, Max-Forward...) and send thoses messages for you. Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 How-To initialize libeXosip2.(3)
Man Page