libeXosip2  5.3.0
Functions
eXosip2 authentication API

Functions

int eXosip_add_authentication_info (struct eXosip_t *excontext, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm)
 
int eXosip_remove_authentication_info (struct eXosip_t *excontext, const char *username, const char *realm)
 
int eXosip_clear_authentication_info (struct eXosip_t *excontext)
 
int eXosip_default_action (struct eXosip_t *excontext, eXosip_event_t *je)
 
void eXosip_automatic_action (struct eXosip_t *excontext)
 
int eXosip_insubscription_automatic (struct eXosip_t *excontext, eXosip_event_t *evt)
 
int eXosip_generate_random (char *buf, int buf_size)
 
int eXosip_hexa_generate_random (char *buf, int buf_size, char *str1, char *str2, char *str3)
 
int eXosip_byte_generate_random (char *buf, int buf_size)
 

Detailed Description

Function Documentation

◆ eXosip_add_authentication_info()

int eXosip_add_authentication_info ( struct eXosip_t *  excontext,
const char *  username,
const char *  userid,
const char *  passwd,
const char *  ha1,
const char *  realm 
)

Add authentication credentials. These are used when an outgoing request comes back with an authorization required response.

Parameters
excontexteXosip_t instance.
usernameusername
useridlogin (usually equals the username)
passwdpassword
ha1MD5 ha1
realmrealm within which credentials apply, or NULL to apply credentials to unrecognized realms

◆ eXosip_remove_authentication_info()

int eXosip_remove_authentication_info ( struct eXosip_t *  excontext,
const char *  username,
const char *  realm 
)

Remove authentication credentials.

Parameters
excontexteXosip_t instance.
usernameusername
realmrealm must be exact same arg as for eXosip_add_authentication_info

◆ eXosip_clear_authentication_info()

int eXosip_clear_authentication_info ( struct eXosip_t *  excontext)

Clear all authentication credentials stored in eXosip

Parameters
excontexteXosip_t instance.

◆ eXosip_default_action()

int eXosip_default_action ( struct eXosip_t *  excontext,
eXosip_event_t je 
)

Initiate some default actions:

Retry with credentials upon reception of 401/407. Retry with Contact header upon reception of 3xx request.

Usefull & required when eXosip_automatic_action() can't do the automatic action: 1/ if you receive a 401 or 407 for BYE (event EXOSIP_CALL_MESSAGE_REQUESTFAILURE). 2/ if you receive 401 or 407 for any sip request outside of dialog (EXOSIP_MESSAGE_REQUESTFAILURE)

Parameters
excontexteXosip_t instance.
jeevent to work on.

◆ eXosip_automatic_action()

void eXosip_automatic_action ( struct eXosip_t *  excontext)

Initiate some automatic actions:

Retry with credentials upon reception of 401/407. Retry with higher Session-Expires upon reception of 422. Refresh REGISTER and SUBSCRIBE/REFER before the expiration delay. Retry with Contact header upon reception of 3xx request. Send automatic UPDATE for session-timer feature.

Parameters
excontexteXosip_t instance.

◆ eXosip_insubscription_automatic()

int eXosip_insubscription_automatic ( struct eXosip_t *  excontext,
eXosip_event_t evt 
)

Automatic internal handling of dialog package.

Parameters
excontexteXosip_t instance.
evtIncoming SUBSCRIBE for dialog package.

◆ eXosip_generate_random()

int eXosip_generate_random ( char *  buf,
int  buf_size 
)

Generate random string: (only digit, and maximum unsigned int)

Parameters
bufdestination buffer for random string.
buf_sizesize of destination buffer

◆ eXosip_hexa_generate_random()

int eXosip_hexa_generate_random ( char *  buf,
int  buf_size,
char *  str1,
char *  str2,
char *  str3 
)

Generate random string: (low entropy, only hexa)

Parameters
bufdestination buffer for random string.
buf_sizesize of destination buffer
str1random1 input string
str2random2 input string
str3random3 input string

◆ eXosip_byte_generate_random()

int eXosip_byte_generate_random ( char *  buf,
int  buf_size 
)

Generate random string: (high entropy when compiled with openssl)

Parameters
bufdestination buffer for random string.
buf_sizesize of destination buffer