SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
oSIP parser Handling

Macros

#define msg_logrequest(P, Q)   ;
 
#define msg_logresponse(P, Q)   ;
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 
#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. More...
 

Functions

int parser_init (void)
 Initialise the oSIP parser. More...
 
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. More...
 
int osip_message_get__property (const osip_message_t *sip)
 define this macro to avoid building several times the message on retransmissions. More...
 
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. More...
 
const char * osip_message_get_reason (int status_code)
 Get the usual reason phrase as defined in SIP for a specific status code. More...
 
int osip_message_set_accept (osip_message_t *sip, const char *hvalue)
 Set the Accept header. More...
 
int osip_message_get_accept (const osip_message_t *sip, int pos, osip_accept_t **dest)
 Get one Accept header. More...
 
int osip_message_set_accept_encoding (osip_message_t *sip, const char *hvalue)
 Set the Accept-encoding header. More...
 
int osip_message_get_accept_encoding (const osip_message_t *sip, int pos, osip_accept_encoding_t **dest)
 Get one Accept-encoding header. More...
 
int osip_message_set_accept_language (osip_message_t *sip, const char *hvalue)
 Set the Accept-language header. More...
 
int osip_message_get_accept_language (const osip_message_t *sip, int pos, osip_accept_language_t **dest)
 Get one Accept-Language header. More...
 
int osip_message_set_alert_info (osip_message_t *sip, const char *hvalue)
 Set the Alert-info header. More...
 
int osip_message_get_alert_info (const osip_message_t *sip, int pos, osip_alert_info_t **dest)
 Get one Alert-info header. More...
 
int osip_message_set_allow (osip_message_t *sip, const char *hvalue)
 Set the Allow header. More...
 
int osip_message_get_allow (const osip_message_t *sip, int pos, osip_allow_t **dest)
 Get one Allow header. More...
 
int osip_message_set_authentication_info (osip_message_t *sip, const char *hvalue)
 Set the Authentication-info header. More...
 
int osip_message_get_authentication_info (const osip_message_t *sip, int pos, osip_authentication_info_t **dest)
 Get one Authentication-info header. More...
 
int osip_message_set_authorization (osip_message_t *sip, const char *hvalue)
 Set the Authorization header. More...
 
int osip_message_get_authorization (const osip_message_t *sip, int pos, osip_authorization_t **dest)
 Get one Authorization header. More...
 
int osip_message_set_call_id (osip_message_t *sip, const char *hvalue)
 Set the Call-id header. More...
 
osip_call_id_tosip_message_get_call_id (const osip_message_t *sip)
 Get one Call-id header. More...
 
int osip_message_set_call_info (osip_message_t *sip, const char *hvalue)
 Set the Call-info header. More...
 
int osip_message_get_call_info (const osip_message_t *sip, int pos, osip_call_info_t **dest)
 Get one Call-info header. More...
 
int osip_message_set_contact (osip_message_t *sip, const char *hvalue)
 Set the Contact header. More...
 
int osip_message_get_contact (const osip_message_t *sip, int pos, osip_contact_t **dest)
 Get one Contact header. More...
 
int osip_message_set_content_encoding (osip_message_t *sip, const char *hvalue)
 Set the Content-encoding header. More...
 
int osip_message_get_content_encoding (const osip_message_t *sip, int pos, osip_content_encoding_t **dest)
 Get one Content-encoding header. More...
 
int osip_message_set_content_length (osip_message_t *sip, const char *hvalue)
 Set the Content-length header. More...
 
osip_content_length_tosip_message_get_content_length (const osip_message_t *sip)
 Get one Content-length header. More...
 
int osip_message_set_content_type (osip_message_t *sip, const char *hvalue)
 Set the Content-type header. More...
 
osip_content_type_tosip_message_get_content_type (const osip_message_t *sip)
 Get one Content-type header. More...
 
int osip_message_set_cseq (osip_message_t *sip, const char *hvalue)
 Set the Cseq header. More...
 
osip_cseq_tosip_message_get_cseq (const osip_message_t *sip)
 Get one Cseq header. More...
 
int osip_message_set_error_info (osip_message_t *sip, const char *hvalue)
 Set the Error-info header. More...
 
int osip_message_get_error_info (const osip_message_t *sip, int pos, osip_error_info_t **dest)
 Get one Error-info header. More...
 
int osip_message_set_from (osip_message_t *sip, const char *hvalue)
 Set the From header. More...
 
osip_from_tosip_message_get_from (const osip_message_t *sip)
 Get the From header. More...
 
int osip_message_set_mime_version (osip_message_t *sip, const char *hvalue)
 Set the mime-version header. More...
 
osip_mime_version_tosip_message_get_mime_version (const osip_message_t *sip)
 Get the Mime-version header. More...
 
int osip_message_set_proxy_authenticate (osip_message_t *sip, const char *hvalue)
 Set the Proxy-authenticate header. More...
 
int osip_message_get_proxy_authenticate (const osip_message_t *sip, int pos, osip_proxy_authenticate_t **dest)
 Get the Proxy-authenticate header. More...
 
int osip_message_set_proxy_authorization (osip_message_t *sip, const char *hvalue)
 Set the Proxy-authorization header. More...
 
int osip_message_get_proxy_authorization (const osip_message_t *sip, int pos, osip_proxy_authorization_t **dest)
 Get one Proxy-authorization header. More...
 
int osip_message_set_proxy_authentication_info (osip_message_t *sip, const char *hvalue)
 Set the Proxy-authentication-info header. More...
 
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. More...
 
int osip_message_set_record_route (osip_message_t *sip, const char *hvalue)
 Set the Record-Route header. More...
 
int osip_message_get_record_route (const osip_message_t *sip, int pos, osip_record_route_t **dest)
 Get one Record-route header. More...
 
int osip_message_set_route (osip_message_t *sip, const char *hvalue)
 Set the Route header. More...
 
int osip_message_get_route (const osip_message_t *sip, int pos, osip_route_t **dest)
 Get one Route header. More...
 
int osip_message_set_to (osip_message_t *sip, const char *hvalue)
 Set the To header. More...
 
osip_to_tosip_message_get_to (const osip_message_t *sip)
 Get the To header. More...
 
int osip_message_set_via (osip_message_t *sip, const char *hvalue)
 Set the Via header. More...
 
int osip_message_append_via (osip_message_t *sip, const char *hvalue)
 Append a Via header. More...
 
int osip_message_get_via (const osip_message_t *sip, int pos, osip_via_t **dest)
 Get one Via header. More...
 
int osip_message_set_www_authenticate (osip_message_t *sip, const char *hvalue)
 Set the Www-authenticate header. More...
 
int osip_message_get_www_authenticate (const osip_message_t *sip, int pos, osip_www_authenticate_t **dest)
 Get one Www-authenticate header. More...
 
int osip_message_set_multiple_header (osip_message_t *sip, char *hname, char *hvalue)
 Allocate and Add multiple header (not defined in oSIP). More...
 
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). More...
 
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). More...
 
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). More...
 
int osip_message_header_get_byname (const osip_message_t *sip, const char *hname, int pos, osip_header_t **dest)
 Find an "unknown" header. More...
 
int osip_message_get_header (const osip_message_t *sip, int pos, osip_header_t **dest)
 Get one "unknown" header. More...
 
int osip_message_set_body (osip_message_t *sip, const char *buf, size_t length)
 Set the Body of the SIP message. More...
 
int osip_message_set_body_mime (osip_message_t *sip, const char *buf, size_t length)
 Set the Body of the SIP message. More...
 
int osip_message_get_body (const osip_message_t *sip, int pos, osip_body_t **dest)
 Get one body header. More...
 

Detailed Description

Macro Definition Documentation

#define msg_logrequest (   P,
 
)    ;

#include <osip_parser.h>

Definition at line 613 of file osip_parser.h.

#define msg_logresponse (   P,
 
)    ;

#include <osip_parser.h>

Definition at line 614 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Content-Language header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 721 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Date header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 630 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find an Encryption header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 643 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Expires header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 734 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a In-Reply-To header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 747 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Max-Forward header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 760 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find an Organization header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 656 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Priority header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 773 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Proxy-Require header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 786 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Require header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 669 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Response-Key header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 799 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Retry-After header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 825 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Server header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 838 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Subject header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 812 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Supported header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 682 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Timestamp header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 695 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Unsupported header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 851 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a User-Agent header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 708 of file osip_parser.h.

#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)

#include <osip_parser.h>

Find a Warning header.

Parameters
sipThe element to work on.
posThe index of the header in the list of unknown header.
destA pointer on the element found.

Definition at line 864 of file osip_parser.h.

#define osip_message_set_content_language (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Content-Language",value)

#include <osip_parser.h>

Allocate and Add a new Content-Language header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 714 of file osip_parser.h.

#define osip_message_set_date (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Date",value)

#include <osip_parser.h>

Allocate and Add a new Date header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 623 of file osip_parser.h.

#define osip_message_set_encryption (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Encryption",value)

#include <osip_parser.h>

Allocate and Add a new Encryption header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 636 of file osip_parser.h.

#define osip_message_set_expires (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Expires",value)

#include <osip_parser.h>

Allocate and Add a new Expires header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 727 of file osip_parser.h.

#define osip_message_set_in_reply_to (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"In-Reply-To",value)

#include <osip_parser.h>

Allocate and Add a new In-Reply-To header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 740 of file osip_parser.h.

#define osip_message_set_max_forwards (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Max-Forwards",value)

#include <osip_parser.h>

Allocate and Add a new Max-Forward header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 753 of file osip_parser.h.

#define osip_message_set_organization (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Organization",value)

#include <osip_parser.h>

Allocate and Add a new Organization header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 649 of file osip_parser.h.

#define osip_message_set_priority (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Priority",value)

#include <osip_parser.h>

Allocate and Add a new Priority header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 766 of file osip_parser.h.

#define osip_message_set_proxy_require (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Proxy-Require",value)

#include <osip_parser.h>

Allocate and Add a new Proxy-Require header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 779 of file osip_parser.h.

#define osip_message_set_require (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Require",value)

#include <osip_parser.h>

Allocate and Add a new Require header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 662 of file osip_parser.h.

#define osip_message_set_response_key (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Response-Key",value)

#include <osip_parser.h>

Allocate and Add a new Response-Key header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 792 of file osip_parser.h.

#define osip_message_set_retry_after (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Retry-After",value)

#include <osip_parser.h>

Allocate and Add a new Retry-After header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 818 of file osip_parser.h.

#define osip_message_set_server (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Server",value)

#include <osip_parser.h>

Allocate and Add a new Server header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 831 of file osip_parser.h.

#define osip_message_set_subject (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Subject",value)

#include <osip_parser.h>

Allocate and Add a new Subject header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 805 of file osip_parser.h.

#define osip_message_set_supported (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Supported",value)

#include <osip_parser.h>

Allocate and Add a new Supported header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 675 of file osip_parser.h.

#define osip_message_set_timestamp (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Timestamp",value)

#include <osip_parser.h>

Allocate and Add a new Timestamp header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 688 of file osip_parser.h.

#define osip_message_set_unsupported (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Unsupported",value)

#include <osip_parser.h>

Allocate and Add a new Unsupported header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 844 of file osip_parser.h.

#define osip_message_set_user_agent (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"User-Agent",value)

#include <osip_parser.h>

Allocate and Add a new User-Agent header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 701 of file osip_parser.h.

#define osip_message_set_warning (   sip,
  value 
)    osip_message_set_header((osip_message_t *)sip,(const char *)"Warning",value)

#include <osip_parser.h>

Allocate and Add a new Warning header.

Parameters
sipThe element to work on.
valuethe value of the new header.

Definition at line 857 of file osip_parser.h.

Function Documentation

int osip_message_append_via ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Append a Via header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_fix_last_via_header ( osip_message_t request,
const char *  ip_addr,
int  port 
)

#include <osip_parser.h>

Fix the via header for INCOMING requests only.

a copy of ip_addr is done.

int osip_message_force_update ( osip_message_t sip)

#include <osip_parser.h>

Force a osip_message_t element to be rebuild on next osip_message_to_str() call.

Parameters
sipThe element to work on.
int osip_message_get__property ( const osip_message_t sip)

#include <osip_parser.h>

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)

Parameters
sipThe element to check.
int osip_message_get_accept ( const osip_message_t sip,
int  pos,
osip_accept_t **  dest 
)

#include <osip_parser.h>

Get one Accept header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_accept_encoding ( const osip_message_t sip,
int  pos,
osip_accept_encoding_t **  dest 
)

#include <osip_parser.h>

Get one Accept-encoding header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_accept_language ( const osip_message_t sip,
int  pos,
osip_accept_language_t **  dest 
)

#include <osip_parser.h>

Get one Accept-Language header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_alert_info ( const osip_message_t sip,
int  pos,
osip_alert_info_t **  dest 
)

#include <osip_parser.h>

Get one Alert-info header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_allow ( const osip_message_t sip,
int  pos,
osip_allow_t **  dest 
)

#include <osip_parser.h>

Get one Allow header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_authentication_info ( const osip_message_t sip,
int  pos,
osip_authentication_info_t **  dest 
)

#include <osip_parser.h>

Get one Authentication-info header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_authorization ( const osip_message_t sip,
int  pos,
osip_authorization_t **  dest 
)

#include <osip_parser.h>

Get one Authorization header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_body ( const osip_message_t sip,
int  pos,
osip_body_t **  dest 
)

#include <osip_parser.h>

Get one body header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the body found.
osip_call_id_t* osip_message_get_call_id ( const osip_message_t sip)

#include <osip_parser.h>

Get one Call-id header.

Parameters
sipThe element to work on.
int osip_message_get_call_info ( const osip_message_t sip,
int  pos,
osip_call_info_t **  dest 
)

#include <osip_parser.h>

Get one Call-info header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_contact ( const osip_message_t sip,
int  pos,
osip_contact_t **  dest 
)

#include <osip_parser.h>

Get one Contact header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_content_encoding ( const osip_message_t sip,
int  pos,
osip_content_encoding_t **  dest 
)

#include <osip_parser.h>

Get one Content-encoding header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
osip_content_length_t* osip_message_get_content_length ( const osip_message_t sip)

#include <osip_parser.h>

Get one Content-length header.

Parameters
sipThe element to work on.
osip_content_type_t* osip_message_get_content_type ( const osip_message_t sip)

#include <osip_parser.h>

Get one Content-type header.

Parameters
sipThe element to work on.
osip_cseq_t* osip_message_get_cseq ( const osip_message_t sip)

#include <osip_parser.h>

Get one Cseq header.

Parameters
sipThe element to work on.
int osip_message_get_error_info ( const osip_message_t sip,
int  pos,
osip_error_info_t **  dest 
)

#include <osip_parser.h>

Get one Error-info header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
osip_from_t* osip_message_get_from ( const osip_message_t sip)

#include <osip_parser.h>

Get the From header.

Parameters
sipThe element to work on.
int osip_message_get_header ( const osip_message_t sip,
int  pos,
osip_header_t **  dest 
)

#include <osip_parser.h>

Get one "unknown" header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
osip_mime_version_t* osip_message_get_mime_version ( const osip_message_t sip)

#include <osip_parser.h>

Get the Mime-version header.

Parameters
sipThe element to work on.
int osip_message_get_proxy_authenticate ( const osip_message_t sip,
int  pos,
osip_proxy_authenticate_t **  dest 
)

#include <osip_parser.h>

Get the Proxy-authenticate header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_proxy_authentication_info ( const osip_message_t sip,
int  pos,
osip_proxy_authentication_info_t **  dest 
)

#include <osip_parser.h>

Get the Proxy-authentication-info header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_proxy_authorization ( const osip_message_t sip,
int  pos,
osip_proxy_authorization_t **  dest 
)

#include <osip_parser.h>

Get one Proxy-authorization header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
const char* osip_message_get_reason ( int  status_code)

#include <osip_parser.h>

Get the usual reason phrase as defined in SIP for a specific status code.

Parameters
status_codeA status code.
int osip_message_get_record_route ( const osip_message_t sip,
int  pos,
osip_record_route_t **  dest 
)

#include <osip_parser.h>

Get one Record-route header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_route ( const osip_message_t sip,
int  pos,
osip_route_t **  dest 
)

#include <osip_parser.h>

Get one Route header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
osip_to_t* osip_message_get_to ( const osip_message_t sip)

#include <osip_parser.h>

Get the To header.

Parameters
sipThe element to work on.
int osip_message_get_via ( const osip_message_t sip,
int  pos,
osip_via_t **  dest 
)

#include <osip_parser.h>

Get one Via header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_get_www_authenticate ( const osip_message_t sip,
int  pos,
osip_www_authenticate_t **  dest 
)

#include <osip_parser.h>

Get one Www-authenticate header.

Parameters
sipThe element to work on.
posThe index of the element to get.
destA pointer on the header found.
int osip_message_header_get_byname ( const osip_message_t sip,
const char *  hname,
int  pos,
osip_header_t **  dest 
)

#include <osip_parser.h>

Find an "unknown" header.

(not defined in oSIP)

Parameters
sipThe element to work on.
hnameThe name of the header to find.
posThe index where to start searching for the header.
destA pointer to the header found.
int osip_message_replace_header ( osip_message_t sip,
const char *  hname,
const char *  hvalue 
)

#include <osip_parser.h>

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

Parameters
sipThe element to work on.
hnameThe token name.
hvalueThe token value.
int osip_message_set_accept ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Accept header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_accept_encoding ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Accept-encoding header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_accept_language ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Accept-language header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_alert_info ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Alert-info header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_allow ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Allow header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_authentication_info ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Authentication-info header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_authorization ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Authorization header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_body ( osip_message_t sip,
const char *  buf,
size_t  length 
)

#include <osip_parser.h>

Set the Body of the SIP message.

Parameters
sipThe element to work on.
bufThe buffer containing the body.
lengthThe length of the buffer.
int osip_message_set_body_mime ( osip_message_t sip,
const char *  buf,
size_t  length 
)

#include <osip_parser.h>

Set the Body of the SIP message.

(please report bugs)

Parameters
sipThe element to work on.
bufthe buffer containing the body.
lengthThe length of the buffer.
int osip_message_set_call_id ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Call-id header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_call_info ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Call-info header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_contact ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Contact header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_content_encoding ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Content-encoding header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_content_length ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Content-length header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_content_type ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Content-type header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_cseq ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Cseq header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_error_info ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Error-info header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_from ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the From header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_header ( osip_message_t sip,
const char *  hname,
const char *  hvalue 
)

#include <osip_parser.h>

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

Parameters
sipThe element to work on.
hnameThe token name.
hvalueThe token value.
int osip_message_set_mime_version ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the mime-version header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_multiple_header ( osip_message_t sip,
char *  hname,
char *  hvalue 
)

#include <osip_parser.h>

Allocate and Add multiple header (not defined in oSIP).

Parameters
sipThe element to work on.
hnameThe token name. NAME MUST BE DYNAMICLY ALLOCATED
hvalueThe token value. VALUE MUST BE DYNAMICLY ALLOCATED
int osip_message_set_proxy_authenticate ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Proxy-authenticate header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_proxy_authentication_info ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Proxy-authentication-info header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_proxy_authorization ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Proxy-authorization header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_record_route ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Record-Route header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_route ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Route header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_to ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the To header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_topheader ( osip_message_t sip,
const char *  hname,
const char *  hvalue 
)

#include <osip_parser.h>

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

The element is add on the top of the unknown header list.

Parameters
sipThe element to work on.
hnameThe token name.
hvalueThe token value.
int osip_message_set_via ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Via header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int osip_message_set_www_authenticate ( osip_message_t sip,
const char *  hvalue 
)

#include <osip_parser.h>

Set the Www-authenticate header.

Parameters
sipThe element to work on.
hvalueThe string describing the element.
int parser_init ( void  )

#include <osip_parser.h>

Initialise the oSIP parser.