|
libosip 3.6.0
|
| #define BODY_MESSAGE_MAX_SIZE 4000 |
You can define the maximum length for a body inside a SIP message.
Referenced by sdp_message_to_str().
| #define MSG_IS_ACK | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"ACK"))
Test if the message is an ACK REQUEST
| msg | the SIP message. |
Referenced by osip_create_transaction(), and osip_transaction_find().
| #define MSG_IS_BYE | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"BYE"))
Test if the message is a BYE REQUEST
| msg | the SIP message. |
| #define MSG_IS_CANCEL | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"CANCEL"))
Test if the message is a CANCEL REQUEST
| msg | the SIP message. |
| #define MSG_IS_INFO | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"INFO"))
Test if the message is an INFO REQUEST
| msg | the SIP message. |
| #define MSG_IS_INVITE | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"INVITE"))
Test if the message is an INVITE REQUEST
| msg | the SIP message. |
Referenced by osip_transaction_find().
| #define MSG_IS_MESSAGE | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"MESSAGE"))
Test if the message is a MESSAGE REQUEST
| msg | the SIP message. |
| #define MSG_IS_NOTIFY | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"NOTIFY"))
Test if the message is a NOTIFY REQUEST
| msg | the SIP message. |
| #define MSG_IS_OPTIONS | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"OPTIONS"))
Test if the message is an OPTIONS REQUEST
| msg | the SIP message. |
| #define MSG_IS_PRACK | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"PRACK"))
Test if the message is a PRACK REQUEST (!! PRACK IS NOT SUPPORTED by the fsm!!)
| msg | the SIP message. |
| #define MSG_IS_PUBLISH | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"PUBLISH"))
Test if the message is an UPDATE REQUEST
| msg | the SIP message. |
| #define MSG_IS_REFER | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"REFER"))
Test if the message is a REFER REQUEST
| msg | the SIP message. |
| #define MSG_IS_REGISTER | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"REGISTER"))
Test if the message is a REGISTER REQUEST
| msg | the SIP message. |
| #define MSG_IS_REQUEST | ( | msg | ) | ((msg)->status_code==0) |
Test if the message is a SIP REQUEST
| msg | the SIP message. |
Referenced by osip_create_transaction(), osip_new_outgoing_sipmessage(), and osip_parse().
| #define MSG_IS_RESPONSE | ( | msg | ) | ((msg)->status_code!=0) |
Test if the message is a SIP RESPONSE
| msg | the SIP message. |
Referenced by osip_message_fix_last_via_header().
| #define MSG_IS_RESPONSE_FOR | ( | msg, | |
| requestname | |||
| ) |
(MSG_IS_RESPONSE(msg) && \ 0==strcmp((msg)->cseq->method,(requestname)))
Test if the message is a response for a REQUEST of certain type
| msg | the SIP message. |
| requestname | the method name to match. |
Referenced by osip_transaction_find().
| #define MSG_IS_STATUS_1XX | ( | msg | ) |
((msg)->status_code >= 100 && \
(msg)->status_code < 200)
Test if the message is a response with status between 100 and 199
| msg | the SIP message. |
| #define MSG_IS_STATUS_2XX | ( | msg | ) |
((msg)->status_code >= 200 && \
(msg)->status_code < 300)
Test if the message is a response with status between 200 and 299
| msg | the SIP message. |
Referenced by osip_dialog_update_route_set_as_uac().
| #define MSG_IS_STATUS_3XX | ( | msg | ) |
((msg)->status_code >= 300 && \
(msg)->status_code < 400)
Test if the message is a response with status between 300 and 399
| msg | the SIP message. |
| #define MSG_IS_STATUS_4XX | ( | msg | ) |
((msg)->status_code >= 400 && \
(msg)->status_code < 500)
Test if the message is a response with status between 400 and 499
| msg | the SIP message. |
| #define MSG_IS_STATUS_5XX | ( | msg | ) |
((msg)->status_code >= 500 && \
(msg)->status_code < 600)
Test if the message is a response with status between 500 and 599
| msg | the SIP message. |
| #define MSG_IS_STATUS_6XX | ( | msg | ) |
((msg)->status_code >= 600 && \
(msg)->status_code < 700)
Test if the message is a response with status between 600 and 699
| msg | the SIP message. |
| #define MSG_IS_SUBSCRIBE | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"SUBSCRIBE"))
Test if the message is a SUBSCRIBE REQUEST
| msg | the SIP message. |
| #define MSG_IS_UPDATE | ( | msg | ) |
(MSG_IS_REQUEST(msg) && \ 0==strcmp((msg)->sip_method,"UPDATE"))
Test if the message is an UPDATE REQUEST
| msg | the SIP message. |
| #define MSG_TEST_CODE | ( | msg, | |
| code | |||
| ) |
(MSG_IS_RESPONSE(msg) && \ (code)==(msg)->status_code)
Test if the message is a response with a status set to the code value.
| msg | the SIP message. |
| code | the status code. |
| #define osip_generic_param_add | ( | LIST, | |
| NAME, | |||
| VALUE | |||
| ) | osip_uri_param_add(LIST,NAME,VALUE) |
Allocate and add a generic parameter element in a list.
| LIST | The list of generic parameter element to work on. |
| NAME | The token name. |
| VALUE | The token value. |
| #define osip_generic_param_clone osip_uri_param_clone |
Clone a generic parameter element.
| GP | The element to work on. |
| DEST | The resulting new allocated buffer. |
Referenced by osip_accept_encoding_clone(), osip_call_info_clone(), osip_content_type_clone(), osip_from_clone(), and osip_via_clone().
| #define osip_generic_param_free | ( | GP | ) | osip_uri_param_free(GP) |
Free a generic parameter element.
| GP | The element to work on. |
| #define osip_generic_param_get_byname | ( | LIST, | |
| NAME, | |||
| DEST | |||
| ) | osip_uri_param_get_byname(LIST,NAME,DEST) |
Find in a generic parameter element in a list.
| LIST | The list of generic parameter element to work on. |
| NAME | The name of the parameter element to find. |
| DEST | A pointer on the element found. |
| #define osip_generic_param_init | ( | GP | ) | osip_uri_param_init(GP) |
Allocate a generic parameter element.
| GP | The element to work on. |
| #define osip_generic_param_set | ( | GP, | |
| NAME, | |||
| VALUE | |||
| ) | osip_uri_param_set(GP, NAME, VALUE) |
Set values of a generic parameter element.
| GP | The element to work on. |
| NAME | The token name. |
| VALUE | The token value. |
| #define SIP_MESSAGE_MAX_LENGTH 4000 |
You can re-define your own maximum length for SIP message.
Structure for SIP Message (REQUEST and RESPONSE).
| char* osip_generic_param_get_name | ( | const osip_generic_param_t * | generic_param | ) |
Get the name of a generic parameter element.
| generic_param | The element to work on. |
References osip_uri_param::gname.
| char* osip_generic_param_get_value | ( | const osip_generic_param_t * | generic_param | ) |
Get the value of a generic parameter element.
| generic_param | The element to work on. |
References osip_uri_param::gname, and osip_uri_param::gvalue.
| void osip_generic_param_set_name | ( | osip_generic_param_t * | generic_param, |
| char * | name | ||
| ) |
Set the name of a generic parameter element.
| generic_param | The element to work on. |
| name | the token name to set. |
References osip_uri_param::gname.
| void osip_generic_param_set_value | ( | osip_generic_param_t * | generic_param, |
| char * | value | ||
| ) |
Set the value of a generic parameter element.
| generic_param | The element to work on. |
| value | the token name to set. |
References osip_uri_param::gvalue.
| int osip_message_clone | ( | const osip_message_t * | sip, |
| osip_message_t ** | dest | ||
| ) |
Clone a osip_message_t element.
| sip | The element to clone. |
| dest | The new allocated element cloned. |
References osip_message::accept_encodings, osip_message::accept_languages, osip_message::accepts, osip_message::alert_infos, osip_message::allows, osip_message::authentication_infos, osip_message::authorizations, osip_message::bodies, osip_message::call_id, osip_message::call_infos, osip_message::contacts, osip_message::content_encodings, osip_message::content_length, osip_message::content_type, osip_message::cseq, osip_message::error_infos, osip_message::from, osip_message::headers, osip_message::mime_version, osip_accept_clone, osip_accept_encoding_clone(), osip_accept_language_clone, osip_alert_info_clone, osip_allow_clone, osip_authentication_info_clone(), osip_authorization_clone(), osip_body_clone(), osip_call_id_clone(), osip_call_info_clone(), osip_contact_clone(), osip_content_encoding_clone, osip_content_length_clone(), osip_content_type_clone(), osip_cseq_clone(), osip_error_info_clone, osip_from_clone(), osip_header_clone(), osip_list_add(), osip_list_clone(), osip_list_eol(), osip_list_get(), osip_message_free(), osip_message_init(), osip_mime_version_clone, osip_proxy_authenticate_clone, osip_proxy_authentication_info_clone, osip_proxy_authorization_clone, osip_record_route_clone, osip_route_clone, osip_to_clone(), osip_uri_clone(), osip_via_clone(), osip_www_authenticate_clone(), osip_message::proxy_authenticates, osip_message::proxy_authentication_infos, osip_message::proxy_authorizations, osip_message::reason_phrase, osip_message::record_routes, osip_message::req_uri, osip_message::routes, osip_message::sip_method, osip_message::sip_version, osip_message::status_code, osip_message::to, osip_message::vias, and osip_message::www_authenticates.
Referenced by osip_start_200ok_retransmissions(), and osip_start_ack_retransmissions().
| void osip_message_free | ( | osip_message_t * | sip | ) |
Free all resource in a osip_message_t element.
| sip | The element to free. |
References osip_message::accept_encodings, osip_message::accept_languages, osip_message::accepts, osip_message::alert_infos, osip_message::allows, osip_message::authentication_infos, osip_message::authorizations, osip_message::bodies, osip_message::call_id, osip_message::call_infos, osip_message::contacts, osip_message::content_encodings, osip_message::content_length, osip_message::content_type, osip_message::cseq, osip_message::error_infos, osip_message::from, osip_message::headers, osip_message::mime_version, osip_accept_encoding_free(), osip_accept_free, osip_accept_language_free, osip_alert_info_free, osip_allow_free, osip_authentication_info_free(), osip_authorization_free(), osip_body_free(), osip_call_id_free(), osip_call_info_free(), osip_contact_free(), osip_content_encoding_free, osip_content_length_free(), osip_content_type_free(), osip_cseq_free(), osip_error_info_free, osip_from_free(), osip_header_free(), osip_list_special_free(), osip_mime_version_free, osip_proxy_authenticate_free, osip_proxy_authentication_info_free, osip_proxy_authorization_free, osip_record_route_free(), osip_route_free(), osip_to_free(), osip_uri_free(), osip_via_free(), osip_www_authenticate_free(), osip_message::proxy_authenticates, osip_message::proxy_authentication_infos, osip_message::proxy_authorizations, osip_message::reason_phrase, osip_message::record_routes, osip_message::req_uri, osip_message::routes, osip_message::sip_method, osip_message::sip_version, osip_message::to, osip_message::vias, and osip_message::www_authenticates.
Referenced by osip_event_free(), osip_message_clone(), osip_parse(), osip_transaction_execute(), and osip_transaction_free2().
| int osip_message_get_knownheaderlist | ( | osip_list_t * | header_list, |
| int | pos, | ||
| void ** | dest | ||
| ) |
Get the a known header from a list of known header.
| header_list | The element to work on. |
| pos | The index of the element to get. |
| dest | A pointer on the header found. |
References osip_list_get(), and osip_list_size().
| char* osip_message_get_method | ( | const osip_message_t * | sip | ) |
| char* osip_message_get_reason_phrase | ( | const osip_message_t * | sip | ) |
Get the reason phrase. This is entirely free in SIP.
| sip | The element to work on. |
References osip_message::reason_phrase.
| int osip_message_get_status_code | ( | const osip_message_t * | sip | ) |
| osip_uri_t* osip_message_get_uri | ( | const osip_message_t * | sip | ) |
| char* osip_message_get_version | ( | const osip_message_t * | sip | ) |
| int osip_message_init | ( | osip_message_t ** | sip | ) |
Allocate a osip_message_t element.
| sip | The element to allocate. |
References osip_list_init().
Referenced by osip_message_clone(), and osip_parse().
| int osip_message_parse | ( | osip_message_t * | sip, |
| const char * | buf, | ||
| size_t | length | ||
| ) |
Parse a osip_message_t element.
| sip | The resulting element. |
| buf | The buffer to parse. |
| length | The length of the buffer to parse. |
Referenced by osip_parse().
| int osip_message_parse_sipfrag | ( | osip_message_t * | sip, |
| const char * | buf, | ||
| size_t | length | ||
| ) |
Parse a message/sipfrag part and store it in an osip_message_t element.
| sip | The resulting element. |
| buf | The buffer to parse. |
| length | The length of the buffer to parse. |
| void osip_message_set_method | ( | osip_message_t * | sip, |
| char * | method | ||
| ) |
Set the method. You can set any string here.
| sip | The element to work on. |
| method | The method name. |
References osip_message::sip_method.
| void osip_message_set_reason_phrase | ( | osip_message_t * | sip, |
| char * | reason | ||
| ) |
Set the reason phrase. This is entirely free in SIP.
| sip | The element to work on. |
| reason | The reason phrase. |
References osip_message::reason_phrase.
| void osip_message_set_status_code | ( | osip_message_t * | sip, |
| int | statuscode | ||
| ) |
Set the status code. This is entirely free in SIP.
| sip | The element to work on. |
| statuscode | The status code. |
References osip_message::status_code.
| void osip_message_set_uri | ( | osip_message_t * | sip, |
| osip_uri_t * | uri | ||
| ) |
Set the Request-URI.
| sip | The element to work on. |
| uri | The uri to set. |
References osip_message::req_uri.
| void osip_message_set_version | ( | osip_message_t * | sip, |
| char * | version | ||
| ) |
Set the SIP version used. (default is "SIP/2.0")
| sip | The element to work on. |
| version | The version of SIP. |
References osip_message::sip_version.
| int osip_message_to_str | ( | osip_message_t * | sip, |
| char ** | dest, | ||
| size_t * | message_length | ||
| ) |
Get a string representation of a osip_message_t element.
| sip | The element to work on. |
| dest | new allocated buffer returned. |
| message_length | The length of the returned buffer. |
| int osip_message_to_str_sipfrag | ( | osip_message_t * | sip, |
| char ** | dest, | ||
| size_t * | message_length | ||
| ) |
Get a string representation of a message/sipfrag part stored in an osip_message_t element.
| sip | The element to work on. |
| dest | new allocated buffer returned. |
| message_length | The length of the returned buffer. |
1.7.3