Ethereal-dev: Re: [Ethereal-dev] T.38 decode with RTP

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Alejandro Vaquero <alejandrovaquero@xxxxxxxxx>
Date: Sun, 15 Jan 2006 19:19:20 -0700
Hi All, find attached a patch to add t38 setup info for h245 packets.

Regards
Alejandro

Alejandro Vaquero wrote:
Hi Thomas,
that is because we only support t38 conversation setup on SDP sessions (SIP or MGCP for example), and not in h245 used in h323. When time permits, will add this for h245.

Alejandro

Thomas Sillaber wrote:
Hola Alejandro,

thanks for the t30 patch => cool !

What is the "method" you are talking about? is that "Decode as.."? also can you provide the capture?


When setting up a voip fax call the first packets (ced tone) are sent via
rtp . Then the actual channel is closed and reopend as t.38. ethereal
decodes the rtp packets right, but the t.38 packets are decoded as unkown
rtp verion 0.
To troubleshoot t.38 issues it will be cool to see the t.38 packets as t.38
protokoll and not as rtp version 0 packets (unknown packets)!!

Attached is a sample t.38 capture


Thanks

Thomas





------------------------------------------------------------------------

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

Index: asn1/h245/packet-h245-template.c
===================================================================
--- asn1/h245/packet-h245-template.c	(revision 17033)
+++ asn1/h245/packet-h245-template.c	(working copy)
@@ -52,6 +52,7 @@
 #include <epan/emem.h>
 #include "packet-rtp.h"
 #include "packet-rtcp.h"
+#include "packet-t38.h"
 #include "packet-ber.h"
 #include <epan/emem.h>
 
@@ -61,6 +62,7 @@
 
 static dissector_handle_t rtp_handle=NULL;
 static dissector_handle_t rtcp_handle=NULL;
+static dissector_handle_t t38_handle=NULL;
 static dissector_table_t nsp_object_dissector_table;
 static dissector_table_t nsp_h221_dissector_table;
 static dissector_handle_t nsp_handle;
@@ -403,6 +405,7 @@
 void proto_reg_handoff_h245(void) {
 	rtp_handle = find_dissector("rtp");
 	rtcp_handle = find_dissector("rtcp");
+	t38_handle = find_dissector("t38");
 	data_handle = find_dissector("data");
 	h263_handle = find_dissector("h263data");
 	amr_handle = find_dissector("amr_if2");
Index: asn1/h245/h245.cnf
===================================================================
--- asn1/h245/h245.cnf	(revision 17033)
+++ asn1/h245/h245.cnf	(working copy)
@@ -576,25 +576,38 @@
 #----------------------------------------------------------------------------------------
 #.FN_FTR OpenLogicalChannelAck/forwardMultiplexAckParameters
 	
-	if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
-		address src_addr;
+	if (!pinfo->fd->flags.visited) {
+		if (codec_type && strcmp(codec_type, "t38fax")==0) {
+			if(ipv4_address!=0 && ipv4_port!=0 && t38_handle){
+				address src_addr;
 
-		src_addr.type=AT_IPv4;
-		src_addr.len=4;
-		src_addr.data=(guint8*)&ipv4_address;
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&ipv4_address;
 
-		rtp_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num, NULL);
-	}
-	if((!pinfo->fd->flags.visited) && rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){
-		address src_addr;
+				t38_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num);
+			}
+		} else {
+			if(ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
+				address src_addr;
 
-		src_addr.type=AT_IPv4;
-		src_addr.len=4;
-		src_addr.data=(guint8*)&rtcp_ipv4_address;
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&ipv4_address;
 
-		rtcp_add_address(pinfo, &src_addr, rtcp_ipv4_port, 0, "H245", pinfo->fd->num);
+				rtp_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num, NULL);
+			}
+			if(rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){
+				address src_addr;
+
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&rtcp_ipv4_address;
+
+				rtcp_add_address(pinfo, &src_addr, rtcp_ipv4_port, 0, "H245", pinfo->fd->num);
+			}
+		}
 	}
-
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_HDR OpenLogicalChannel/reverseLogicalChannelParameters/multiplexParameters
@@ -606,25 +619,39 @@
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_FTR OpenLogicalChannel/reverseLogicalChannelParameters/multiplexParameters
-	if((!pinfo->fd->flags.visited) && ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
-		address src_addr;
+	
+	if (!pinfo->fd->flags.visited) {
+		if (codec_type && (strcmp(codec_type, "t38fax")==0)) {
+			if(ipv4_address!=0 && ipv4_port!=0 && t38_handle){
+				address src_addr;
 
-		src_addr.type=AT_IPv4;
-		src_addr.len=4;
-		src_addr.data=(guint8*)&ipv4_address;
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&ipv4_address;
 
-		rtp_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num, NULL);
-	}
-	if((!pinfo->fd->flags.visited) && rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){
-		address src_addr;
+				t38_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num);
+			}
+		} else {
+			if(ipv4_address!=0 && ipv4_port!=0 && rtp_handle){
+				address src_addr;
 
-		src_addr.type=AT_IPv4;
-		src_addr.len=4;
-		src_addr.data=(guint8*)&rtcp_ipv4_address;
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&ipv4_address;
 
-		rtcp_add_address(pinfo, &src_addr, rtcp_ipv4_port, 0, "H245", pinfo->fd->num);
+				rtp_add_address(pinfo, &src_addr, ipv4_port, 0, "H245", pinfo->fd->num, NULL);
+			}
+			if(rtcp_ipv4_address!=0 && rtcp_ipv4_port!=0 && rtcp_handle){
+				address src_addr;
+
+				src_addr.type=AT_IPv4;
+				src_addr.len=4;
+				src_addr.data=(guint8*)&rtcp_ipv4_address;
+
+				rtcp_add_address(pinfo, &src_addr, rtcp_ipv4_port, 0, "H245", pinfo->fd->num);
+			}
+		}
 	}
-
 #.END
 
 #--- NonStandardParameter ---------------------------------------------------------------