libamsip
5.2.1
|
Functions | |
void | am_log (int level, const char *chfr,...) |
void | am_trace (const char *fi, int li, int level, const 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 (const 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) |
int | am_helper_get_nameaddr_info (const char *nameaddr, am_nameaddress_t *value) |
void am_log | ( | int | level, |
const char * | chfr, | ||
... | |||
) |
Log facility for amsip. DEPRECATED METHOD: use am_trace instead
level | Level for debug data. |
chfr | Format for data. |
void am_trace | ( | const char * | fi, |
int | li, | ||
int | level, | ||
const char * | chfr, | ||
... | |||
) |
Log facility for amsip.
fi | filename of source file. |
li | line of source file. |
level | Level for debug data. |
chfr | Format for data. |
int am_event_get | ( | eXosip_event_t * | evt | ) |
Get event.
evt | Pointer 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
evt | Pointer to fill event. |
tv_s | seconds for timeout. |
tv_ms | milliseconds for timeout. |
void am_event_release | ( | eXosip_event_t * | evt | ) |
Release event.
evt | Event structure to release. |
int am_message_get_header | ( | osip_message_t * | msg, |
char * | header, | ||
am_header_t * | value | ||
) |
Get header from message.
msg | SIP message where to find header. |
header | Header name to search. |
value | value of header. |
int am_message_get_bodyinfo | ( | osip_message_t * | msg, |
int | attachemnt_index, | ||
am_bodyinfo_t * | bodyinfo | ||
) |
Get body from message.
msg | SIP message where to find header. |
attachemnt_index | index of attachement. |
bodyinfo | Elements for bodyinfo. |
int am_message_release_bodyinfo | ( | am_bodyinfo_t * | bodyinfo | ) |
Get body from message.
bodyinfo | Elements 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.
msg | SIP message where to extract message info. |
value | Elements from message info. |
int am_message_add_header_to_uri | ( | const char * | uri, |
const char * | header_name, | ||
const char * | header_value, | ||
char * | dest_uri, | ||
int | dest_size | ||
) |
Add a header parameter to a SIP URI. (This helps for escaping)
uri | Original uri. |
header_name | Header name to add |
header_value | Header value to add |
dest_uri | target string for new uri |
dest_size | size of target string for new uri |
int am_message_get_audio_rtpdirection | ( | osip_message_t * | msg | ) |
Get audio RTP direction from SDP attribute. return -1 for no sdp or no such media return 0 for _SENDRECV return 1 for _SENDONLY return 2 for _RECVONLY return 3 for _INACTIVE
msg | SIP message where to extract message info. |
int am_message_get_video_rtpdirection | ( | osip_message_t * | msg | ) |
Get video RTP direction from SDP attribute. return -1 for no sdp or no such media return 0 for _SENDRECV return 1 for _SENDONLY return 2 for _RECVONLY return 3 for _INACTIVE
msg | SIP 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
msg | SIP message where to add info. |
ctt | Content-Type. |
body | Body To add. |
body_size | Size 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).
sip | The element to work on. |
hname | The token name. |
hvalue | The token value. |
int am_helper_get_nameaddr_info | ( | const char * | nameaddr, |
am_nameaddress_t * | value | ||
) |
Extract main parameter from a name-addr or URI (From, To, P-Asserted-Identity, etc...)
nameaddr | The element to work on. |
value | Elements from message info. |