sip_request: The data grabbed from the UDP socket More...
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 |
int | len |
ptrdiff_t | line [SIP_MAX_LINES] |
int | lines |
int | method |
struct { | |
struct sip_request * next | |
} | next |
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_content(). * 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. *
Definition at line 1202 of file chan_sip.c.
char authenticated |
non-zero if this request was authenticated
Definition at line 1214 of file chan_sip.c.
Referenced by _sip_tcp_helper_thread(), handle_request_do(), handle_request_invite(), and handle_request_register().
Definition at line 1220 of file chan_sip.c.
Referenced by add_content(), copy_request(), deinit_req(), finalize_content(), func_header_read(), init_req(), init_resp(), and transmit_invite().
Definition at line 1219 of file chan_sip.c.
Referenced by _sip_tcp_helper_thread(), add_blank(), add_header(), cb_extensionstate(), change_hold_state(), copy_request(), deinit_req(), determine_firstline_parts(), finalize_content(), find_by_name(), find_calling_channel(), handle_request_do(), handle_request_refer(), init_req(), init_resp(), parse_request(), reg_source_db(), send_request(), send_response(), sip_addheader(), sip_dtmfmode(), sip_hangup(), sip_indicate(), sip_request_call(), sip_tcp_worker_fn(), sipsock_read(), temp_pvt_cleanup(), and temp_pvt_init().
char debug |
print extra debugging if non zero
Definition at line 1211 of file chan_sip.c.
Referenced by add_sdp(), check_peer_ok(), handle_incoming(), handle_request_do(), handle_request_message(), handle_request_refer(), handle_request_subscribe(), handle_response(), initialize_initreq(), process_sdp(), process_sdp_a_audio(), process_sdp_a_text(), process_sdp_a_video(), set_destination(), and sip_sendtext().
char has_to_tag |
non-zero if packet has To: tag
Definition at line 1212 of file chan_sip.c.
Referenced by find_call(), and handle_incoming().
ptrdiff_t header[SIP_MAX_HEADERS] |
Definition at line 1216 of file chan_sip.c.
Referenced by __get_header(), add_header(), do_proxy_auth(), do_register_auth(), func_header_read(), handle_incoming(), init_req(), init_resp(), parse_request(), and transmit_invite().
int headers |
# of SIP Headers
Definition at line 1206 of file chan_sip.c.
Referenced by __get_header(), add_header(), create_addr_from_peer(), handle_incoming(), handle_request_do(), handle_request_invite(), handle_request_register(), handle_request_subscribe(), init_req(), init_resp(), initialize_initreq(), parse_request(), transmit_invite(), transmit_notify_custom(), transmit_notify_with_mwi(), transmit_notify_with_sipfrag(), transmit_refer(), and transmit_register().
char ignore |
if non-zero This is a re-transmit, ignore it
Definition at line 1213 of file chan_sip.c.
Referenced by check_auth(), check_peer_ok(), 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().
int len |
bytes used in data[], excluding trailing null terminator. Rarely used.
Definition at line 1205 of file chan_sip.c.
Referenced by __get_header(), __sip_reliable_xmit(), _sip_tcp_helper_thread(), add_blank(), add_header(), build_route(), finalize_content(), get_ip_and_port_from_sdp(), handle_incoming(), handle_request_cancel(), handle_request_do(), init_req(), init_resp(), lws2sws(), process_sdp(), send_request(), send_response(), sip_show_channel(), sip_show_history(), sip_tcptls_write(), and sipsock_read().
ptrdiff_t line[SIP_MAX_LINES] |
Definition at line 1218 of file chan_sip.c.
Referenced by parse_request(), and sip_parse_host().
int lines |
Body Content
Definition at line 1208 of file chan_sip.c.
Referenced by add_blank(), add_content(), add_header(), finalize_content(), find_sdp(), get_body(), get_msg_text(), handle_request_do(), initialize_initreq(), parse_request(), and transmit_register().
int method |
Method of this request
Definition at line 1207 of file chan_sip.c.
Referenced by __sip_pretend_ack(), find_call(), 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(), send_request(), send_response(), and transmit_invite().
struct sip_request* next |
Definition at line 1223 of file chan_sip.c.
Referenced by add_peer_mailboxes(), build_peer(), free_old_route(), parse_sip_options(), process_sdp(), and set_insecure_flags().
struct { ... } next |
ptrdiff_t rlPart1 |
Offset of the SIP Method Name or "SIP/2.0" protocol version
Definition at line 1203 of file chan_sip.c.
Referenced by determine_firstline_parts(), handle_incoming(), handle_request_do(), send_request(), and send_response().
ptrdiff_t rlPart2 |
Offset of the Request URI or Response Status
Definition at line 1204 of file chan_sip.c.
Referenced by determine_firstline_parts(), get_destination(), handle_incoming(), handle_request_do(), handle_request_invite(), reqprep(), and send_response().
unsigned int sdp_count |
the number of lines of SDP
Definition at line 1210 of file chan_sip.c.
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 1209 of file chan_sip.c.
Referenced by find_sdp(), get_ip_and_port_from_sdp(), get_sdp_iterate(), get_sdp_line(), and process_sdp().
struct sip_socket socket |
The socket used for this request
Definition at line 1222 of file chan_sip.c.
Referenced by _sip_tcp_helper_thread(), handle_request_do(), parse_register_contact(), reload_config(), sip_alloc(), sipsock_read(), and transmit_response_using_temp().