Group PJSIP_MSG_METHOD¶
-
group
PJSIP_MSG_METHOD
Method names and manipulation.
Enums
-
enum
pjsip_method_e
¶ This enumeration declares SIP methods as described by RFC3261. Additional methods do exist, and they are described by corresponding RFCs for the SIP extentensions. Since they won’t alter the characteristic of the processing of the message, they don’t need to be explicitly mentioned here.
Values:
-
enumerator
PJSIP_INVITE_METHOD
¶ INVITE method, for establishing dialogs.
-
enumerator
PJSIP_CANCEL_METHOD
¶ CANCEL method, for cancelling request.
-
enumerator
PJSIP_ACK_METHOD
¶ ACK method.
-
enumerator
PJSIP_BYE_METHOD
¶ BYE method, for terminating dialog.
-
enumerator
PJSIP_REGISTER_METHOD
¶ REGISTER method.
-
enumerator
PJSIP_OPTIONS_METHOD
¶ OPTIONS method.
-
enumerator
PJSIP_OTHER_METHOD
¶ Other method.
-
enumerator
Functions
-
const pjsip_method *
pjsip_get_invite_method
(void)¶ Get INVITE method constant.
-
const pjsip_method *
pjsip_get_cancel_method
(void)¶ Get CANCEL method constant.
-
const pjsip_method *
pjsip_get_ack_method
(void)¶ Get ACK method constant.
-
const pjsip_method *
pjsip_get_bye_method
(void)¶ Get BYE method constant.
-
const pjsip_method *
pjsip_get_register_method
(void)¶ Get REGISTER method constant.
-
const pjsip_method *
pjsip_get_options_method
(void)¶ Get OPTIONS method constant.
-
void
pjsip_method_init
(pjsip_method *m, pj_pool_t *pool, const pj_str_t *str)¶ Initialize the method structure from a string. This function will check whether the method is a known method then set both the id and name accordingly.
- Parameters
m – The method to initialize.
pool – Pool where memory allocation will be allocated from, if required.
str – The method string.
-
void
pjsip_method_init_np
(pjsip_method *m, pj_str_t *str)¶ Initialize the method structure from a string, without cloning the string. See pjsip_method_init.
- Parameters
m – The method structure to be initialized.
str – The method string.
-
void
pjsip_method_set
(pjsip_method *m, pjsip_method_e id)¶ Set the method with the predefined method ID. This function will also set the name member of the structure to the correct string according to the method.
- Parameters
m – The method structure.
id – The method ID.
-
void
pjsip_method_copy
(pj_pool_t *pool, pjsip_method *method, const pjsip_method *rhs)¶ Copy one method structure to another. If the method is of the known methods, then memory allocation is not required.
- Parameters
pool – Pool to allocate memory from, if required.
method – The destination method to copy to.
rhs – The source method to copy from.
-
int
pjsip_method_cmp
(const pjsip_method *m1, const pjsip_method *m2)¶ Compare one method with another, and conveniently determine whether the first method is equal, less than, or greater than the second method.
- Parameters
m1 – The first method.
m2 – The second method.
- Returns
Zero if equal, otherwise will return -1 if less or +1 if greater.
Variables
-
const pjsip_method
pjsip_invite_method
¶ INVITE method constant.
-
const pjsip_method
pjsip_cancel_method
¶ CANCEL method constant.
-
const pjsip_method
pjsip_ack_method
¶ ACK method constant.
-
const pjsip_method
pjsip_bye_method
¶ BYE method constant.
-
const pjsip_method
pjsip_register_method
¶ REGISTER method constant.
-
const pjsip_method
pjsip_options_method
¶ OPTIONS method constant.
-
struct
pjsip_method
¶ - #include <sip_msg.h>
This structure represents a SIP method. Application must always use either pjsip_method_init or pjsip_method_set to make sure that method name is initialized correctly. This way, the name member will always contain a valid method string regardless whether the ID is recognized or not.
Forward declaration for SIP method (sip_msg.h)
-
enum