--- packet-sip.c.old	2003-11-25 19:02:57.000000000 +0100
+++ packet-sip.c	2003-12-05 14:48:25.000000000 +0100
@@ -68,11 +68,12 @@
 static gint hf_sip_tag = -1;
 
 /* Initialize the subtree pointers */
-static gint ett_sip = -1;
-static gint ett_sip_reqresp = -1;
-static gint ett_sip_hdr = -1;
-static gint ett_raw_text = -1;
-static gint ett_sip_element = -1;
+static gint ett_sip 		= -1;
+static gint ett_sip_reqresp 	= -1;
+static gint ett_sip_hdr 	= -1;
+static gint ett_raw_text 	= -1;
+static gint ett_sip_element 	= -1;
+static gint ett_sip_message_body = -1;
 
 /* PUBLISH method added as per http://www.ietf.org/internet-drafts/draft-ietf-sip-publish-01.txt */
 static const char *sip_methods[] = {
@@ -389,11 +390,12 @@
 	line_type_t line_type;
         tvbuff_t *next_tvb;
         gboolean is_known_request;
+	gboolean content_is_sdp = FALSE;
         char *descr;
         guint token_1_len;
 	guint current_method_idx = 0;
         proto_item *ts = NULL, *ti, *th = NULL, *sip_element_item;
-        proto_tree *sip_tree, *reqresp_tree, *hdr_tree = NULL, *sip_element_tree;
+        proto_tree *sip_tree = NULL, *reqresp_tree, *hdr_tree = NULL, *sip_element_tree, *message_body_tree;
 	guchar contacts = 0, contact_is_star = 0, expires_is_0 = 0;	
 	char csec_method[16] = "";
 
@@ -454,15 +456,14 @@
                         col_set_str(pinfo->cinfo, COL_INFO, "Continuation");
                 break;
         }
-
         if (tree) {
-                ts = proto_tree_add_item(tree, proto_sip, tvb, 0, -1, FALSE);
-                sip_tree = proto_item_add_subtree(ts, ett_sip);
+        ts = proto_tree_add_item(tree, proto_sip, tvb, 0, -1, FALSE);
+        sip_tree = proto_item_add_subtree(ts, ett_sip);
 
-                ti = proto_tree_add_text(sip_tree, tvb, 0, next_offset,
-                                         "%s line: %s", descr,
-                                         tvb_format_text(tvb, 0, linelen));
-                reqresp_tree = proto_item_add_subtree(ti, ett_sip_reqresp);
+        ti = proto_tree_add_text(sip_tree, tvb, 0, next_offset,
+                                  "%s line: %s", descr,
+                                  tvb_format_text(tvb, 0, linelen));
+        reqresp_tree = proto_item_add_subtree(ti, ett_sip_reqresp);
 
 		switch (line_type) {
 
@@ -511,7 +512,6 @@
                          */
                         break;
                 }
-                if (tree) {
                         line_end_offset = offset + linelen;
 			colon_offset = tvb_find_guint8(tvb, offset, linelen,
 			    ':');
@@ -658,6 +658,21 @@
 						    value, "%s",
 						    tvb_format_text(tvb, offset, linelen));
 					break;
+
+
+					case POS_CONTENT_TYPE :
+						proto_tree_add_string_format(hdr_tree,
+						    hf_header_array[hf_index], tvb,
+						    offset, next_offset - offset,
+						    value, "%s",
+						    tvb_format_text(tvb, offset, linelen));
+						/* Minimal effort at content type, see if it's SDP or not 	*/
+						/* expected format "application/sdp"				*/
+						if (strcmp(value, "application/sdp") == 0)
+						{
+							content_is_sdp = TRUE;
+						}
+					break;	
 					case POS_CONTACT :
 						contacts++;
 						if (strcmp(value, "*") == 0)
@@ -676,11 +691,11 @@
 					g_free(value);
 				}/*if HF_index */
 			}/* if colon_offset */ 
-                }/* if tree */
                 offset = next_offset;
         }/* End while */
 
         if (tvb_offset_exists(tvb, next_offset)) {
+
                 /*
                  * There's a message body starting at "next_offset".
                  * Set the length of the SIP portion and of the
@@ -689,7 +704,24 @@
                 proto_item_set_end(ts, tvb, next_offset);
                 proto_item_set_end(th, tvb, next_offset);
                 next_tvb = tvb_new_subset(tvb, next_offset, -1, -1);
-                call_dissector(sdp_handle, next_tvb, pinfo, tree);
+               	ti = proto_tree_add_text(sip_tree, next_tvb, 0, -1,
+                                         "Message body");
+               	message_body_tree = proto_item_add_subtree(ti, ett_sip_message_body);
+		if ( content_is_sdp )
+		{
+                	call_dissector(sdp_handle, next_tvb, pinfo, message_body_tree);
+		}
+		else
+		{
+			offset = 0;
+	        	while (tvb_offset_exists(next_tvb, offset)) {
+	                	tvb_find_line_end(next_tvb, offset, -1, &next_offset, FALSE);
+	                	linelen = next_offset - offset;
+	                	proto_tree_add_text(message_body_tree, next_tvb, offset, linelen,
+	                   		"%s", tvb_format_text(next_tvb, offset, linelen));
+ 	        		offset = next_offset;
+ 	 		}/* end while */
+		}
         }
 
 
@@ -1343,8 +1375,8 @@
                 &ett_sip_reqresp,
                 &ett_sip_hdr,
 		&ett_sip_element,
+		&ett_sip_message_body,
         };
-
         static gint *ett_raw[] = {
                 &ett_raw_text,
         };
