pjsip logo pjsip.org
Open source SIP stack and media stack for presence, im/instant messaging, and multimedia communication
Loading

HOME

SIP/media Features
High Performance SIP
Small Footprint SIP
Symbian Port

FAQ

Documentation

Licensing

Download

Development (Trac)

Projects using pjsip

Mailing List

Open Source Links


About: PJLIB, PJLIB-UTIL, PJSIP, and PJMEDIA are created by: Benny Prijono
<bennylp@pjsip.org>


 

Home --> Documentations --> PJSIP Reference

Header Fields
[Messaging Elements]

Declarations for various SIP header fields.

Data Structures

struct  pjsip_common_credential
struct  pjsip_digest_credential
struct  pjsip_pgp_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

Defines

#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_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)
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, int hvalue)
pjsip_generic_int_hdrpjsip_generic_int_hdr_init (pj_pool_t *pool, void *mem, const pj_str_t *hname, int 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, int value)
pjsip_expires_hdrpjsip_expires_hdr_init (pj_pool_t *pool, void *mem, int 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, int value)
pjsip_max_fwd_hdrpjsip_max_fwd_hdr_init (pj_pool_t *pool, void *mem, int value)
pjsip_min_expires_hdrpjsip_min_expires_hdr_create (pj_pool_t *pool, int value)
pjsip_min_expires_hdrpjsip_min_expires_hdr_init (pj_pool_t *pool, void *mem, int 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)

Define Documentation

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

#define PJSIP_GENERIC_ARRAY_MAX_COUNT   32

Maximum elements in the header array.

#define PJSIP_MAX_ACCEPT_COUNT   PJSIP_GENERIC_ARRAY_MAX_COUNT

Maximum fields in Accept header.

#define pjsip_accept_encoding_hdr_create   pjsip_generic_string_hdr_create

Create Accept-Encoding header.

#define pjsip_accept_lang_hdr_create   pjsip_generic_string_hdr_create

Create Accept-Language header.

#define pjsip_alert_info_hdr_create   pjsip_generic_string_hdr_create

Create Alert-Info header.

#define pjsip_auth_info_hdr_create   pjsip_generic_string_hdr_create

Create Authentication-Info header.

#define pjsip_call_info_hdr_create   pjsip_generic_string_hdr_create

Create Call-Info header.

#define pjsip_content_disposition_hdr_create   pjsip_generic_string_hdr_create

Create Content-Disposition header.

#define pjsip_content_encoding_hdr_create   pjsip_generic_string_hdr_create

Create Content-Encoding header.

#define pjsip_content_lang_hdr_create   pjsip_generic_string_hdr_create

Create Content-Language header.

#define pjsip_date_hdr_create   pjsip_generic_string_hdr_create

Create Date header.

#define pjsip_err_info_hdr_create   pjsip_generic_string_hdr_create

Create Error-Info header.

#define pjsip_in_reply_to_hdr_create   pjsip_generic_string_hdr_create

Create In-Reply-To header.

#define pjsip_mime_version_hdr_create   pjsip_generic_string_hdr_create

Create MIME-Version header.

#define pjsip_organization_hdr_create   pjsip_genric_string_hdr_create

Create Organization header.

#define pjsip_priority_hdr_create   pjsip_generic_string_hdr_create

Create Priority header.

#define pjsip_reply_to_hdr_create   pjsip_generic_string_hdr_create

Create Reply-To header.

#define pjsip_server_hdr_create   pjsip_generic_string_hdr_create

Create Server header.

#define pjsip_subject_hdr_create   pjsip_generic_string_hdr_create

Create Subject header.

#define pjsip_timestamp_hdr_create   pjsip_generic_string_hdr_create

Create Timestamp header.

#define pjsip_user_agent_hdr_create   pjsip_generic_string_hdr_create

Create User-Agent header.


Typedef Documentation

Accept header.

Expires header.

Alias for From header.

Alias for To header.

Max-Forwards header.

Min-Expires header.

Alias for Record-Route header.

Alias for Route header.

Require header.

Supported header.

Unsupported header.

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

Accept-Encoding header.

Accept-Language header.

Alert-Info header.

Authentication-Info header.

Call-Info header.

Content-Disposition header.

Content-Encoding header.

Content-Language header.

Error-Info header.

In-Reply-To header.

MIME-Version header.

Organization header.

Priority header.

Proxy-Require header.

Reply-To header.

Timestamp header.

User-Agent header.


Enumeration Type Documentation

Header types, as defined by RFC3261.


Function Documentation

pjsip_authorization_hdr* pjsip_authorization_hdr_create ( pj_pool_t pool  ) 

Create SIP Authorization header.

Parameters:
pool Pool where memory will be allocated from.
Returns:
SIP Authorization header.
pjsip_proxy_authorization_hdr* pjsip_proxy_authorization_hdr_create ( pj_pool_t pool  ) 

Create SIP Proxy-Authorization header.

Parameters:
pool Pool where memory will be allocated from.
Returns:
SIP Proxy-Authorization header.
pjsip_www_authenticate_hdr* pjsip_www_authenticate_hdr_create ( pj_pool_t pool  ) 

Create SIP WWW-Authenticate header.

Parameters:
pool Pool where memory will be allocated from.
Returns:
SIP WWW-Authenticate header.
pjsip_proxy_authenticate_hdr* pjsip_proxy_authenticate_hdr_create ( pj_pool_t pool  ) 

Create SIP Proxy-Authenticate header.

Parameters:
pool Pool where memory will be allocated from.
Returns:
SIP Proxy-Authenticate header.
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:
pool The pool to allocate memory from.
hdr The header to clone.
Returns:
A new instance copied from the original header.
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:
pool The pool to allocate memory from.
hdr The header to clone.
Returns:
A new instance copied from the original header.
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:
hdr The header to print.
buf The buffer.
len The size of the buffer.
Returns:
The size copied to buffer, or -1 if there's not enough space.
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:
pool The pool.
hname The header name to be assigned to the header, or NULL to assign the header name with some string.
hvalue Optional string to be assigned as the value.
Returns:
The header, or THROW exception.
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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
hname The header name to be assigned to the header, or NULL to assign the header name with some string later.
hvalue Optional string to be assigned as the value.
Returns:
The header instance, which points to the same memory location as the mem argument.
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:
h The header to be initialized.
hname The header name to be assigned to the header, or NULL to assign the header name with some string.
hvalue Optional string to be assigned as the value.
Returns:
The header, or THROW exception.
pjsip_generic_int_hdr* pjsip_generic_int_hdr_create ( pj_pool_t pool,
const pj_str_t hname,
int  hvalue 
)

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

Parameters:
pool The pool.
hname The header name to be assigned to the header, or NULL to assign the header name with some string.
hvalue The value to be assigned to the header.
Returns:
The header, or THROW exception.
pjsip_generic_int_hdr* pjsip_generic_int_hdr_init ( pj_pool_t pool,
void *  mem,
const pj_str_t hname,
int  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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
hname The header name to be assigned to the header, or NULL to assign the header name with some string later.
value Value 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* pjsip_generic_array_hdr_create ( pj_pool_t pool,
const pj_str_t hname 
)

Create generic array header.

Parameters:
pool Pool to allocate memory from.
hname Header name.
Returns:
New generic array header.
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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
hname The 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* pjsip_accept_hdr_create ( pj_pool_t pool  ) 

Create new Accept header instance.

Parameters:
pool The pool.
Returns:
New Accept header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_allow_hdr_create ( pj_pool_t pool  ) 

Create new Allow header instance.

Parameters:
pool The pool.
Returns:
New Allow header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_cid_hdr_create ( pj_pool_t pool  ) 

Create new Call-ID header.

Parameters:
pool The pool.
Returns:
new Call-ID header.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_clen_hdr_create ( pj_pool_t pool  ) 

Create new Content-Length header.

Parameters:
pool the pool.
Returns:
A new Content-Length header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_cseq_hdr_create ( pj_pool_t pool  ) 

Create new CSeq header.

Parameters:
pool The pool.
Returns:
A new CSeq header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_contact_hdr_create ( pj_pool_t pool  ) 

Create a new Contact header.

Parameters:
pool The pool.
Returns:
A new instance of Contact header.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_ctype_hdr_create ( pj_pool_t pool  ) 

Create a nwe Content Type header.

Parameters:
pool The pool.
Returns:
A new Content-Type header.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_expires_hdr_create ( pj_pool_t pool,
int  value 
)

Create a new Expires header.

Parameters:
pool The pool.
value The expiration value.
Returns:
A new Expires header.
pjsip_expires_hdr* pjsip_expires_hdr_init ( pj_pool_t pool,
void *  mem,
int  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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
value The expiration value.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_from_hdr* pjsip_from_hdr_create ( pj_pool_t pool  ) 

Create a From header.

Parameters:
pool The pool.
Returns:
New instance of From header.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_to_hdr_create ( pj_pool_t pool  ) 

Create a To header.

Parameters:
pool The pool.
Returns:
New instance of To header.
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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_from_hdr* pjsip_fromto_hdr_set_from ( pjsip_fromto_hdr hdr  ) 

Convert the header to a From header.

Parameters:
hdr The generic from/to header.
Returns:
"From" header.
pjsip_to_hdr* pjsip_fromto_hdr_set_to ( pjsip_fromto_hdr hdr  ) 

Convert the header to a To header.

Parameters:
hdr The generic from/to header.
Returns:
"To" header.
pjsip_max_fwd_hdr* pjsip_max_fwd_hdr_create ( pj_pool_t pool,
int  value 
)

Create new Max-Forwards header instance.

Parameters:
pool The pool.
value The Max-Forwards value.
Returns:
New Max-Forwards header instance.
pjsip_max_fwd_hdr* pjsip_max_fwd_hdr_init ( pj_pool_t pool,
void *  mem,
int  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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
value The Max-Forwards value.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_min_expires_hdr* pjsip_min_expires_hdr_create ( pj_pool_t pool,
int  value 
)

Create new Min-Expires header instance.

Parameters:
pool The pool.
value The Min-Expires value.
Returns:
New Min-Expires header instance.
pjsip_min_expires_hdr* pjsip_min_expires_hdr_init ( pj_pool_t pool,
void *  mem,
int  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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
value The Min-Expires value.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_rr_hdr* pjsip_rr_hdr_create ( pj_pool_t pool  ) 

Create new Record-Route header from the pool.

Parameters:
pool The pool.
Returns:
A new instance of Record-Route header.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_route_hdr_create ( pj_pool_t pool  ) 

Create new Route header from the pool.

Parameters:
pool The pool.
Returns:
A new instance of "Route" header.
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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_rr_hdr* pjsip_routing_hdr_set_rr ( pjsip_routing_hdr r  ) 

Convert generic routing header to Record-Route header.

Parameters:
r The generic routing header, or a "Routing" header.
Returns:
Record-Route header.
pjsip_route_hdr* pjsip_routing_hdr_set_route ( pjsip_routing_hdr r  ) 

Convert generic routing header to "Route" header.

Parameters:
r The generic routing header, or a "Record-Route" header.
Returns:
"Route" header.
pjsip_require_hdr* pjsip_require_hdr_create ( pj_pool_t pool  ) 

Create new Require header instance.

Parameters:
pool The pool.
Returns:
New Require header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_retry_after_hdr_create ( pj_pool_t pool,
int  value 
)

Create new Retry-After header instance.

Parameters:
pool The pool.
value The Retry-After value.
Returns:
New Retry-After header instance.
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:
pool Pool for additional memory allocation if required.
mem Pre-allocated memory to be initialized as the header.
value The Retry-After value.
Returns:
The header instance, which points to the same memory location as the mem argument.
pjsip_supported_hdr* pjsip_supported_hdr_create ( pj_pool_t pool  ) 

Create new Supported header instance.

Parameters:
pool The pool.
Returns:
New Supported header instance.
pjsip_supported_hdr* pjsip_supported_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_unsupported_hdr_create ( pj_pool_t pool  ) 

Create new Unsupported header instance.

Parameters:
pool The pool.
Returns:
New Unsupported header instance.
pjsip_unsupported_hdr* pjsip_unsupported_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters:
pool Pool for additional memory allocation if required.
mem Pre-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* pjsip_via_hdr_create ( pj_pool_t pool  ) 

Create a new Via header.

Parameters:
pool The pool.
Returns:
A new "Via" header instance.
pjsip_via_hdr* pjsip_via_hdr_init ( pj_pool_t pool,
void *  mem 
)

Initialize a preallocated memory with the header structure.

Parameters:
pool Pool for additional memory allocation if required.
mem Pre-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* 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:
pool Pool to allocate memory from.
code Warning code, 300-399.
host The host portion of the Warning header.
text The warning text, which MUST not be quoted with double quote.
Returns:
The Warning header field.
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:
pool Pool to allocate memory from.
host The host portion of the Warning header.
status The 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.