exosip2ctypes.message module¶
-
class
exosip2ctypes.message.
OsipMessage
(ptr)¶ Bases:
object
class for osip2 message API
Parameters: ptr (ctypes.c_void_p) – Pointer to the osip_message_t structure in C library -
add_allow
(val)¶ Set the Allow header.
Parameters: val (str) – The string describing the element. Attention
This method will ADD a create ALLOW header
-
add_body
(val)¶ Fill the body of message.
Parameters: val (str) – Body string. Attention
This method will ADD a create body
-
add_contact
(val)¶ Set the Contact header.
Parameters: val (str) – The string describing the element. Attention
This method will ADD a create Contact header
-
add_header
(name, value)¶ Allocate and Add an “unknown” header (not defined in oSIP).
Parameters: Attention
This method will ADD a create header
-
get_headers
(name)¶ Find “unknown” header’s list. (not defined in oSIP)
Parameters: name (str) – The name of the header to find. Returns: Header’s value string list. Return type: list
-
ptr
¶ Pointer to the osip_message_t C Structure
Return type: ctypes.c_void_p
-
-
class
exosip2ctypes.message.
ExosipMessage
(ptr, context)¶ Bases:
exosip2ctypes.message.OsipMessage
class for eXosip2 message API
Parameters: - ptr (ctypes.c_void_p) – Pointer to the osip_message_t structure in C library
- context (Context) – eXosip context
Danger
Do NOT con/destruct the class yourself unless you known what you are doing.
Attention
In eXosip2, messages are managed inside the library, so we should NOT free
OsipMessage
object manually.-
send
()¶