BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJSIP Reference

sip_msg.h File Reference

SIP Message Structure. More...

#include <pjsip/sip_types.h>
#include <pjsip/sip_uri.h>
#include <pj/list.h>

Data Structures

struct  pjsip_method
 
struct  pjsip_hdr_vptr
 
struct  pjsip_hdr
 
struct  pjsip_request_line
 
struct  pjsip_status_line
 
struct  pjsip_media_type
 
struct  pjsip_msg_body
 
struct  pjsip_msg
 
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_IS_STATUS_IN_CLASS(status_code, code_class)   (status_code/100 == code_class/100)
 
#define PJSIP_MSG_CID_HDR(msg)   ((pjsip_cid_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CALL_ID, NULL))
 
#define PJSIP_MSG_CSEQ_HDR(msg)   ((pjsip_cseq_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL))
 
#define PJSIP_MSG_FROM_HDR(msg)   ((pjsip_from_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_FROM, NULL))
 
#define PJSIP_MSG_TO_HDR(msg)   ((pjsip_to_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_TO, NULL))
 
#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_method_e {
  PJSIP_INVITE_METHOD, PJSIP_CANCEL_METHOD, PJSIP_ACK_METHOD, PJSIP_BYE_METHOD,
  PJSIP_REGISTER_METHOD, PJSIP_OPTIONS_METHOD, PJSIP_OTHER_METHOD
}
 
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
}
 
enum  pjsip_status_code {
  PJSIP_SC_NULL = 0, PJSIP_SC_TRYING = 100, PJSIP_SC_RINGING = 180, PJSIP_SC_CALL_BEING_FORWARDED = 181,
  PJSIP_SC_QUEUED = 182, PJSIP_SC_PROGRESS = 183, PJSIP_SC_OK = 200, PJSIP_SC_ACCEPTED = 202,
  PJSIP_SC_MULTIPLE_CHOICES = 300, PJSIP_SC_MOVED_PERMANENTLY = 301, PJSIP_SC_MOVED_TEMPORARILY = 302, PJSIP_SC_USE_PROXY = 305,
  PJSIP_SC_ALTERNATIVE_SERVICE = 380, PJSIP_SC_BAD_REQUEST = 400, PJSIP_SC_UNAUTHORIZED = 401, PJSIP_SC_PAYMENT_REQUIRED = 402,
  PJSIP_SC_FORBIDDEN = 403, PJSIP_SC_NOT_FOUND = 404, PJSIP_SC_METHOD_NOT_ALLOWED = 405, PJSIP_SC_NOT_ACCEPTABLE = 406,
  PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED = 407, PJSIP_SC_REQUEST_TIMEOUT = 408, PJSIP_SC_GONE = 410, PJSIP_SC_REQUEST_ENTITY_TOO_LARGE = 413,
  PJSIP_SC_REQUEST_URI_TOO_LONG = 414, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE = 415, PJSIP_SC_UNSUPPORTED_URI_SCHEME = 416, PJSIP_SC_BAD_EXTENSION = 420,
  PJSIP_SC_EXTENSION_REQUIRED = 421, PJSIP_SC_SESSION_TIMER_TOO_SMALL = 422, PJSIP_SC_INTERVAL_TOO_BRIEF = 423, PJSIP_SC_TEMPORARILY_UNAVAILABLE = 480,
  PJSIP_SC_CALL_TSX_DOES_NOT_EXIST = 481, PJSIP_SC_LOOP_DETECTED = 482, PJSIP_SC_TOO_MANY_HOPS = 483, PJSIP_SC_ADDRESS_INCOMPLETE = 484,
  PJSIP_AC_AMBIGUOUS = 485, PJSIP_SC_BUSY_HERE = 486, PJSIP_SC_REQUEST_TERMINATED = 487, PJSIP_SC_NOT_ACCEPTABLE_HERE = 488,
  PJSIP_SC_BAD_EVENT = 489, PJSIP_SC_REQUEST_UPDATED = 490, PJSIP_SC_REQUEST_PENDING = 491, PJSIP_SC_UNDECIPHERABLE = 493,
  PJSIP_SC_INTERNAL_SERVER_ERROR = 500, PJSIP_SC_NOT_IMPLEMENTED = 501, PJSIP_SC_BAD_GATEWAY = 502, PJSIP_SC_SERVICE_UNAVAILABLE = 503,
  PJSIP_SC_SERVER_TIMEOUT = 504, PJSIP_SC_VERSION_NOT_SUPPORTED = 505, PJSIP_SC_MESSAGE_TOO_LARGE = 513, PJSIP_SC_PRECONDITION_FAILURE = 580,
  PJSIP_SC_BUSY_EVERYWHERE = 600, PJSIP_SC_DECLINE = 603, PJSIP_SC_DOES_NOT_EXIST_ANYWHERE = 604, PJSIP_SC_NOT_ACCEPTABLE_ANYWHERE = 606,
  PJSIP_SC_TSX_TIMEOUT = PJSIP_SC_REQUEST_TIMEOUT, PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE, PJSIP_SC__force_32bit = 0x7FFFFFFF
}
 
enum  pjsip_msg_type_e { PJSIP_REQUEST_MSG, PJSIP_RESPONSE_MSG }
 

Functions

const pjsip_methodpjsip_get_invite_method (void)
 
const pjsip_methodpjsip_get_cancel_method (void)
 
const pjsip_methodpjsip_get_ack_method (void)
 
const pjsip_methodpjsip_get_bye_method (void)
 
const pjsip_methodpjsip_get_register_method (void)
 
const pjsip_methodpjsip_get_options_method (void)
 
void pjsip_method_init (pjsip_method *m, pj_pool_t *pool, const pj_str_t *str)
 
void pjsip_method_init_np (pjsip_method *m, pj_str_t *str)
 
void pjsip_method_set (pjsip_method *m, pjsip_method_e id)
 
void pjsip_method_copy (pj_pool_t *pool, pjsip_method *method, const pjsip_method *rhs)
 
int pjsip_method_cmp (const pjsip_method *m1, const pjsip_method *m2)
 
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)
 
const pj_str_tpjsip_get_status_text (int status_code)
 
void pjsip_media_type_init (pjsip_media_type *mt, pj_str_t *type, pj_str_t *subtype)
 
void pjsip_media_type_init2 (pjsip_media_type *mt, char *type, char *subtype)
 
int pjsip_media_type_cmp (const pjsip_media_type *mt1, const pjsip_media_type *mt2, int cmp_param)
 
void pjsip_media_type_cp (pj_pool_t *pool, pjsip_media_type *dst, const pjsip_media_type *src)
 
int pjsip_media_type_print (char *buf, unsigned len, const pjsip_media_type *mt)
 
int pjsip_print_text_body (pjsip_msg_body *msg_body, char *buf, pj_size_t size)
 
void * pjsip_clone_text_data (pj_pool_t *pool, const void *data, unsigned len)
 
pj_status_t pjsip_msg_body_copy (pj_pool_t *pool, pjsip_msg_body *dst_body, const pjsip_msg_body *src_body)
 
pjsip_msg_bodypjsip_msg_body_clone (pj_pool_t *pool, const pjsip_msg_body *body)
 
pjsip_msg_bodypjsip_msg_body_create (pj_pool_t *pool, const pj_str_t *type, const pj_str_t *subtype, const pj_str_t *text)
 
pjsip_msgpjsip_msg_create (pj_pool_t *pool, pjsip_msg_type_e type)
 
pjsip_msgpjsip_msg_clone (pj_pool_t *pool, const pjsip_msg *msg)
 
void * pjsip_msg_find_hdr (const pjsip_msg *msg, pjsip_hdr_e type, const void *start)
 
void * pjsip_msg_find_hdr_by_name (const pjsip_msg *msg, const pj_str_t *name, const void *start)
 
void * pjsip_msg_find_hdr_by_names (const pjsip_msg *msg, const pj_str_t *name, const pj_str_t *sname, const void *start)
 
void * pjsip_msg_find_remove_hdr (pjsip_msg *msg, pjsip_hdr_e hdr, void *start)
 
void pjsip_msg_add_hdr (pjsip_msg *msg, pjsip_hdr *hdr)
 
void pjsip_msg_insert_first_hdr (pjsip_msg *msg, pjsip_hdr *hdr)
 
pj_ssize_t pjsip_msg_print (const pjsip_msg *msg, char *buf, pj_size_t size)
 
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)
 

Variables

const pjsip_method pjsip_invite_method
 
const pjsip_method pjsip_cancel_method
 
const pjsip_method pjsip_ack_method
 
const pjsip_method pjsip_bye_method
 
const pjsip_method pjsip_register_method
 
const pjsip_method pjsip_options_method
 

 


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