Asterisk - The Open Source Telephony Project
18.5.0
|
sip_request: The data grabbed from the UDP socket More...
#include <sip.h>
Data Fields | |
char | authenticated |
struct ast_str * | content |
struct ast_str * | data |
char | debug |
char | has_to_tag |
ptrdiff_t | header [SIP_MAX_HEADERS] |
int | headers |
char | ignore |
ptrdiff_t | line [SIP_MAX_LINES] |
int | lines |
int | method |
struct { | |
struct sip_request * next | |
} | next |
unsigned int | reqsipoptions |
ptrdiff_t | rlpart1 |
ptrdiff_t | rlpart2 |
unsigned int | sdp_count |
unsigned int | sdp_start |
struct sip_socket | socket |
sip_request: The data grabbed from the UDP socket
* Incoming messages: we first store the data from the socket in data[], * adding a trailing \0 to make string parsing routines happy. * Then call parse_request() and req.method = find_sip_method(); * to initialize the other fields. The \r\n at the end of each line is * replaced by \0, so that data[] is not a conforming SIP message anymore. * After this processing, rlpart1 is set to non-NULL to remember * that we can run get_header() on this kind of packet. * * parse_request() splits the first line as follows: * Requests have in the first line method uri SIP/2.0 * rlpart1 = method; rlpart2 = uri; * Responses have in the first line SIP/2.0 NNN description * rlpart1 = SIP/2.0; rlpart2 = NNN + description; * * For outgoing packets, we initialize the fields with init_req() or init_resp() * (which fills the first line to "METHOD uri SIP/2.0" or "SIP/2.0 code text"), * and then fill the rest with add_header() and add_line(). * The \r\n at the end of the line are still there, so the get_header() * and similar functions don't work on these packets. *
char authenticated |
non-zero if this request was authenticated
Definition at line 840 of file sip.h.
Referenced by _sip_tcp_helper_thread(), handle_request_do(), handle_request_invite(), and handle_request_register().
struct ast_str* content |
Definition at line 844 of file sip.h.
Referenced by add_content(), copy_request(), deinit_req(), finalize_content(), init_req(), and init_resp().
struct ast_str* data |
Definition at line 843 of file sip.h.
Referenced by _sip_tcp_helper_thread(), add_blank(), add_header(), change_hold_state(), copy_request(), deinit_req(), determine_firstline_parts(), finalize_content(), handle_request_cancel(), handle_request_do(), init_req(), init_resp(), parse_request(), send_request(), send_response(), sip_hangup(), sip_tcptls_read(), sip_websocket_callback(), and sipsock_read().
char debug |
print extra debugging if non zero
Definition at line 837 of file sip.h.
Referenced by handle_incoming(), handle_request_do(), handle_request_invite(), handle_request_message(), handle_request_refer(), handle_request_subscribe(), handle_response(), initialize_initreq(), and use_reason_header().
char has_to_tag |
non-zero if packet has To: tag
Definition at line 838 of file sip.h.
Referenced by __find_call(), and handle_incoming().
ptrdiff_t header[SIP_MAX_HEADERS] |
Array of offsets into the request string of each SIP header
Definition at line 841 of file sip.h.
Referenced by add_header(), init_req(), init_resp(), and parse_request().
int headers |
Definition at line 832 of file sip.h.
Referenced by __get_header(), add_header(), create_addr_from_peer(), extract_transferrer_headers(), func_headers_read2(), handle_incoming(), handle_request_do(), handle_request_invite(), handle_request_register(), handle_request_subscribe(), init_req(), init_resp(), initialize_initreq(), match_req_to_dialog(), parse_request(), set_message_vars_from_req(), transmit_invite(), transmit_notify_with_mwi(), transmit_notify_with_sipfrag(), and transmit_register().
char ignore |
if non-zero This is a re-transmit, ignore it
Definition at line 839 of file sip.h.
Referenced by check_auth(), handle_incoming(), handle_invite_replaces(), handle_request_bye(), handle_request_invite(), handle_request_message(), handle_request_refer(), handle_request_subscribe(), handle_response(), handle_response_invite(), register_verify(), transmit_fake_auth_response(), and transmit_response_reliable().
ptrdiff_t line[SIP_MAX_LINES] |
Array of offsets into the request string of each SDP line
Definition at line 842 of file sip.h.
Referenced by parse_request().
int lines |
Body Content
Definition at line 834 of file sip.h.
Referenced by add_blank(), add_content(), add_header(), determine_sip_publish_type(), finalize_content(), find_sdp(), get_content(), get_content_line(), handle_request_do(), initialize_initreq(), parse_request(), and transmit_register().
int method |
Method of this request
Definition at line 833 of file sip.h.
Referenced by __find_call(), add_sdp(), change_redirecting_information(), get_destination(), handle_incoming(), handle_request_bye(), handle_request_do(), handle_request_invite(), handle_request_register(), handle_request_subscribe(), init_req(), init_resp(), initialize_initreq(), process_sdp(), send_request(), and send_response().
struct sip_request* next |
struct { ... } next |
unsigned int reqsipoptions |
Items needed for Required header in responses
Definition at line 848 of file sip.h.
Referenced by add_required_respheader(), and respprep().
ptrdiff_t rlpart1 |
Offset of the SIP Method Name or "SIP/2.0" protocol version
Definition at line 830 of file sip.h.
Referenced by determine_firstline_parts().
ptrdiff_t rlpart2 |
Offset of the Request URI or Response Status
Definition at line 831 of file sip.h.
Referenced by determine_firstline_parts(), and get_destination().
unsigned int sdp_count |
the number of lines of SDP
Definition at line 836 of file sip.h.
Referenced by find_sdp(), get_sdp_iterate(), and get_sdp_line().
unsigned int sdp_start |
the line number where the SDP begins
Definition at line 835 of file sip.h.
Referenced by find_sdp(), get_sdp_iterate(), get_sdp_line(), and process_sdp().
struct sip_socket socket |
The socket used for this request
Definition at line 846 of file sip.h.
Referenced by __sip_alloc(), _sip_tcp_helper_thread(), handle_request_do(), parse_register_contact(), sip_report_security_event(), sip_websocket_callback(), sipsock_read(), and transmit_response_using_temp().