sip_request: The data grabbed from the UDP socket More...

Data Fields | |
| 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_end |
| 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. *
Definition at line 888 of file chan_sip.c.
Definition at line 904 of file chan_sip.c.
Referenced by __sip_destroy(), _sip_tcp_helper_thread(), add_blank(), add_header(), add_line(), copy_request(), determine_firstline_parts(), handle_request_do(), handle_request_refer(), init_req(), init_resp(), parse_register_contact(), parse_request(), process_sdp(), reg_source_db(), send_request(), send_response(), sip_hangup(), sip_park(), sip_park_thread(), and sipsock_read().
| char debug |
print extra debugging if non zero
Definition at line 897 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(), set_destination(), and sip_sendtext().
| char has_to_tag |
non-zero if packet has To: tag
Definition at line 898 of file chan_sip.c.
Referenced by find_call(), and handle_incoming().
| ptrdiff_t header[SIP_MAX_HEADERS] |
Definition at line 901 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 892 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_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 899 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 891 of file chan_sip.c.
Referenced by __get_header(), _sip_tcp_helper_thread(), add_blank(), add_header(), add_line(), add_sdp(), build_route(), get_body(), get_ip_and_port_from_sdp(), get_sdp_iterate(), handle_incoming(), handle_request_cancel(), handle_request_do(), init_req(), init_resp(), method_match(), process_sdp(), send_request(), send_response(), sip_addheader(), sip_show_channel(), sip_show_history(), and sipsock_read().
| ptrdiff_t line[SIP_MAX_LINES] |
Definition at line 903 of file chan_sip.c.
Referenced by add_line(), and parse_request().
| int lines |
Body Content
Definition at line 894 of file chan_sip.c.
Referenced by add_blank(), add_header(), add_line(), 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 893 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 { ... } next |
struct sip_request* next [read] |
Definition at line 907 of file chan_sip.c.
| ptrdiff_t rlPart1 |
Offset of the SIP Method Name or "SIP/2.0" protocol version
Definition at line 889 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 890 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_end |
the line number where the SDP ends
Definition at line 896 of file chan_sip.c.
Referenced by find_sdp(), and get_sdp_iterate().
| unsigned int sdp_start |
the line number where the SDP begins
Definition at line 895 of file chan_sip.c.
Referenced by find_sdp(), get_ip_and_port_from_sdp(), and process_sdp().
struct sip_socket socket [read] |
The socket used for this request
Definition at line 906 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().
1.6.1