libosip
5.3.0
|
Macros | |
#define | osip_message_set_date(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Date", value) |
#define | osip_message_get_date(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "date", pos, (osip_header_t **) dest) |
#define | osip_message_set_encryption(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Encryption", value) |
#define | osip_message_get_encryption(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "encryption", pos, (osip_header_t **) dest) |
#define | osip_message_set_organization(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Organization", value) |
#define | osip_message_get_organization(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "organization", pos, (osip_header_t **) dest) |
#define | osip_message_set_require(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Require", value) |
#define | osip_message_get_require(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "require", pos, (osip_header_t **) dest) |
#define | osip_message_set_supported(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Supported", value) |
#define | osip_message_get_supported(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "supported", pos, (osip_header_t **) dest) |
#define | osip_message_set_timestamp(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Timestamp", value) |
#define | osip_message_get_timestamp(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "timestamp", pos, (osip_header_t **) dest) |
#define | osip_message_set_user_agent(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "User-Agent", value) |
#define | osip_message_get_user_agent(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "user-agent", pos, (osip_header_t **) dest) |
#define | osip_message_set_content_language(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Content-Language", value) |
#define | osip_message_get_content_language(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "content-language", pos, (osip_header_t **) dest) |
#define | osip_message_set_expires(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Expires", value) |
#define | osip_message_get_expires(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "expires", pos, (osip_header_t **) dest) |
#define | osip_message_set_in_reply_to(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "In-Reply-To", value) |
#define | osip_message_get_in_reply_to(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "in-reply-to", pos, (osip_header_t **) dest) |
#define | osip_message_set_max_forwards(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Max-Forwards", value) |
#define | osip_message_get_max_forwards(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "max-forwards", pos, (osip_header_t **) dest) |
#define | osip_message_set_priority(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Priority", value) |
#define | osip_message_get_priority(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "priority", pos, (osip_header_t **) dest) |
#define | osip_message_set_proxy_require(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Proxy-Require", value) |
#define | osip_message_get_proxy_require(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "proxy-require", pos, (osip_header_t **) dest) |
#define | osip_message_set_response_key(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Response-Key", value) |
#define | osip_message_get_response_key(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "response-key", pos, (osip_header_t **) dest) |
#define | osip_message_set_subject(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Subject", value) |
#define | osip_message_get_subject(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "subject", pos, (osip_header_t **) dest) |
#define | osip_message_set_retry_after(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Retry-After", value) |
#define | osip_message_get_retry_after(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "retry-after", pos, (osip_header_t **) dest) |
#define | osip_message_set_server(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Server", value) |
#define | osip_message_get_server(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "server", pos, (osip_header_t **) dest) |
#define | osip_message_set_unsupported(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Unsupported", value) |
#define | osip_message_get_unsupported(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "unsupported", pos, (osip_header_t **) dest) |
#define | osip_message_set_warning(sip, value) osip_message_set_header((osip_message_t *) sip, (const char *) "Warning", value) |
#define | osip_message_get_warning(sip, pos, dest) osip_message_header_get_byname((osip_message_t *) sip, (const char *) "warning", pos, (osip_header_t **) dest) |
#define osip_message_get_content_language | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "content-language", pos, (osip_header_t **) dest) |
Find a Content-Language header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_date | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "date", pos, (osip_header_t **) dest) |
Find a Date header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_encryption | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "encryption", pos, (osip_header_t **) dest) |
Find an Encryption header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_expires | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "expires", pos, (osip_header_t **) dest) |
Find a Expires header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_in_reply_to | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "in-reply-to", pos, (osip_header_t **) dest) |
Find a In-Reply-To header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_max_forwards | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "max-forwards", pos, (osip_header_t **) dest) |
Find a Max-Forward header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_organization | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "organization", pos, (osip_header_t **) dest) |
Find an Organization header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_priority | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "priority", pos, (osip_header_t **) dest) |
Find a Priority header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_proxy_require | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "proxy-require", pos, (osip_header_t **) dest) |
Find a Proxy-Require header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_require | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "require", pos, (osip_header_t **) dest) |
Find a Require header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_response_key | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "response-key", pos, (osip_header_t **) dest) |
Find a Response-Key header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_retry_after | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "retry-after", pos, (osip_header_t **) dest) |
Find a Retry-After header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_server | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "server", pos, (osip_header_t **) dest) |
Find a Server header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_subject | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "subject", pos, (osip_header_t **) dest) |
Find a Subject header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_supported | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "supported", pos, (osip_header_t **) dest) |
Find a Supported header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_timestamp | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "timestamp", pos, (osip_header_t **) dest) |
Find a Timestamp header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_unsupported | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "unsupported", pos, (osip_header_t **) dest) |
Find a Unsupported header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_user_agent | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "user-agent", pos, (osip_header_t **) dest) |
Find a User-Agent header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_get_warning | ( | sip, | |
pos, | |||
dest | |||
) | osip_message_header_get_byname((osip_message_t *) sip, (const char *) "warning", pos, (osip_header_t **) dest) |
Find a Warning header.
sip | The element to work on. |
pos | The index of the header in the list of unknown header. |
dest | A pointer on the element found. |
#define osip_message_set_content_language | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Content-Language", value) |
Allocate and Add a new Content-Language header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_date | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Date", value) |
Allocate and Add a new Date header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_encryption | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Encryption", value) |
Allocate and Add a new Encryption header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_expires | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Expires", value) |
Allocate and Add a new Expires header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_in_reply_to | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "In-Reply-To", value) |
Allocate and Add a new In-Reply-To header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_max_forwards | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Max-Forwards", value) |
Allocate and Add a new Max-Forward header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_organization | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Organization", value) |
Allocate and Add a new Organization header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_priority | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Priority", value) |
Allocate and Add a new Priority header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_proxy_require | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Proxy-Require", value) |
Allocate and Add a new Proxy-Require header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_require | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Require", value) |
Allocate and Add a new Require header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_response_key | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Response-Key", value) |
Allocate and Add a new Response-Key header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_retry_after | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Retry-After", value) |
Allocate and Add a new Retry-After header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_server | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Server", value) |
Allocate and Add a new Server header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_subject | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Subject", value) |
Allocate and Add a new Subject header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_supported | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Supported", value) |
Allocate and Add a new Supported header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_timestamp | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Timestamp", value) |
Allocate and Add a new Timestamp header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_unsupported | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Unsupported", value) |
Allocate and Add a new Unsupported header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_user_agent | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "User-Agent", value) |
Allocate and Add a new User-Agent header.
sip | The element to work on. |
value | the value of the new header. |
#define osip_message_set_warning | ( | sip, | |
value | |||
) | osip_message_set_header((osip_message_t *) sip, (const char *) "Warning", value) |
Allocate and Add a new Warning header.
sip | The element to work on. |
value | the value of the new header. |
int osip_message_append_via | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Append a Via header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_via_free(), osip_via_init(), osip_via_parse(), and osip_message::vias.
int osip_message_fix_last_via_header | ( | osip_message_t * | request, |
const char * | ip_addr, | ||
int | port | ||
) |
Fix the via header for INCOMING requests only. a copy of ip_addr is done.
References osip_uri_param::gvalue, osip_via::host, MSG_IS_RESPONSE, osip_list_get(), osip_via_param_get_byname, osip_via_set_received, and osip_message::vias.
int osip_message_force_update | ( | osip_message_t * | sip | ) |
Force a osip_message_t element to be rebuild on next osip_message_to_str() call.
sip | The element to work on. |
References osip_message::message_property.
int osip_message_get__property | ( | const osip_message_t * | sip | ) |
define this macro to avoid building several times the message on retransmissions. If you have changed the osip_message_t element since last call of osip_message_to_str() you can call osip_message_force_update() to force a rebuild. Check if the element is already built. (so osip_message_to_str won't build it again)
sip | The element to check. |
References osip_message::message_property.
int osip_message_get_accept | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_accept_t ** | dest | ||
) |
Get one Accept header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::accepts, osip_list_get(), and osip_list_size().
int osip_message_get_accept_encoding | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_accept_encoding_t ** | dest | ||
) |
Get one Accept-encoding header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::accept_encodings, osip_list_get(), and osip_list_size().
int osip_message_get_accept_language | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_accept_language_t ** | dest | ||
) |
Get one Accept-Language header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::accept_languages, osip_list_get(), and osip_list_size().
int osip_message_get_alert_info | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_alert_info_t ** | dest | ||
) |
Get one Alert-info header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::alert_infos, osip_list_get(), and osip_list_size().
int osip_message_get_allow | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_allow_t ** | dest | ||
) |
Get one Allow header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::allows, osip_list_get(), and osip_list_size().
int osip_message_get_authentication_info | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_authentication_info_t ** | dest | ||
) |
Get one Authentication-info header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::authentication_infos, osip_list_get(), and osip_list_size().
int osip_message_get_authorization | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_authorization_t ** | dest | ||
) |
Get one Authorization header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::authorizations, osip_list_get(), and osip_list_size().
int osip_message_get_body | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_body_t ** | dest | ||
) |
Get one body header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the body found. |
References osip_message::bodies, osip_list_get(), and osip_list_size().
osip_call_id_t* osip_message_get_call_id | ( | const osip_message_t * | sip | ) |
int osip_message_get_call_info | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_call_info_t ** | dest | ||
) |
Get one Call-info header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::call_infos, osip_list_get(), and osip_list_size().
int osip_message_get_contact | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_contact_t ** | dest | ||
) |
Get one Contact header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::contacts, osip_list_get(), and osip_list_size().
int osip_message_get_content_encoding | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_content_encoding_t ** | dest | ||
) |
Get one Content-encoding header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::content_encodings, osip_list_get(), and osip_list_size().
osip_content_length_t* osip_message_get_content_length | ( | const osip_message_t * | sip | ) |
Get one Content-length header.
sip | The element to work on. |
References osip_message::content_length.
osip_content_type_t* osip_message_get_content_type | ( | const osip_message_t * | sip | ) |
Get one Content-type header.
sip | The element to work on. |
References osip_message::content_type.
osip_cseq_t* osip_message_get_cseq | ( | const osip_message_t * | sip | ) |
int osip_message_get_error_info | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_error_info_t ** | dest | ||
) |
Get one Error-info header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::error_infos, osip_list_get(), and osip_list_size().
osip_from_t* osip_message_get_from | ( | const osip_message_t * | sip | ) |
int osip_message_get_header | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_header_t ** | dest | ||
) |
Get one "unknown" header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_message::headers, osip_list_get(), and osip_list_size().
osip_mime_version_t* osip_message_get_mime_version | ( | const osip_message_t * | sip | ) |
Get the Mime-version header.
sip | The element to work on. |
References osip_message::mime_version.
int osip_message_get_proxy_authenticate | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_proxy_authenticate_t ** | dest | ||
) |
Get the Proxy-authenticate header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::proxy_authenticates.
int osip_message_get_proxy_authentication_info | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_proxy_authentication_info_t ** | dest | ||
) |
Get the Proxy-authentication-info header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::proxy_authentication_infos.
int osip_message_get_proxy_authorization | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_proxy_authorization_t ** | dest | ||
) |
Get one Proxy-authorization header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::proxy_authorizations.
const char* osip_message_get_reason | ( | int | status_code | ) |
Get the usual reason phrase as defined in SIP for a specific status code.
status_code | A status code. |
int osip_message_get_record_route | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_record_route_t ** | dest | ||
) |
Get one Record-route header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::record_routes.
int osip_message_get_route | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_route_t ** | dest | ||
) |
Get one Route header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::routes.
osip_to_t* osip_message_get_to | ( | const osip_message_t * | sip | ) |
int osip_message_get_via | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_via_t ** | dest | ||
) |
Get one Via header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::vias.
int osip_message_get_www_authenticate | ( | const osip_message_t * | sip, |
int | pos, | ||
osip_www_authenticate_t ** | dest | ||
) |
Get one Www-authenticate header.
sip | The element to work on. |
pos | The index of the element to get. |
dest | A pointer on the header found. |
References osip_list_get(), osip_list_size(), and osip_message::www_authenticates.
int osip_message_header_get_byname | ( | const osip_message_t * | sip, |
const char * | hname, | ||
int | pos, | ||
osip_header_t ** | dest | ||
) |
Find an "unknown" header. (not defined in oSIP)
sip | The element to work on. |
hname | The name of the header to find. |
pos | The index where to start searching for the header. |
dest | A pointer to the header found. |
References osip_message::headers, osip_header::hname, osip_list_get(), and osip_list_size().
Referenced by osip_message_replace_header().
int osip_message_replace_header | ( | osip_message_t * | sip, |
const char * | hname, | ||
const char * | hvalue | ||
) |
Allocate and Add/Replace an "unknown" header (not defined in oSIP).
sip | The element to work on. |
hname | The token name. |
hvalue | The token value. |
References osip_message::headers, osip_header::hname, osip_header::hvalue, osip_message::message_property, osip_header_free(), osip_header_init(), osip_list_add(), osip_list_remove(), and osip_message_header_get_byname().
int osip_message_set_accept | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Accept header.
sip | The element to work on. |
hvalue | The string describing the element. |
References accept_init, osip_message::accepts, osip_message::message_property, osip_accept_free, osip_accept_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_accept_encoding | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Accept-encoding header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::accept_encodings, osip_message::message_property, osip_accept_encoding_free(), osip_accept_encoding_init(), osip_accept_encoding_parse(), and osip_list_add().
Referenced by parser_init().
int osip_message_set_accept_language | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Accept-language header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::accept_languages, osip_message::message_property, osip_accept_language_free, osip_accept_language_init, osip_accept_language_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_alert_info | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Alert-info header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::alert_infos, osip_message::message_property, osip_alert_info_free, osip_alert_info_init, osip_alert_info_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_allow | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Allow header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::allows, osip_message::message_property, osip_allow_free, osip_allow_init, osip_allow_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_authentication_info | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Authentication-info header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::authentication_infos, osip_message::message_property, osip_authentication_info_free(), osip_authentication_info_init(), osip_authentication_info_parse(), and osip_list_add().
Referenced by parser_init().
int osip_message_set_authorization | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Authorization header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::authorizations, osip_message::message_property, osip_authorization_free(), osip_authorization_init(), osip_authorization_parse(), and osip_list_add().
Referenced by parser_init().
int osip_message_set_body | ( | osip_message_t * | sip, |
const char * | buf, | ||
size_t | length | ||
) |
Set the Body of the SIP message.
sip | The element to work on. |
buf | The buffer containing the body. |
length | The length of the buffer. |
References osip_message::bodies, osip_message::message_property, osip_body_free(), osip_body_init(), osip_body_parse(), and osip_list_add().
int osip_message_set_body_mime | ( | osip_message_t * | sip, |
const char * | buf, | ||
size_t | length | ||
) |
Set the Body of the SIP message. (please report bugs)
sip | The element to work on. |
buf | the buffer containing the body. |
length | The length of the buffer. |
References osip_message::bodies, osip_message::message_property, osip_body_free(), osip_body_init(), osip_body_parse_mime(), and osip_list_add().
int osip_message_set_call_id | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Call-id header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::call_id, osip_message::message_property, osip_call_id_free(), osip_call_id_init(), and osip_call_id_parse().
Referenced by parser_init().
int osip_message_set_call_info | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Call-info header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::call_infos, osip_message::message_property, osip_call_info_free(), osip_call_info_init(), osip_call_info_parse(), and osip_list_add().
Referenced by parser_init().
int osip_message_set_contact | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Contact header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::contacts, osip_message::message_property, osip_contact_free(), osip_contact_init(), osip_contact_parse(), and osip_list_add().
Referenced by parser_init().
int osip_message_set_content_encoding | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Content-encoding header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::content_encodings, osip_message::message_property, osip_content_encoding_free, osip_content_encoding_init, osip_content_encoding_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_content_length | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Content-length header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::content_length, osip_message::message_property, osip_content_length_free(), osip_content_length_init(), and osip_content_length_parse().
Referenced by parser_init().
int osip_message_set_content_type | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Content-type header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::content_type, osip_message::message_property, osip_content_type_free(), osip_content_type_init(), and osip_content_type_parse().
Referenced by parser_init().
int osip_message_set_cseq | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Cseq header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::cseq, osip_message::message_property, osip_cseq_free(), osip_cseq_init(), and osip_cseq_parse().
Referenced by parser_init().
int osip_message_set_error_info | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Error-info header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::error_infos, osip_message::message_property, osip_error_info_free, osip_error_info_init, osip_error_info_parse, and osip_list_add().
Referenced by parser_init().
int osip_message_set_from | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the From header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::from, osip_message::message_property, osip_from_free(), osip_from_init(), and osip_from_parse().
Referenced by parser_init().
int osip_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. |
References osip_message::headers, osip_header::hname, osip_header::hvalue, osip_message::message_property, osip_header_free(), osip_header_init(), and osip_list_add().
int osip_message_set_mime_version | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the mime-version header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_message::mime_version, osip_mime_version_free, osip_mime_version_init, and osip_mime_version_parse.
Referenced by parser_init().
int osip_message_set_proxy_authenticate | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Proxy-authenticate header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_proxy_authenticate_free, osip_proxy_authenticate_init, osip_proxy_authenticate_parse, and osip_message::proxy_authenticates.
Referenced by parser_init().
int osip_message_set_proxy_authentication_info | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Proxy-authentication-info header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_proxy_authentication_info_free, osip_proxy_authentication_info_init, osip_proxy_authentication_info_parse, and osip_message::proxy_authentication_infos.
Referenced by parser_init().
int osip_message_set_proxy_authorization | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Proxy-authorization header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_proxy_authorization_free, osip_proxy_authorization_init, osip_proxy_authorization_parse, and osip_message::proxy_authorizations.
Referenced by parser_init().
int osip_message_set_record_route | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Record-Route header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_record_route_free(), osip_record_route_init(), osip_record_route_parse(), and osip_message::record_routes.
Referenced by parser_init().
int osip_message_set_route | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Route header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_route_free(), osip_route_init(), osip_route_parse(), and osip_message::routes.
Referenced by parser_init().
int osip_message_set_to | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the To header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_to_free(), osip_to_init(), osip_to_parse(), and osip_message::to.
Referenced by parser_init().
int osip_message_set_topheader | ( | osip_message_t * | sip, |
const char * | hname, | ||
const char * | hvalue | ||
) |
Allocate and Add an "unknown" header (not defined in oSIP). The element is add on the top of the unknown header list.
sip | The element to work on. |
hname | The token name. |
hvalue | The token value. |
References osip_message::headers, osip_header::hname, osip_header::hvalue, osip_message::message_property, osip_header_free(), osip_header_init(), and osip_list_add().
int osip_message_set_via | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Via header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_via_free(), osip_via_init(), osip_via_parse(), and osip_message::vias.
Referenced by parser_init().
int osip_message_set_www_authenticate | ( | osip_message_t * | sip, |
const char * | hvalue | ||
) |
Set the Www-authenticate header.
sip | The element to work on. |
hvalue | The string describing the element. |
References osip_message::message_property, osip_list_add(), osip_www_authenticate_free(), osip_www_authenticate_init(), osip_www_authenticate_parse(), and osip_message::www_authenticates.
Referenced by parser_init().
int parser_add_comma_separated_header | ( | const char * | hname | ) |
Add a header, unknown to the stack, where the COMMA can be used to have multiple headers on one line. from rfc3261: header = "header-name" HCOLON header-value *(COMMA header-value)
This is the current list build 21/03/2018 from all known sip rfc:
rfc3261 Accept, a, Accept-Encoding, Accept-Language, Alert-Info, Allow, Authentication-Info, Proxy-Require,Call-Info, Contact, m, Content-Encoding, e ,Content-Language, Error-Info, In-Reply-To, Record-Route, Require, Route, Supported, k, Unsupported, Via, v, Warning rfc3313 P-Media-Authorization rfc3325 P-Asserted-Identity, P-Preferred-Identity rfc3326 Reason rfc3327 Path rfc3329 Security-Client, Security-Server, Security-Verify rfc3608 Service-Route rfc3841 Request-Disposition, d, Accept-Contact, a, Reject-Contact, j rfc4412 Resource-Priority, Accept-Resource-Priority rfc5009 P-Early-Media rfc5318 P-Refused-URI-List rfc5360 Permission-Missing, Trigger-Consent rfc6050 P-Asserted-Service, P-Preferred-Service rfc6086 Recv-Info rfc6665 Allow-Events, u rfc6794 Policy-ID, Policy-Contact rfc6809 Feature-Caps rfc7044 History-Info, Accept rfc7315 P-Associated-URI, P-Visited-Network-ID, P-Access-Network-Info, P-Charging-Function-Addresses rfc7433 User-to-User
hname | The header name to add in the list. |
int parser_init | ( | void | ) |
Initialize the oSIP parser.
References osip_message_set_accept(), osip_message_set_accept_encoding(), osip_message_set_accept_language(), osip_message_set_alert_info(), osip_message_set_allow(), osip_message_set_authentication_info(), osip_message_set_authorization(), osip_message_set_call_id(), osip_message_set_call_info(), osip_message_set_contact(), osip_message_set_content_encoding(), osip_message_set_content_length(), osip_message_set_content_type(), osip_message_set_cseq(), osip_message_set_error_info(), osip_message_set_from(), osip_message_set_mime_version(), osip_message_set_proxy_authenticate(), osip_message_set_proxy_authentication_info(), osip_message_set_proxy_authorization(), osip_message_set_record_route(), osip_message_set_route(), osip_message_set_to(), osip_message_set_via(), and osip_message_set_www_authenticate().
Referenced by osip_init().