libeXosip2 3.6.0
Data Structures | Enumerations | Functions

eXosip2 event API

General purpose API.

Data Structures

struct  eXosip_event
struct  eXosip_tls_credentials_s
struct  eXosip_tls_ctx_s

Enumerations

enum  eXosip_event_type {
  EXOSIP_REGISTRATION_NEW,
  EXOSIP_REGISTRATION_SUCCESS,
  EXOSIP_REGISTRATION_FAILURE,
  EXOSIP_REGISTRATION_REFRESHED,
  EXOSIP_REGISTRATION_TERMINATED,
  EXOSIP_CALL_INVITE,
  EXOSIP_CALL_REINVITE,
  EXOSIP_CALL_NOANSWER,
  EXOSIP_CALL_PROCEEDING,
  EXOSIP_CALL_RINGING,
  EXOSIP_CALL_ANSWERED,
  EXOSIP_CALL_REDIRECTED,
  EXOSIP_CALL_REQUESTFAILURE,
  EXOSIP_CALL_SERVERFAILURE,
  EXOSIP_CALL_GLOBALFAILURE,
  EXOSIP_CALL_ACK,
  EXOSIP_CALL_CANCELLED,
  EXOSIP_CALL_TIMEOUT,
  EXOSIP_CALL_MESSAGE_NEW,
  EXOSIP_CALL_MESSAGE_PROCEEDING,
  EXOSIP_CALL_MESSAGE_ANSWERED,
  EXOSIP_CALL_MESSAGE_REDIRECTED,
  EXOSIP_CALL_MESSAGE_REQUESTFAILURE,
  EXOSIP_CALL_MESSAGE_SERVERFAILURE,
  EXOSIP_CALL_MESSAGE_GLOBALFAILURE,
  EXOSIP_CALL_CLOSED,
  EXOSIP_CALL_RELEASED,
  EXOSIP_MESSAGE_NEW,
  EXOSIP_MESSAGE_PROCEEDING,
  EXOSIP_MESSAGE_ANSWERED,
  EXOSIP_MESSAGE_REDIRECTED,
  EXOSIP_MESSAGE_REQUESTFAILURE,
  EXOSIP_MESSAGE_SERVERFAILURE,
  EXOSIP_MESSAGE_GLOBALFAILURE,
  EXOSIP_SUBSCRIPTION_UPDATE,
  EXOSIP_SUBSCRIPTION_CLOSED,
  EXOSIP_SUBSCRIPTION_NOANSWER,
  EXOSIP_SUBSCRIPTION_PROCEEDING,
  EXOSIP_SUBSCRIPTION_ANSWERED,
  EXOSIP_SUBSCRIPTION_REDIRECTED,
  EXOSIP_SUBSCRIPTION_REQUESTFAILURE,
  EXOSIP_SUBSCRIPTION_SERVERFAILURE,
  EXOSIP_SUBSCRIPTION_GLOBALFAILURE,
  EXOSIP_SUBSCRIPTION_NOTIFY,
  EXOSIP_SUBSCRIPTION_RELEASED,
  EXOSIP_IN_SUBSCRIPTION_NEW,
  EXOSIP_IN_SUBSCRIPTION_RELEASED,
  EXOSIP_NOTIFICATION_NOANSWER,
  EXOSIP_NOTIFICATION_PROCEEDING,
  EXOSIP_NOTIFICATION_ANSWERED,
  EXOSIP_NOTIFICATION_REDIRECTED,
  EXOSIP_NOTIFICATION_REQUESTFAILURE,
  EXOSIP_NOTIFICATION_SERVERFAILURE,
  EXOSIP_NOTIFICATION_GLOBALFAILURE,
  EXOSIP_EVENT_COUNT
}
enum  eXosip_tls_ctx_error {
  TLS_OK = 0,
  TLS_ERR_NO_RAND = -1,
  TLS_ERR_NO_DH_PARAM = -2,
  TLS_ERR_NO_PW = -3,
  TLS_ERR_NO_ROOT_CA = -4,
  TLS_ERR_MISSING_AUTH_PART = -5
}

Functions

void eXosip_event_free (eXosip_event_t *je)
eXosip_event_teXosip_event_wait (int tv_s, int tv_ms)
eXosip_event_teXosip_event_get (void)
int eXosip_event_geteventsocket (void)
eXosip_tls_ctx_error eXosip_set_tls_ctx (eXosip_tls_ctx_t *ctx)
eXosip_tls_ctx_error eXosip_tls_use_server_certificate (const char *local_certificate_cn)
eXosip_tls_ctx_error eXosip_tls_use_client_certificate (const char *local_certificate_cn)
eXosip_tls_ctx_error eXosip_tls_verify_certificate (int _tls_verify_client_certificate)

Enumeration Type Documentation

Structure for event type description

Enumerator:
EXOSIP_REGISTRATION_NEW 

announce new registration.

EXOSIP_REGISTRATION_SUCCESS 

user is successfully registred.

EXOSIP_REGISTRATION_FAILURE 

user is not registred.

EXOSIP_REGISTRATION_REFRESHED 

registration has been refreshed.

EXOSIP_REGISTRATION_TERMINATED 

UA is not registred any more.

EXOSIP_CALL_INVITE 

announce a new call

EXOSIP_CALL_REINVITE 

announce a new INVITE within call

EXOSIP_CALL_NOANSWER 

announce no answer within the timeout

EXOSIP_CALL_PROCEEDING 

announce processing by a remote app

EXOSIP_CALL_RINGING 

announce ringback

EXOSIP_CALL_ANSWERED 

announce start of call

EXOSIP_CALL_REDIRECTED 

announce a redirection

EXOSIP_CALL_REQUESTFAILURE 

announce a request failure

EXOSIP_CALL_SERVERFAILURE 

announce a server failure

EXOSIP_CALL_GLOBALFAILURE 

announce a global failure

EXOSIP_CALL_ACK 

ACK received for 200ok to INVITE

EXOSIP_CALL_CANCELLED 

announce that call has been cancelled

EXOSIP_CALL_TIMEOUT 

announce that call has failed

EXOSIP_CALL_MESSAGE_NEW 

announce new incoming request.

EXOSIP_CALL_MESSAGE_PROCEEDING 

announce a 1xx for request.

EXOSIP_CALL_MESSAGE_ANSWERED 

announce a 200ok

EXOSIP_CALL_MESSAGE_REDIRECTED 

announce a failure.

EXOSIP_CALL_MESSAGE_REQUESTFAILURE 

announce a failure.

EXOSIP_CALL_MESSAGE_SERVERFAILURE 

announce a failure.

EXOSIP_CALL_MESSAGE_GLOBALFAILURE 

announce a failure.

EXOSIP_CALL_CLOSED 

a BYE was received for this call

EXOSIP_CALL_RELEASED 

call context is cleared.

EXOSIP_MESSAGE_NEW 

announce new incoming request.

EXOSIP_MESSAGE_PROCEEDING 

announce a 1xx for request.

EXOSIP_MESSAGE_ANSWERED 

announce a 200ok

EXOSIP_MESSAGE_REDIRECTED 

announce a failure.

EXOSIP_MESSAGE_REQUESTFAILURE 

announce a failure.

EXOSIP_MESSAGE_SERVERFAILURE 

announce a failure.

EXOSIP_MESSAGE_GLOBALFAILURE 

announce a failure.

EXOSIP_SUBSCRIPTION_UPDATE 

announce incoming SUBSCRIBE.

EXOSIP_SUBSCRIPTION_CLOSED 

announce end of subscription.

EXOSIP_SUBSCRIPTION_NOANSWER 

announce no answer

EXOSIP_SUBSCRIPTION_PROCEEDING 

announce a 1xx

EXOSIP_SUBSCRIPTION_ANSWERED 

announce a 200ok

EXOSIP_SUBSCRIPTION_REDIRECTED 

announce a redirection

EXOSIP_SUBSCRIPTION_REQUESTFAILURE 

announce a request failure

EXOSIP_SUBSCRIPTION_SERVERFAILURE 

announce a server failure

EXOSIP_SUBSCRIPTION_GLOBALFAILURE 

announce a global failure

EXOSIP_SUBSCRIPTION_NOTIFY 

announce new NOTIFY request

EXOSIP_SUBSCRIPTION_RELEASED 

call context is cleared.

EXOSIP_IN_SUBSCRIPTION_NEW 

announce new incoming SUBSCRIBE.

EXOSIP_IN_SUBSCRIPTION_RELEASED 

announce end of subscription.

EXOSIP_NOTIFICATION_NOANSWER 

announce no answer

EXOSIP_NOTIFICATION_PROCEEDING 

announce a 1xx

EXOSIP_NOTIFICATION_ANSWERED 

announce a 200ok

EXOSIP_NOTIFICATION_REDIRECTED 

announce a redirection

EXOSIP_NOTIFICATION_REQUESTFAILURE 

announce a request failure

EXOSIP_NOTIFICATION_SERVERFAILURE 

announce a server failure

EXOSIP_NOTIFICATION_GLOBALFAILURE 

announce a global failure

EXOSIP_EVENT_COUNT 

MAX number of events

An enumeration which describes the error which can occur while setting the eXosip_tls_ctx

Enumerator:
TLS_OK 

yippieh, everything is fine :)

TLS_ERR_NO_RAND 

no absolute path to the random file was specified

TLS_ERR_NO_DH_PARAM 

no absolute path to the diifie hellman file was specified

TLS_ERR_NO_PW 

no password was specified

TLS_ERR_NO_ROOT_CA 

no absolute path to the rootCA file was specified

TLS_ERR_MISSING_AUTH_PART 

something is missing: the private key or the certificate


Function Documentation

void eXosip_event_free ( eXosip_event_t je)

Free ressource in an eXosip event.

Parameters:
jeevent to work on.
eXosip_event_t* eXosip_event_wait ( int  tv_s,
int  tv_ms 
)

Wait for an eXosip event.

Parameters:
tv_stimeout value (seconds).
tv_mstimeout value (mseconds).
eXosip_event_t* eXosip_event_get ( void  )

Wait for next eXosip event.

int eXosip_event_geteventsocket ( void  )

This socket receive some data yhen an event happens internally. NOTE: you must call eXosip_event_wait until there is no more events in the fifo.

eXosip_tls_ctx_error eXosip_set_tls_ctx ( eXosip_tls_ctx_t ctx)

sets the parameters for the TLS context, which is used for encrypted connections

Parameters:
ctx,INa struct which holds the necessary parameters
Returns:
the eXosip_tls_ctx_error code
eXosip_tls_ctx_error eXosip_tls_use_server_certificate ( const char *  local_certificate_cn)

Select by CN name the server certificate from OS store.

12/11/2009 -> implemented only for "Windows Certificate Store"

Parameters:
local_certificate_cnCN name of the certificate to send on incoming connection
Returns:
the eXosip_tls_ctx_error code
eXosip_tls_ctx_error eXosip_tls_use_client_certificate ( const char *  local_certificate_cn)

Select by CN name the client certificate from OS store.

31/1/2011 -> implemented only for "Windows Certificate Store"

Parameters:
local_certificate_cnCN name of the certificate to send on outgoing connection
Returns:
the eXosip_tls_ctx_error code
eXosip_tls_ctx_error eXosip_tls_verify_certificate ( int  _tls_verify_client_certificate)

Configure to accept/reject self signed and expired certificates. NOTE: default is to accept (0)

Parameters:
_tls_verify_client_certificate">0": refuse self signed and expired certificates
Returns:
the eXosip_tls_ctx_error code