diff options
author | Anders Broman <anders.broman@ericsson.com> | 2018-11-29 10:48:46 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-11-29 12:16:20 +0000 |
commit | d68b7bc505728ad27d109ebf9bacbcbb9ef75613 (patch) | |
tree | 20dcdbc38efd042415a4800fdeeaa4544563523e /epan/dissectors/packet-sip.c | |
parent | 0da9763d110da29491ac1e9206f5dc89906e357c (diff) |
Add sip_call_id filter to RTP stream.
Change-Id: Ia525fa74457eef03a3a8bc85905036c19693cfbb
Reviewed-on: https://code.wireshark.org/review/30830
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-sip.c')
-rw-r--r-- | epan/dissectors/packet-sip.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index d4b0cdfef5..f04c2f068c 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -3338,7 +3338,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info char cseq_method[MAX_CSEQ_METHOD_SIZE] = ""; char call_id[MAX_CALL_ID_SIZE] = ""; gchar *media_type_str_lower_case = NULL; - http_message_info_t message_info = { HTTP_OTHERS, NULL }; + http_message_info_t message_info = { SIP_DATA, NULL, NULL }; char *content_encoding_parameter_str = NULL; guint resend_for_packet = 0; guint request_for_response = 0; @@ -4703,11 +4703,19 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info if (!strcmp(media_type_str_lower_case, "application/sdp")) { /* Resends don't count */ if (resend_for_packet == 0) { + sdp_setup_info_t *setup_info = wmem_new(wmem_file_scope(), sdp_setup_info_t); + + setup_info->setup_proto = g_strdup("SIP"); + setup_info->hf_id = hf_header_array[POS_CALL_ID]; + setup_info->hf_type = SDP_TRACE_ID_HF_TYPE_STR; + setup_info->trace_id = wmem_strdup(wmem_file_scope(), call_id); + message_info.data = setup_info; + if (line_type == REQUEST_LINE) { DPRINT(("calling setup_sdp_transport() SDP_EXCHANGE_OFFER frame=%d", pinfo->num)); DINDENT(); - setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_OFFER, pinfo->num, sip_delay_sdp_changes); + setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_OFFER, pinfo->num, sip_delay_sdp_changes, setup_info); DENDENT(); } else if (line_type == STATUS_LINE) { if (stat_info->response_code >= 400) { @@ -4716,7 +4724,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info request_for_response, pinfo->num)); DINDENT(); /* SIP client request failed, so SDP offer should fail */ - setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_ANSWER_REJECT, request_for_response, sip_delay_sdp_changes); + setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_ANSWER_REJECT, request_for_response, sip_delay_sdp_changes, setup_info); DENDENT(); } else if ((stat_info->response_code >= 200) && (stat_info->response_code <= 299)) { @@ -4725,7 +4733,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, int remaining_length, packet_info request_for_response, pinfo->num)); DINDENT(); /* SIP success request, so SDP offer should be accepted */ - setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_ANSWER_ACCEPT, request_for_response, sip_delay_sdp_changes); + setup_sdp_transport(next_tvb, pinfo, SDP_EXCHANGE_ANSWER_ACCEPT, request_for_response, sip_delay_sdp_changes, setup_info); DENDENT(); } } |