libamsip  4.8.0
Functions
amsip event interface
Event management API.

Functions

void am_log (int level, char *chfr,...)
void am_trace (char *fi, int li, int level, char *chfr,...)
int am_event_get (eXosip_event_t *evt)
int am_event_wait (eXosip_event_t *evt, int tv_s, int tv_ms)
void am_event_release (eXosip_event_t *evt)
int am_message_get_header (osip_message_t *msg, char *header, am_header_t *value)
int am_message_get_bodyinfo (osip_message_t *msg, int attachemnt_index, am_bodyinfo_t *bodyinfo)
int am_message_release_bodyinfo (am_bodyinfo_t *bodyinfo)
int am_message_get_messageinfo (osip_message_t *msg, am_messageinfo_t *value)
int am_message_add_header_to_uri (char *uri, const char *header_name, const char *header_value, char *dest_uri, int dest_size)
int am_message_get_audio_rtpdirection (osip_message_t *msg)
int am_message_get_video_rtpdirection (osip_message_t *msg)
int am_message_set_body (osip_message_t *msg, const char *ctt, const char *body, int body_size)
int am_message_set_header (osip_message_t *sip, const char *hname, const char *hvalue)

Detailed Description

Function Documentation

void am_log ( int  level,
char *  chfr,
  ... 
)

Log facility for amsip. DEPRECATED METHOD: use am_trace instead

Parameters
levelLevel for debug data.
chfrFormat for data.
void am_trace ( char *  fi,
int  li,
int  level,
char *  chfr,
  ... 
)

Log facility for amsip.

Parameters
fifilename of source file.
liline of source file.
levelLevel for debug data.
chfrFormat for data.
int am_event_get ( eXosip_event_t *  evt)

Get event.

Parameters
evtPointer to fill event.
int am_event_wait ( eXosip_event_t *  evt,
int  tv_s,
int  tv_ms 
)

Wait for an event during a maximum timeout. NOTE: the maximum allowed value is theorically 0s and 500 ms

Parameters
evtPointer to fill event.
tv_sseconds for timeout.
tv_msmilliseconds for timeout.
void am_event_release ( eXosip_event_t *  evt)

Release event.

Parameters
evtEvent structure to release.
int am_message_get_header ( osip_message_t *  msg,
char *  header,
am_header_t *  value 
)

Get header from message.

Parameters
msgSIP message where to find header.
headerHeader name to search.
valuevalue of header.
int am_message_get_bodyinfo ( osip_message_t *  msg,
int  attachemnt_index,
am_bodyinfo_t *  bodyinfo 
)

Get body from message.

Parameters
msgSIP message where to find header.
attachemnt_indexindex of attachement.
bodyinfoElements for bodyinfo.
int am_message_release_bodyinfo ( am_bodyinfo_t *  bodyinfo)

Get body from message.

Parameters
bodyinfoElements to release.
int am_message_get_messageinfo ( osip_message_t *  msg,
am_messageinfo_t *  value 
)

Get message information (method, target//code, reason + From/To) from message.

Parameters
msgSIP message where to extract message info.
valueElements from message info.
int am_message_add_header_to_uri ( char *  uri,
const char *  header_name,
const char *  header_value,
char *  dest_uri,
int  dest_size 
)

Get message information (method, target//code, reason + From/To) from message.

Parameters
uriOriginal uri.
header_nameHeader name to add
header_valueHeader value to add
dest_uritarget string for new uri
dest_sizesize of target string for new uri
int am_message_get_audio_rtpdirection ( osip_message_t *  msg)

Get audio RTP direction from SDP attribute. return 0 for _SENDRECV return 1 for _SENDONLY return 2 for _RECVONLY

Parameters
msgSIP message where to extract message info.
int am_message_get_video_rtpdirection ( osip_message_t *  msg)

Get video RTP direction from SDP attribute. return 0 for _SENDRECV return 1 for _SENDONLY return 2 for _RECVONLY

Parameters
msgSIP message where to extract message info.
int am_message_set_body ( osip_message_t *  msg,
const char *  ctt,
const char *  body,
int  body_size 
)

Set body in SIP message

Parameters
msgSIP message where to add info.
cttContent-Type.
bodyBody To add.
body_sizeSize of Body To add.
int am_message_set_header ( osip_message_t *  sip,
const char *  hname,
const char *  hvalue 
)

Allocate and Add an "unknown" header (not defined in oSIP).

Parameters
sipThe element to work on.
hnameThe token name.
hvalueThe token value.