BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

Declarations for various SIP header fields. More...

Data Structures

struct  pjsip_common_credential
 
struct  pjsip_digest_credential
 
struct  pjsip_pgp_credential
 
struct  pjsip_oauth_credential
 
struct  pjsip_proxy_authorization_hdr
 
struct  pjsip_common_challenge
 
struct  pjsip_digest_challenge
 
struct  pjsip_pgp_challenge
 
struct  pjsip_proxy_authenticate_hdr
 
struct  pjsip_hdr_vptr
 
struct  pjsip_hdr
 
struct  pjsip_generic_string_hdr
 
struct  pjsip_generic_int_hdr
 
struct  pjsip_generic_array_hdr
 
struct  pjsip_cid_hdr
 
struct  pjsip_clen_hdr
 
struct  pjsip_cseq_hdr
 
struct  pjsip_contact_hdr
 
struct  pjsip_ctype_hdr
 
struct  pjsip_fromto_hdr
 
struct  pjsip_routing_hdr
 
struct  pjsip_retry_after_hdr
 
struct  pjsip_via_hdr
 

Macros

#define PJSIP_DECL_HDR_MEMBER(hdr)
 
#define PJSIP_GENERIC_ARRAY_MAX_COUNT   32
 
#define PJSIP_MAX_ACCEPT_COUNT   PJSIP_GENERIC_ARRAY_MAX_COUNT
 
#define PJSIP_EXPIRES_NOT_SPECIFIED   ((pj_uint32_t)0xFFFFFFFFUL)
 
#define pjsip_accept_encoding_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_accept_lang_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_alert_info_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_auth_info_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_call_info_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_content_disposition_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_content_encoding_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_content_lang_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_date_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_err_info_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_in_reply_to_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_mime_version_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_organization_hdr_create   pjsip_genric_string_hdr_create
 
#define pjsip_priority_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_reply_to_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_server_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_subject_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_timestamp_hdr_create   pjsip_generic_string_hdr_create
 
#define pjsip_user_agent_hdr_create   pjsip_generic_string_hdr_create
 

Typedefs

typedef pjsip_generic_array_hdr pjsip_accept_hdr
 
typedef pjsip_generic_array_hdr pjsip_allow_hdr
 
typedef pjsip_generic_int_hdr pjsip_expires_hdr
 
typedef pjsip_fromto_hdr pjsip_from_hdr
 
typedef pjsip_fromto_hdr pjsip_to_hdr
 
typedef pjsip_generic_int_hdr pjsip_max_fwd_hdr
 
typedef pjsip_generic_int_hdr pjsip_min_expires_hdr
 
typedef pjsip_routing_hdr pjsip_rr_hdr
 
typedef pjsip_routing_hdr pjsip_route_hdr
 
typedef pjsip_generic_array_hdr pjsip_require_hdr
 
typedef pjsip_generic_array_hdr pjsip_supported_hdr
 
typedef pjsip_generic_array_hdr pjsip_unsupported_hdr
 
typedef pjsip_generic_string_hdr pjsip_warning_hdr
 
typedef pjsip_generic_string_hdr pjsip_accept_encoding_hdr
 
typedef pjsip_generic_string_hdr pjsip_accept_lang_hdr
 
typedef pjsip_generic_string_hdr pjsip_alert_info_hdr
 
typedef pjsip_generic_string_hdr pjsip_auth_info_hdr
 
typedef pjsip_generic_string_hdr pjsip_call_info_hdr
 
typedef pjsip_generic_string_hdr pjsip_content_disposition_hdr
 
typedef pjsip_generic_string_hdr pjsip_content_encoding_hdr
 
typedef pjsip_generic_string_hdr pjsip_content_lang_hdr
 
typedef pjsip_generic_string_hdr pjsip_date_hdr
 
typedef pjsip_generic_string_hdr pjsip_err_info_hdr
 
typedef pjsip_generic_string_hdr pjsip_in_reply_to_hdr
 
typedef pjsip_generic_string_hdr pjsip_mime_version_hdr
 
typedef pjsip_generic_string_hdr pjsip_organization_hdr
 
typedef pjsip_generic_string_hdr pjsip_priority_hdr
 
typedef pjsip_generic_string_hdr pjsip_proxy_require_hdr
 
typedef pjsip_generic_string_hdr pjsip_reply_to_hdr
 
typedef pjsip_generic_string_hdr pjsip_server_hdr
 
typedef pjsip_generic_string_hdr pjsip_subject_hdr
 
typedef pjsip_generic_string_hdr pjsip_timestamp_hdr
 
typedef pjsip_generic_string_hdr pjsip_user_agent_hdr
 

Enumerations

enum  pjsip_hdr_e {
  PJSIP_H_ACCEPT , PJSIP_H_ACCEPT_ENCODING_UNIMP , PJSIP_H_ACCEPT_LANGUAGE_UNIMP , PJSIP_H_ALERT_INFO_UNIMP ,
  PJSIP_H_ALLOW , PJSIP_H_AUTHENTICATION_INFO_UNIMP , PJSIP_H_AUTHORIZATION , PJSIP_H_CALL_ID ,
  PJSIP_H_CALL_INFO_UNIMP , PJSIP_H_CONTACT , PJSIP_H_CONTENT_DISPOSITION_UNIMP , PJSIP_H_CONTENT_ENCODING_UNIMP ,
  PJSIP_H_CONTENT_LANGUAGE_UNIMP , PJSIP_H_CONTENT_LENGTH , PJSIP_H_CONTENT_TYPE , PJSIP_H_CSEQ ,
  PJSIP_H_DATE_UNIMP , PJSIP_H_ERROR_INFO_UNIMP , PJSIP_H_EXPIRES , PJSIP_H_FROM ,
  PJSIP_H_IN_REPLY_TO_UNIMP , PJSIP_H_MAX_FORWARDS , PJSIP_H_MIME_VERSION_UNIMP , PJSIP_H_MIN_EXPIRES ,
  PJSIP_H_ORGANIZATION_UNIMP , PJSIP_H_PRIORITY_UNIMP , PJSIP_H_PROXY_AUTHENTICATE , PJSIP_H_PROXY_AUTHORIZATION ,
  PJSIP_H_PROXY_REQUIRE_UNIMP , PJSIP_H_RECORD_ROUTE , PJSIP_H_REPLY_TO_UNIMP , PJSIP_H_REQUIRE ,
  PJSIP_H_RETRY_AFTER , PJSIP_H_ROUTE , PJSIP_H_SERVER_UNIMP , PJSIP_H_SUBJECT_UNIMP ,
  PJSIP_H_SUPPORTED , PJSIP_H_TIMESTAMP_UNIMP , PJSIP_H_TO , PJSIP_H_UNSUPPORTED ,
  PJSIP_H_USER_AGENT_UNIMP , PJSIP_H_VIA , PJSIP_H_WARNING_UNIMP , PJSIP_H_WWW_AUTHENTICATE ,
  PJSIP_H_OTHER
}
 

Functions

pjsip_authorization_hdrpjsip_authorization_hdr_create (pj_pool_t *pool)
 
pjsip_proxy_authorization_hdr * pjsip_proxy_authorization_hdr_create (pj_pool_t *pool)
 
pjsip_www_authenticate_hdrpjsip_www_authenticate_hdr_create (pj_pool_t *pool)
 
pjsip_proxy_authenticate_hdr * pjsip_proxy_authenticate_hdr_create (pj_pool_t *pool)
 
void * pjsip_hdr_clone (pj_pool_t *pool, const void *hdr)
 
void * pjsip_hdr_shallow_clone (pj_pool_t *pool, const void *hdr)
 
int pjsip_hdr_print_on (void *hdr, char *buf, pj_size_t len)
 
void * pjsip_hdr_find (const void *hdr_list, pjsip_hdr_e type, const void *start)
 
void * pjsip_hdr_find_by_name (const void *hdr_list, const pj_str_t *name, const void *start)
 
void * pjsip_hdr_find_by_names (const void *hdr_list, const pj_str_t *name, const pj_str_t *sname, const void *start)
 
pjsip_generic_string_hdrpjsip_generic_string_hdr_create (pj_pool_t *pool, const pj_str_t *hname, const pj_str_t *hvalue)
 
pjsip_generic_string_hdrpjsip_generic_string_hdr_init (pj_pool_t *pool, void *mem, const pj_str_t *hname, const pj_str_t *hvalue)
 
void pjsip_generic_string_hdr_init2 (pjsip_generic_string_hdr *h, pj_str_t *hname, pj_str_t *hvalue)
 
pjsip_generic_int_hdrpjsip_generic_int_hdr_create (pj_pool_t *pool, const pj_str_t *hname, unsigned hvalue)
 
pjsip_generic_int_hdrpjsip_generic_int_hdr_init (pj_pool_t *pool, void *mem, const pj_str_t *hname, unsigned value)
 
pjsip_generic_array_hdrpjsip_generic_array_hdr_create (pj_pool_t *pool, const pj_str_t *hname)
 
pjsip_generic_array_hdrpjsip_generic_array_hdr_init (pj_pool_t *pool, void *mem, const pj_str_t *hname)
 
pjsip_accept_hdrpjsip_accept_hdr_create (pj_pool_t *pool)
 
pjsip_accept_hdrpjsip_accept_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_allow_hdrpjsip_allow_hdr_create (pj_pool_t *pool)
 
pjsip_allow_hdrpjsip_allow_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_cid_hdrpjsip_cid_hdr_create (pj_pool_t *pool)
 
pjsip_cid_hdrpjsip_cid_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_clen_hdrpjsip_clen_hdr_create (pj_pool_t *pool)
 
pjsip_clen_hdrpjsip_clen_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_cseq_hdrpjsip_cseq_hdr_create (pj_pool_t *pool)
 
pjsip_cseq_hdrpjsip_cseq_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_contact_hdrpjsip_contact_hdr_create (pj_pool_t *pool)
 
pjsip_contact_hdrpjsip_contact_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_ctype_hdrpjsip_ctype_hdr_create (pj_pool_t *pool)
 
pjsip_ctype_hdrpjsip_ctype_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_expires_hdrpjsip_expires_hdr_create (pj_pool_t *pool, unsigned value)
 
pjsip_expires_hdrpjsip_expires_hdr_init (pj_pool_t *pool, void *mem, unsigned value)
 
pjsip_from_hdrpjsip_from_hdr_create (pj_pool_t *pool)
 
pjsip_from_hdrpjsip_from_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_to_hdrpjsip_to_hdr_create (pj_pool_t *pool)
 
pjsip_to_hdrpjsip_to_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_from_hdrpjsip_fromto_hdr_set_from (pjsip_fromto_hdr *hdr)
 
pjsip_to_hdrpjsip_fromto_hdr_set_to (pjsip_fromto_hdr *hdr)
 
pjsip_max_fwd_hdrpjsip_max_fwd_hdr_create (pj_pool_t *pool, unsigned value)
 
pjsip_max_fwd_hdrpjsip_max_fwd_hdr_init (pj_pool_t *pool, void *mem, unsigned value)
 
pjsip_min_expires_hdrpjsip_min_expires_hdr_create (pj_pool_t *pool, unsigned value)
 
pjsip_min_expires_hdrpjsip_min_expires_hdr_init (pj_pool_t *pool, void *mem, unsigned value)
 
pjsip_rr_hdrpjsip_rr_hdr_create (pj_pool_t *pool)
 
pjsip_rr_hdrpjsip_rr_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_route_hdrpjsip_route_hdr_create (pj_pool_t *pool)
 
pjsip_route_hdrpjsip_route_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_rr_hdrpjsip_routing_hdr_set_rr (pjsip_routing_hdr *r)
 
pjsip_route_hdrpjsip_routing_hdr_set_route (pjsip_routing_hdr *r)
 
pjsip_require_hdrpjsip_require_hdr_create (pj_pool_t *pool)
 
pjsip_require_hdrpjsip_require_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_retry_after_hdrpjsip_retry_after_hdr_create (pj_pool_t *pool, int value)
 
pjsip_retry_after_hdrpjsip_retry_after_hdr_init (pj_pool_t *pool, void *mem, int value)
 
pjsip_supported_hdrpjsip_supported_hdr_create (pj_pool_t *pool)
 
pjsip_supported_hdrpjsip_supported_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_unsupported_hdrpjsip_unsupported_hdr_create (pj_pool_t *pool)
 
pjsip_unsupported_hdrpjsip_unsupported_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_via_hdrpjsip_via_hdr_create (pj_pool_t *pool)
 
pjsip_via_hdrpjsip_via_hdr_init (pj_pool_t *pool, void *mem)
 
pjsip_warning_hdrpjsip_warning_hdr_create (pj_pool_t *pool, int code, const pj_str_t *host, const pj_str_t *text)
 
pjsip_warning_hdrpjsip_warning_hdr_create_from_status (pj_pool_t *pool, const pj_str_t *host, pj_status_t status)
 

Detailed Description

Macro Definition Documentation

◆ PJSIP_DECL_HDR_MEMBER

#define PJSIP_DECL_HDR_MEMBER (   hdr)
Value:
\
PJ_DECL_LIST_MEMBER(hdr); \ \
pjsip_hdr_e type; \ \
pj_str_t name; \ \
pj_str_t sname; \ \
pjsip_hdr_vptr *vptr

Generic fields for all SIP headers are declared using this macro, to make sure that all headers will have exactly the same layout in their start of the storage. This behaves like C++ inheritance actually.

◆ PJSIP_GENERIC_ARRAY_MAX_COUNT

#define PJSIP_GENERIC_ARRAY_MAX_COUNT   32

Maximum elements in the header array.

◆ PJSIP_MAX_ACCEPT_COUNT

#define PJSIP_MAX_ACCEPT_COUNT   PJSIP_GENERIC_ARRAY_MAX_COUNT

Maximum fields in Accept header.

◆ PJSIP_EXPIRES_NOT_SPECIFIED

#define PJSIP_EXPIRES_NOT_SPECIFIED   ((pj_uint32_t)0xFFFFFFFFUL)

Expires not specified.

◆ pjsip_accept_encoding_hdr_create

#define pjsip_accept_encoding_hdr_create   pjsip_generic_string_hdr_create

Create Accept-Encoding header.

◆ pjsip_accept_lang_hdr_create

#define pjsip_accept_lang_hdr_create   pjsip_generic_string_hdr_create

Create Accept-Language header.

◆ pjsip_alert_info_hdr_create

#define pjsip_alert_info_hdr_create   pjsip_generic_string_hdr_create

Create Alert-Info header.

◆ pjsip_auth_info_hdr_create

#define pjsip_auth_info_hdr_create   pjsip_generic_string_hdr_create

Create Authentication-Info header.

◆ pjsip_call_info_hdr_create

#define pjsip_call_info_hdr_create   pjsip_generic_string_hdr_create

Create Call-Info header.

◆ pjsip_content_disposition_hdr_create

#define pjsip_content_disposition_hdr_create   pjsip_generic_string_hdr_create

Create Content-Disposition header.

◆ pjsip_content_encoding_hdr_create

#define pjsip_content_encoding_hdr_create   pjsip_generic_string_hdr_create

Create Content-Encoding header.

◆ pjsip_content_lang_hdr_create

#define pjsip_content_lang_hdr_create   pjsip_generic_string_hdr_create

Create Content-Language header.

◆ pjsip_date_hdr_create

#define pjsip_date_hdr_create   pjsip_generic_string_hdr_create

Create Date header.

◆ pjsip_err_info_hdr_create

#define pjsip_err_info_hdr_create   pjsip_generic_string_hdr_create

Create Error-Info header.

◆ pjsip_in_reply_to_hdr_create

#define pjsip_in_reply_to_hdr_create   pjsip_generic_string_hdr_create

Create In-Reply-To header.

◆ pjsip_mime_version_hdr_create

#define pjsip_mime_version_hdr_create   pjsip_generic_string_hdr_create

Create MIME-Version header.

◆ pjsip_organization_hdr_create

#define pjsip_organization_hdr_create   pjsip_genric_string_hdr_create

Create Organization header.

◆ pjsip_priority_hdr_create

#define pjsip_priority_hdr_create   pjsip_generic_string_hdr_create

Create Priority header.

◆ pjsip_reply_to_hdr_create

#define pjsip_reply_to_hdr_create   pjsip_generic_string_hdr_create

Create Reply-To header.

◆ pjsip_server_hdr_create

#define pjsip_server_hdr_create   pjsip_generic_string_hdr_create

Create Server header.

◆ pjsip_subject_hdr_create

#define pjsip_subject_hdr_create   pjsip_generic_string_hdr_create

Create Subject header.

◆ pjsip_timestamp_hdr_create

#define pjsip_timestamp_hdr_create   pjsip_generic_string_hdr_create

Create Timestamp header.

◆ pjsip_user_agent_hdr_create

#define pjsip_user_agent_hdr_create   pjsip_generic_string_hdr_create

Create User-Agent header.

Typedef Documentation

◆ pjsip_accept_hdr

Accept header.

◆ pjsip_allow_hdr

◆ pjsip_expires_hdr

Expires header.

◆ pjsip_from_hdr

Alias for From header.

◆ pjsip_to_hdr

Alias for To header.

◆ pjsip_max_fwd_hdr

Max-Forwards header.

◆ pjsip_min_expires_hdr

Min-Expires header.

◆ pjsip_rr_hdr

Alias for Record-Route header.

◆ pjsip_route_hdr

Alias for Route header.

◆ pjsip_require_hdr

Require header.

◆ pjsip_supported_hdr

Supported header.

◆ pjsip_unsupported_hdr

Unsupported header.

◆ pjsip_warning_hdr

SIP Warning header. In this version, Warning header is just a typedef for generic string header.

◆ pjsip_accept_encoding_hdr

Accept-Encoding header.

◆ pjsip_accept_lang_hdr

Accept-Language header.

◆ pjsip_alert_info_hdr

Alert-Info header.

◆ pjsip_auth_info_hdr

Authentication-Info header.

◆ pjsip_call_info_hdr

Call-Info header.

◆ pjsip_content_disposition_hdr

Content-Disposition header.

◆ pjsip_content_encoding_hdr

Content-Encoding header.

◆ pjsip_content_lang_hdr

Content-Language header.

◆ pjsip_date_hdr

◆ pjsip_err_info_hdr

Error-Info header.

◆ pjsip_in_reply_to_hdr

In-Reply-To header.

◆ pjsip_mime_version_hdr

MIME-Version header.

◆ pjsip_organization_hdr

Organization header.

◆ pjsip_priority_hdr

Priority header.

◆ pjsip_proxy_require_hdr

Proxy-Require header.

◆ pjsip_reply_to_hdr

Reply-To header.

◆ pjsip_server_hdr

◆ pjsip_subject_hdr

◆ pjsip_timestamp_hdr

Timestamp header.

◆ pjsip_user_agent_hdr

User-Agent header.

Enumeration Type Documentation

◆ pjsip_hdr_e

Header types, as defined by RFC3261.

Function Documentation

◆ pjsip_authorization_hdr_create()

pjsip_authorization_hdr * pjsip_authorization_hdr_create ( pj_pool_t pool)

Create SIP Authorization header.

Parameters
poolPool where memory will be allocated from.
Returns
SIP Authorization header.

◆ pjsip_proxy_authorization_hdr_create()

pjsip_proxy_authorization_hdr * pjsip_proxy_authorization_hdr_create ( pj_pool_t pool)

Create SIP Proxy-Authorization header.

Parameters
poolPool where memory will be allocated from.
Returns
SIP Proxy-Authorization header.

◆ pjsip_www_authenticate_hdr_create()

pjsip_www_authenticate_hdr * pjsip_www_authenticate_hdr_create ( pj_pool_t pool)

Create SIP WWW-Authenticate header.

Parameters
poolPool where memory will be allocated from.
Returns
SIP WWW-Authenticate header.

◆ pjsip_proxy_authenticate_hdr_create()

pjsip_proxy_authenticate_hdr * pjsip_proxy_authenticate_hdr_create ( pj_pool_t pool)

Create SIP Proxy-Authenticate header.

Parameters
poolPool where memory will be allocated from.
Returns
SIP Proxy-Authenticate header.

◆ pjsip_hdr_clone()

void * pjsip_hdr_clone ( pj_pool_t pool,
const void *  hdr 
)

This generic function will clone any header, by calling "clone" function in header's virtual function table.

Parameters
poolThe pool to allocate memory from.
hdrThe header to clone.
Returns
A new instance copied from the original header.

◆ pjsip_hdr_shallow_clone()

void * pjsip_hdr_shallow_clone ( pj_pool_t pool,
const void *  hdr 
)

This generic function will clone any header, by calling "shallow_clone" function in header's virtual function table.

Parameters
poolThe pool to allocate memory from.
hdrThe header to clone.
Returns
A new instance copied from the original header.

◆ pjsip_hdr_print_on()

int pjsip_hdr_print_on ( void *  hdr,
char *  buf,
pj_size_t  len 
)

This generic function will print any header, by calling "print" function in header's virtual function table.

Parameters
hdrThe header to print.
bufThe buffer.
lenThe size of the buffer.
Returns
The size copied to buffer, or -1 if there's not enough space.

◆ pjsip_hdr_find()

void * pjsip_hdr_find ( const void *  hdr_list,
pjsip_hdr_e  type,
const void *  start 
)

Find a header in a header list by the header type.

Parameters
hdr_listThe "head" of the header list.
typeThe header type to find.
startThe first header field where the search should begin. If NULL is specified, then the search will begin from the first header, otherwise the search will begin at the specified header.
Returns
The header field, or NULL if no header with the specified type is found.

◆ pjsip_hdr_find_by_name()

void * pjsip_hdr_find_by_name ( const void *  hdr_list,
const pj_str_t name,
const void *  start 
)

Find a header in a header list by its name.

Parameters
hdr_listThe "head" of the header list.
nameThe header name to find.
startThe first header field where the search should begin. If NULL is specified, then the search will begin from the first header, otherwise the search will begin at the specified header.
Returns
The header field, or NULL if no header with the specified type is found.

◆ pjsip_hdr_find_by_names()

void * pjsip_hdr_find_by_names ( const void *  hdr_list,
const pj_str_t name,
const pj_str_t sname,
const void *  start 
)

Find a header in a header list by its name and short name version.

Parameters
hdr_listThe "head" of the header list.
nameThe header name to find.
snameThe short name version of the header name.
startThe first header field where the search should begin. If NULL is specified, then the search will begin from the first header, otherwise the search will begin at the specified header.
Returns
The header field, or NULL if no header with the specified type is found.

◆ pjsip_generic_string_hdr_create()

pjsip_generic_string_hdr * pjsip_generic_string_hdr_create ( pj_pool_t pool,
const pj_str_t hname,
const pj_str_t hvalue 
)

Create a new instance of generic header. A generic header can have an arbitrary header name.

Parameters
poolThe pool.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string.
hvalueOptional string to be assigned as the value.
Returns
The header, or THROW exception.

◆ pjsip_generic_string_hdr_init()

pjsip_generic_string_hdr * pjsip_generic_string_hdr_init ( pj_pool_t pool,
void *  mem,
const pj_str_t hname,
const pj_str_t hvalue 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string later.
hvalueOptional string to be assigned as the value.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_generic_string_hdr_init2()

void pjsip_generic_string_hdr_init2 ( pjsip_generic_string_hdr h,
pj_str_t hname,
pj_str_t hvalue 
)

Construct a generic string header without allocating memory from the pool. This function is useful to create a temporary header which life-time is very short (for example, creating the header in the stack to be passed as argument to a function which will copy the header).

Parameters
hThe header to be initialized.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string.
hvalueOptional string to be assigned as the value.

◆ pjsip_generic_int_hdr_create()

pjsip_generic_int_hdr * pjsip_generic_int_hdr_create ( pj_pool_t pool,
const pj_str_t hname,
unsigned  hvalue 
)

Create a new instance of generic header. A generic header can have an arbitrary header name.

Parameters
poolThe pool.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string.
hvalueThe value to be assigned to the header.
Returns
The header, or THROW exception.

◆ pjsip_generic_int_hdr_init()

pjsip_generic_int_hdr * pjsip_generic_int_hdr_init ( pj_pool_t pool,
void *  mem,
const pj_str_t hname,
unsigned  value 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string later.
valueValue to be assigned to the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_generic_array_hdr_create()

pjsip_generic_array_hdr * pjsip_generic_array_hdr_create ( pj_pool_t pool,
const pj_str_t hname 
)

Create generic array header.

Parameters
poolPool to allocate memory from.
hnameHeader name.
Returns
New generic array header.

◆ pjsip_generic_array_hdr_init()

pjsip_generic_array_hdr * pjsip_generic_array_hdr_init ( pj_pool_t pool,
void *  mem,
const pj_str_t hname 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
hnameThe header name to be assigned to the header, or NULL to assign the header name with some string later.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_accept_hdr_create()

pjsip_accept_hdr * pjsip_accept_hdr_create ( pj_pool_t pool)

Create new Accept header instance.

Parameters
poolThe pool.
Returns
New Accept header instance.

◆ pjsip_accept_hdr_init()

pjsip_accept_hdr * pjsip_accept_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_allow_hdr_create()

pjsip_allow_hdr * pjsip_allow_hdr_create ( pj_pool_t pool)

Create new Allow header instance.

Parameters
poolThe pool.
Returns
New Allow header instance.

◆ pjsip_allow_hdr_init()

pjsip_allow_hdr * pjsip_allow_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_cid_hdr_create()

pjsip_cid_hdr * pjsip_cid_hdr_create ( pj_pool_t pool)

Create new Call-ID header.

Parameters
poolThe pool.
Returns
new Call-ID header.

◆ pjsip_cid_hdr_init()

pjsip_cid_hdr * pjsip_cid_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_clen_hdr_create()

pjsip_clen_hdr * pjsip_clen_hdr_create ( pj_pool_t pool)

Create new Content-Length header.

Parameters
poolthe pool.
Returns
A new Content-Length header instance.

◆ pjsip_clen_hdr_init()

pjsip_clen_hdr * pjsip_clen_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_cseq_hdr_create()

pjsip_cseq_hdr * pjsip_cseq_hdr_create ( pj_pool_t pool)

Create new CSeq header.

Parameters
poolThe pool.
Returns
A new CSeq header instance.

◆ pjsip_cseq_hdr_init()

pjsip_cseq_hdr * pjsip_cseq_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_contact_hdr_create()

pjsip_contact_hdr * pjsip_contact_hdr_create ( pj_pool_t pool)

Create a new Contact header.

Parameters
poolThe pool.
Returns
A new instance of Contact header.

◆ pjsip_contact_hdr_init()

pjsip_contact_hdr * pjsip_contact_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_ctype_hdr_create()

pjsip_ctype_hdr * pjsip_ctype_hdr_create ( pj_pool_t pool)

Create a nwe Content Type header.

Parameters
poolThe pool.
Returns
A new Content-Type header.

◆ pjsip_ctype_hdr_init()

pjsip_ctype_hdr * pjsip_ctype_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_expires_hdr_create()

pjsip_expires_hdr * pjsip_expires_hdr_create ( pj_pool_t pool,
unsigned  value 
)

Create a new Expires header.

Parameters
poolThe pool.
valueThe expiration value.
Returns
A new Expires header.

◆ pjsip_expires_hdr_init()

pjsip_expires_hdr * pjsip_expires_hdr_init ( pj_pool_t pool,
void *  mem,
unsigned  value 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
valueThe expiration value.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_from_hdr_create()

pjsip_from_hdr * pjsip_from_hdr_create ( pj_pool_t pool)

Create a From header.

Parameters
poolThe pool.
Returns
New instance of From header.

◆ pjsip_from_hdr_init()

pjsip_from_hdr * pjsip_from_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_to_hdr_create()

pjsip_to_hdr * pjsip_to_hdr_create ( pj_pool_t pool)

Create a To header.

Parameters
poolThe pool.
Returns
New instance of To header.

◆ pjsip_to_hdr_init()

pjsip_to_hdr * pjsip_to_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_fromto_hdr_set_from()

pjsip_from_hdr * pjsip_fromto_hdr_set_from ( pjsip_fromto_hdr hdr)

Convert the header to a From header.

Parameters
hdrThe generic from/to header.
Returns
"From" header.

◆ pjsip_fromto_hdr_set_to()

pjsip_to_hdr * pjsip_fromto_hdr_set_to ( pjsip_fromto_hdr hdr)

Convert the header to a To header.

Parameters
hdrThe generic from/to header.
Returns
"To" header.

◆ pjsip_max_fwd_hdr_create()

pjsip_max_fwd_hdr * pjsip_max_fwd_hdr_create ( pj_pool_t pool,
unsigned  value 
)

Create new Max-Forwards header instance.

Parameters
poolThe pool.
valueThe Max-Forwards value.
Returns
New Max-Forwards header instance.

◆ pjsip_max_fwd_hdr_init()

pjsip_max_fwd_hdr * pjsip_max_fwd_hdr_init ( pj_pool_t pool,
void *  mem,
unsigned  value 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
valueThe Max-Forwards value.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_min_expires_hdr_create()

pjsip_min_expires_hdr * pjsip_min_expires_hdr_create ( pj_pool_t pool,
unsigned  value 
)

Create new Min-Expires header instance.

Parameters
poolThe pool.
valueThe Min-Expires value.
Returns
New Min-Expires header instance.

◆ pjsip_min_expires_hdr_init()

pjsip_min_expires_hdr * pjsip_min_expires_hdr_init ( pj_pool_t pool,
void *  mem,
unsigned  value 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
valueThe Min-Expires value.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_rr_hdr_create()

pjsip_rr_hdr * pjsip_rr_hdr_create ( pj_pool_t pool)

Create new Record-Route header from the pool.

Parameters
poolThe pool.
Returns
A new instance of Record-Route header.

◆ pjsip_rr_hdr_init()

pjsip_rr_hdr * pjsip_rr_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_route_hdr_create()

pjsip_route_hdr * pjsip_route_hdr_create ( pj_pool_t pool)

Create new Route header from the pool.

Parameters
poolThe pool.
Returns
A new instance of "Route" header.

◆ pjsip_route_hdr_init()

pjsip_route_hdr * pjsip_route_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_routing_hdr_set_rr()

pjsip_rr_hdr * pjsip_routing_hdr_set_rr ( pjsip_routing_hdr r)

Convert generic routing header to Record-Route header.

Parameters
rThe generic routing header, or a "Routing" header.
Returns
Record-Route header.

◆ pjsip_routing_hdr_set_route()

pjsip_route_hdr * pjsip_routing_hdr_set_route ( pjsip_routing_hdr r)

Convert generic routing header to "Route" header.

Parameters
rThe generic routing header, or a "Record-Route" header.
Returns
"Route" header.

◆ pjsip_require_hdr_create()

pjsip_require_hdr * pjsip_require_hdr_create ( pj_pool_t pool)

Create new Require header instance.

Parameters
poolThe pool.
Returns
New Require header instance.

◆ pjsip_require_hdr_init()

pjsip_require_hdr * pjsip_require_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure. This function should only be called when application uses its own memory allocation to allocate memory block for the specified header (e.g. in C++, when the header is allocated with "new" operator). For normal applications, they should use pjsip_xxx_hdr_create() instead, which allocates memory and initialize it in one go.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_retry_after_hdr_create()

pjsip_retry_after_hdr * pjsip_retry_after_hdr_create ( pj_pool_t pool,
int  value 
)

Create new Retry-After header instance.

Parameters
poolThe pool.
valueThe Retry-After value.
Returns
New Retry-After header instance.

◆ pjsip_retry_after_hdr_init()

pjsip_retry_after_hdr * pjsip_retry_after_hdr_init ( pj_pool_t pool,
void *  mem,
int  value 
)

Initialize a preallocated memory with the header structure.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
valueThe Retry-After value.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_supported_hdr_create()

pjsip_supported_hdr * pjsip_supported_hdr_create ( pj_pool_t pool)

Create new Supported header instance.

Parameters
poolThe pool.
Returns
New Supported header instance.

◆ pjsip_supported_hdr_init()

pjsip_supported_hdr * pjsip_supported_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_unsupported_hdr_create()

pjsip_unsupported_hdr * pjsip_unsupported_hdr_create ( pj_pool_t pool)

Create new Unsupported header instance.

Parameters
poolThe pool.
Returns
New Unsupported header instance.

◆ pjsip_unsupported_hdr_init()

pjsip_unsupported_hdr * pjsip_unsupported_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_via_hdr_create()

pjsip_via_hdr * pjsip_via_hdr_create ( pj_pool_t pool)

Create a new Via header.

Parameters
poolThe pool.
Returns
A new "Via" header instance.

◆ pjsip_via_hdr_init()

pjsip_via_hdr * pjsip_via_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters
poolPool for additional memory allocation if required.
memPre-allocated memory to be initialized as the header.
Returns
The header instance, which points to the same memory location as the mem argument.

◆ pjsip_warning_hdr_create()

pjsip_warning_hdr * pjsip_warning_hdr_create ( pj_pool_t pool,
int  code,
const pj_str_t host,
const pj_str_t text 
)

Create a warning header with the specified contents.

Parameters
poolPool to allocate memory from.
codeWarning code, 300-399.
hostThe host portion of the Warning header.
textThe warning text, which MUST not be quoted with double quote.
Returns
The Warning header field.

◆ pjsip_warning_hdr_create_from_status()

pjsip_warning_hdr * pjsip_warning_hdr_create_from_status ( pj_pool_t pool,
const pj_str_t host,
pj_status_t  status 
)

Create a warning header and initialize the contents from the error message for the specified status code. The warning code will be set to 399.

Parameters
poolPool to allocate memory from.
hostThe host portion of the Warning header.
statusThe error status code, which error text will be put in as the Warning text.
Returns
The Warning header field.

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.