sensitivity of packet range options fine tuning:
[obnox/wireshark/wip.git] / packet-isup.c
index 183b9b2f46a63eb40ae7fa66d502f33711b74503..f5f4e2105a455c327d92b23dd7a88cd00de5f5d0 100644 (file)
@@ -1,8 +1,11 @@
 /* packet-isup.c
  * Routines for ISUP dissection
  * Copyright 2001, Martina Obermeier <martina.obermeier@icn.siemens.de>
- *
- * $Id: packet-isup.c,v 1.21 2003/04/19 20:13:22 tuexen Exp $
+ * Modified 2003-09-10 by Anders Broman
+ *             <anders.broman@ericsson.com>
+ * Inserted routines for BICC dissection according to Q.765.5 Q.1902 Q.1970 Q.1990,
+ * calling SDP dissector for RFC2327 decoding.
+ * $Id: packet-isup.c,v 1.41 2003/12/12 19:55:27 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #include <glib.h>
 
 #include <epan/packet.h>
+#include <epan/ipv6-utils.h>
+#include <tap.h>
 #include "packet-q931.h"
+#include "packet-isup.h"
 
 #define MTP3_ISUP_SERVICE_INDICATOR     5
+#define MTP3_BICC_SERVICE_INDICATOR     13
 #define ASCII_NUMBER_DELTA              0x30
 #define ASCII_LETTER_DELTA              0x37
 
 #define MESSAGE_TYPE_IDENT_RSP         55
 #define MESSAGE_TYPE_SEGMENTATION      56
 #define MESSAGE_TYPE_LOOP_PREVENTION   64
+#define MESSAGE_TYPE_APPLICATION_TRANS 65
+#define MESSAGE_TYPE_PRE_RELEASE_INFO  66
+#define MESSAGE_TYPE_SUBSEQUENT_DIR_NUM 67
+
 
-static const value_string isup_message_type_value[] = {
+const value_string isup_message_type_value[] = {
   { MESSAGE_TYPE_INITIAL_ADDR,          "Initial address"},
   { MESSAGE_TYPE_SUBSEQ_ADDR,           "Subsequent address"},
   { MESSAGE_TYPE_INFO_REQ,              "Information request (national use)"},
@@ -139,10 +150,14 @@ static const value_string isup_message_type_value[] = {
   { MESSAGE_TYPE_IDENT_RSP,             "Identification response"},
   { MESSAGE_TYPE_SEGMENTATION,          "Segmentation"},
   { MESSAGE_TYPE_LOOP_PREVENTION,       "Loop prevention"},
+  { MESSAGE_TYPE_APPLICATION_TRANS,    "Application transport"},
+  { MESSAGE_TYPE_PRE_RELEASE_INFO,     "Pre-release information"},     
+  { MESSAGE_TYPE_SUBSEQUENT_DIR_NUM,   "Subsequent Directory Number (national use)"},
+
   { 0,                                  NULL}};
 
 /* Same as above but in acronym form (for the Info column) */
-static const value_string isup_message_type_value_acro[] = {
+const value_string isup_message_type_value_acro[] = {
   { MESSAGE_TYPE_INITIAL_ADDR,          "IAM"},
   { MESSAGE_TYPE_SUBSEQ_ADDR,           "SAM"},
   { MESSAGE_TYPE_INFO_REQ,              "INR"},
@@ -189,6 +204,10 @@ static const value_string isup_message_type_value_acro[] = {
   { MESSAGE_TYPE_IDENT_RSP,             "IDS"},
   { MESSAGE_TYPE_SEGMENTATION,          "SGM"},
   { MESSAGE_TYPE_LOOP_PREVENTION,       "LOP"},
+  { MESSAGE_TYPE_APPLICATION_TRANS,    "APM"},
+  { MESSAGE_TYPE_PRE_RELEASE_INFO,     "PRI"},         
+  { MESSAGE_TYPE_SUBSEQUENT_DIR_NUM,   "SDN"},
+
   { 0,                                  NULL}};
 
 /* Definition of Parameter Types */
@@ -270,6 +289,7 @@ static const value_string isup_message_type_value_acro[] = {
 #define PARAM_TYPE_UID_ACTION_IND       116
 #define PARAM_TYPE_UID_CAPAB_IND        117
 #define PARAM_TYPE_REDIRECT_COUNTER     119
+#define PARAM_TYPE_APPLICATON_TRANS    120
 #define PARAM_TYPE_COLLECT_CALL_REQ     121
 #define PARAM_TYPE_GENERIC_NR           192
 #define PARAM_TYPE_GENERIC_DIGITS       193
@@ -356,12 +376,15 @@ static const value_string isup_parameter_type_value[] = {
   { PARAM_TYPE_COLLECT_CALL_REQ,       "Collect call request"},
   { PARAM_TYPE_GENERIC_NR,             "Generic number"},
   { PARAM_TYPE_GENERIC_DIGITS,         "Generic digits (national use)"},
+  { PARAM_TYPE_APPLICATON_TRANS,       "Application transport"},
   { 0,                                 NULL}};
 
 
 #define CIC_LENGTH                             2
+#define BICC_CIC_LENGTH                        4
 #define MESSAGE_TYPE_LENGTH                    1
 #define COMMON_HEADER_LENGTH                   (CIC_LENGTH + MESSAGE_TYPE_LENGTH)
+#define BICC_COMMON_HEADER_LENGTH              (BICC_CIC_LENGTH + MESSAGE_TYPE_LENGTH)
 
 #define MAXLENGTH                            0xFF /* since length field is 8 Bit long - used in number dissectors;
                                                     max. number of address digits is 15 digits, but MAXLENGTH used
@@ -433,6 +456,7 @@ static const value_string isup_parameter_type_value[] = {
 #define CREDIT_LENGTH         1 /* for parameter Connection request */
 
 #define CIC_OFFSET            0
+#define BICC_CIC_OFFSET       0
 
 #define NO_SATELLITE_CIRCUIT_IN_CONNECTION   0
 #define ONE_SATELLITE_CIRCUIT_IN_CONNECTION  1
@@ -1031,6 +1055,8 @@ static const true_false_string isup_extension_ind_value = {
   "information continues through the next octet"
 };
 
+
+
 static const value_string isup_call_to_be_diverted_ind_value[] = {
   /* according 3.72/Q.763 */
   {  0,        "no indication"},
@@ -1055,6 +1081,45 @@ static const value_string isup_conference_acceptance_ind_value[] = {
   {  3,        "spare"},
   {  0,         NULL}};
 
+static const value_string isup_application_transport_parameter_value[] = {
+  /* according 3.82/Q.763 */
+  {  0,        "Unidentified Context and Error Handling (UCEH) ASE"},
+  {  1,        "PSS1 ASE (VPN)"},
+  {  2,        "spare"},
+  {  3,        "Charging ASE"},
+  {  4,        "GAT"},
+  {  5,           "BAT ASE"},
+  {  6,           "Enhanced Unidentified Context and Error Handling ASE (EUCEH ASE)"},
+  {  0,         NULL}};
+
+static const true_false_string isup_Release_call_indicator_value = {
+  "release call",
+  "do not release call"
+};
+
+static const true_false_string isup_Send_notification_ind_value = {
+  "send notification",
+  "do not send notification"
+};
+static const value_string isup_APM_segmentation_ind_value[] = {
+  {  0x00,                     "final segment"},
+  {  0x01,                     "number of following segments"},
+  {  0x02,                     "number of following segments"},
+  {  0x03,                     "number of following segments"},
+  {  0x04,                     "number of following segments"},
+  {  0x05,                     "number of following segments"},
+  {  0x06,                     "number of following segments"},
+  {  0x07,                     "number of following segments"},
+  {  0x08,                     "number of following segments"},
+  {  0x09,                     "number of following segments"},
+  {  0,                NULL}};
+
+static const true_false_string isup_Sequence_ind_value = {
+  "new sequence",
+  "subsequent segment to first segment"
+};
+
 
 /* Generalized bit masks for 8 and 16 bits fields */
 #define A_8BIT_MASK  0x01
@@ -1070,6 +1135,7 @@ static const value_string isup_conference_acceptance_ind_value[] = {
 #define CB_8BIT_MASK 0x06
 #define DC_8BIT_MASK 0x0C
 #define FE_8BIT_MASK 0x30
+#define GF_8BIT_MASK 0x60
 #define GFE_8BIT_MASK 0x70
 #define DCBA_8BIT_MASK 0x0F
 #define EDCBA_8BIT_MASK 0x1F
@@ -1109,7 +1175,12 @@ static const value_string isup_conference_acceptance_ind_value[] = {
 
 /* Initialize the protocol and registered fields */
 static int proto_isup = -1;
+static int proto_bicc = -1;
 static int hf_isup_cic = -1;
+static int hf_bicc_cic = -1;
+
+static int isup_tap = -1;
+
 static int hf_isup_message_type = -1;
 static int hf_isup_parameter_type = -1;
 static int hf_isup_parameter_length = -1;
@@ -1208,7 +1279,7 @@ static int hf_isup_inband_information_ind = -1;
 static int hf_isup_call_diversion_may_occur_ind = -1;
 static int hf_isup_mlpp_user_ind = -1;
 
-static int hf_isup_access_delivery_ind =- -1;
+static int hf_isup_access_delivery_ind = -1;
 
 static int hf_isup_transmission_medium_requirement_prime = -1;
 
@@ -1217,19 +1288,75 @@ static int hf_isup_loop_prevention_response_ind = -1;
 static int hf_isup_temporary_alternative_routing_ind = -1;
 static int hf_isup_extension_ind = -1;
 
-static int hf_isup_call_to_be_diverted_ind = -1;
-
-static int hf_isup_call_to_be_offered_ind = -1;
+static int hf_isup_call_to_be_diverted_ind                     = -1;
+
+static int hf_isup_call_to_be_offered_ind                      = -1;
+
+static int hf_isup_conference_acceptance_ind                   = -1;
+
+static int hf_isup_transit_at_intermediate_exchange_ind        = -1;
+static int hf_isup_Release_call_ind                            = -1;
+static int hf_isup_Send_notification_ind                       = -1;
+static int hf_isup_Discard_message_ind_value                   = -1;
+static int hf_isup_Discard_parameter_ind                       = -1;
+static int hf_isup_Pass_on_not_possible_indicator              = -1;
+static int hf_isup_Broadband_narrowband_interworking_ind       = -1;
+
+static int hf_isup_app_cont_ident                                      = -1;
+static int hf_isup_app_Send_notification_ind                           = -1;
+static int hf_isup_apm_segmentation_ind                                        = -1;
+static int hf_isup_apm_si_ind                                          = -1;
+static int hf_isup_app_Release_call_ind                                        = -1;
+static int hf_length_indicator                                         = -1;
+static int hf_afi                                                      = -1;
+static int hf_bat_ase_identifier                                       = -1;
+static int hf_Action_Indicator                                         = -1;
+
+static int hf_Instruction_ind_for_general_action                       = -1;   
+
+static int hf_Send_notification_ind_for_general_action                 = -1;
+
+static int hf_Instruction_ind_for_pass_on_not_possible                 = -1;
+
+static int hf_Send_notification_ind_for_pass_on_not_possible           = -1;
+static int hf_BCTP_Version_Indicator                                   = -1;
+static int hf_Tunnelled_Protocol_Indicator                             = -1;
+static int hf_TPEI                                                     = -1;
+static int hf_BVEI                                                     = -1;
+static int hf_bncid                                                    = -1;
+static int hf_bat_ase_biwfa                                            = -1;
+static int hf_characteristics                                          = -1;
+
+static int hf_Organization_Identifier                                  = -1;
+static int hf_codec_type                                               = -1;
+static int hf_etsi_codec_type                                          = -1;
+static int hf_bearer_control_tunneling                                 = -1;
+static int hf_Local_BCU_ID                                             = -1;
+static int hf_late_cut_trough_cap_ind                                  = -1;
+static int hf_bat_ase_signal                                           = -1;
+static int hf_bat_ase_duration                                         = -1;
+static int hf_bat_ase_bearer_redir_ind                                 = -1;
+static int hf_BAT_ASE_Comp_Report_Reason                               = -1;
+static int hf_BAT_ASE_Comp_Report_ident                                        = -1;
+static int hf_BAT_ASE_Comp_Report_diagnostic                           = -1;
+static int hf_nsap_ipv4_addr                                           = -1;
+static int hf_nsap_ipv6_addr                                           = -1;
+static int hf_iana_icp                                                 = -1;
+/* Initialize the subtree pointers */
+static gint ett_isup                                                   = -1;
+static gint ett_isup_parameter                                                 = -1;
+static gint ett_isup_address_digits                                    = -1;
+static gint ett_isup_pass_along_message                                        = -1;
+static gint ett_isup_circuit_state_ind                                 = -1;
+static gint ett_bat_ase                                                        = -1;   
+static gint ett_bicc                                                   = -1;
+static gint ett_bat_ase_element                                                = -1;
+static gint ett_bat_ase_iwfa                                           = -1;
 
-static int hf_isup_conference_acceptance_ind = -1;
 
-/* Initialize the subtree pointers */
-static gint ett_isup = -1;
-static gint ett_isup_parameter = -1;
-static gint ett_isup_address_digits = -1;
-static gint ett_isup_pass_along_message = -1;
-static gint ett_isup_circuit_state_ind = -1;
 
+static dissector_handle_t sdp_handle;
 
 /* ------------------------------------------------------------------
   Mapping number to ASCII-character
@@ -1344,8 +1471,7 @@ dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *
                                            "Called Party Number");
   address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits);
 
-  length = tvb_length_remaining(parameter_tvb, offset);
-  while(length > 0){
+  while((length = tvb_reported_length_remaining(parameter_tvb, offset)) > 0){
     address_digit_pair = tvb_get_guint8(parameter_tvb, offset);
     proto_tree_add_uint(address_digits_tree, hf_isup_called_party_odd_address_signal_digit, parameter_tvb, offset, 1, address_digit_pair);
     called_number[i++] = number_to_char(address_digit_pair & ISUP_ODD_ADDRESS_SIGNAL_DIGIT_MASK);
@@ -1354,7 +1480,6 @@ dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *
       called_number[i++] = number_to_char((address_digit_pair & ISUP_EVEN_ADDRESS_SIGNAL_DIGIT_MASK) / 0x10);
     }
     offset++;
-    length = tvb_length_remaining(parameter_tvb, offset);
   }
 
   if  (((indicators1 & 0x80) == 0) && (tvb_length(parameter_tvb) > 0)){ /* Even Indicator set -> last even digit is valid & has be displayed */
@@ -1391,8 +1516,7 @@ dissect_isup_subsequent_number_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
                                            "Subsequent Number");
   address_digits_tree = proto_item_add_subtree(address_digits_item, ett_isup_address_digits);
 
-  length = tvb_length_remaining(parameter_tvb, offset);
-  while(length > 0){
+  while((length = tvb_reported_length_remaining(parameter_tvb, offset)) > 0){
     address_digit_pair = tvb_get_guint8(parameter_tvb, offset);
     proto_tree_add_uint(address_digits_tree, hf_isup_called_party_odd_address_signal_digit, parameter_tvb, offset, 1, address_digit_pair);
     called_number[i++] = number_to_char(address_digit_pair & ISUP_ODD_ADDRESS_SIGNAL_DIGIT_MASK);
@@ -1401,7 +1525,6 @@ dissect_isup_subsequent_number_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
       called_number[i++] = number_to_char((address_digit_pair & ISUP_EVEN_ADDRESS_SIGNAL_DIGIT_MASK) / 0x10);
     }
     offset++;
-    length = tvb_length_remaining(parameter_tvb, offset);
   }
 
   if (((indicators1 & 0x80) == 0) && (tvb_length(parameter_tvb) > 0)){ /* Even Indicator set -> last even digit is valid & has be displayed */
@@ -1577,10 +1700,13 @@ static const value_string q850_cause_code_vals[] = {
        { 0,    NULL }
 };
 
+
+
+
 static void
 dissect_isup_cause_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
-{ guint length = tvb_length(parameter_tvb);
-  proto_tree_add_text(parameter_tree, parameter_tvb,0, length, "Cause indicators (-> Q.850)");
+{ guint length = tvb_reported_length(parameter_tvb);
+  proto_tree_add_text(parameter_tree, parameter_tvb,0, -1, "Cause indicators (-> Q.850)");
   dissect_q931_cause_ie(parameter_tvb,0,length,
                                            parameter_tree,
                                            hf_isup_cause_indicator);
@@ -1610,9 +1736,9 @@ dissect_isup_range_and_status_parameter(tvbuff_t *parameter_tvb, proto_tree *par
 
   range = tvb_get_guint8(parameter_tvb, 0);
   proto_tree_add_uint_format(parameter_tree, hf_isup_range_indicator, parameter_tvb, 0, RANGE_LENGTH, range, "Range: %u", range);
-  actual_status_length = tvb_length_remaining(parameter_tvb, RANGE_LENGTH);
+  actual_status_length = tvb_reported_length_remaining(parameter_tvb, RANGE_LENGTH);
   if (actual_status_length > 0)
-    proto_tree_add_text(parameter_tree, parameter_tvb , RANGE_LENGTH, actual_status_length, "Status subfield");
+    proto_tree_add_text(parameter_tree, parameter_tvb , RANGE_LENGTH, -1, "Status subfield");
   else
     proto_tree_add_text(parameter_tree, parameter_tvb , 0, 0, "Status subfield is not present with this message type");
 
@@ -1657,11 +1783,9 @@ dissect_isup_circuit_state_ind_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
   gint i=0;
   gint length;
 
-  length = tvb_length_remaining(parameter_tvb, offset);
-  while(length > 0){
+  while((length = tvb_reported_length_remaining(parameter_tvb, offset)) > 0){
     circuit_state_item = proto_tree_add_text(parameter_tree, parameter_tvb,
-                                            offset,
-                                            tvb_length_remaining(parameter_tvb, offset),
+                                            offset, -1,
                                             "Circuit# CIC+%u state", i);
     circuit_state_tree = proto_item_add_subtree(circuit_state_item, ett_isup_circuit_state_ind);
     circuit_state = tvb_get_guint8(parameter_tvb, offset);
@@ -1676,7 +1800,6 @@ dissect_isup_circuit_state_ind_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
       proto_item_set_text(circuit_state_item, "Circuit# CIC+%u state: %s", i++, val_to_str(circuit_state&BA_8BIT_MASK, isup_mtc_blocking_state_DCnot00_value, "unknown"));
     }
     offset++;
-    length = tvb_length_remaining(parameter_tvb, offset);
   }
   proto_item_set_text(parameter_item, "Circuit state indicator (national use)");
 }
@@ -1699,8 +1822,8 @@ dissect_isup_event_information_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
  */
 static void
 dissect_isup_user_to_user_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
-{ guint length = tvb_length(parameter_tvb);
-  proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "User-to-user info (-> Q.931)");
+{ guint length = tvb_reported_length(parameter_tvb);
+  proto_tree_add_text(parameter_tree, parameter_tvb, 0, -1, "User-to-user info (-> Q.931)");
   dissect_q931_user_user_ie(parameter_tvb, 0, length,
     parameter_tree );
   proto_item_set_text(parameter_item, "User-to-user information, see Q.931 (%u byte%s length)", length , plurality(length, "", "s"));
@@ -1726,10 +1849,1277 @@ dissect_isup_call_reference_parameter(tvbuff_t *parameter_tvb, proto_tree *param
  */
 static void
 dissect_isup_access_transport_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
-{ guint length = tvb_length(parameter_tvb);
-  proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "Access transport parameter field (-> Q.931)");
+{ guint length = tvb_reported_length(parameter_tvb);
+  proto_tree_add_text(parameter_tree, parameter_tvb, 0, -1, "Access transport parameter field (-> Q.931)");
   proto_item_set_text(parameter_item, "Access transport, see Q.931 (%u byte%s length)", length , plurality(length, "", "s"));
 }
+
+/* dissect x.213 NSAP coded Address */
+
+static const value_string x213_afi_value[] = {
+       { 0x34, "IANA ICP"},
+       { 0x35, "IANA ICP"},
+       { 0x36, "X.121"},
+       { 0x37, "X.121"},
+       { 0x38, "ISO DCC"},
+       { 0x39, "ISO DCC"},
+       { 0x40, "F.69"},
+       { 0x41, "F.69"},
+       { 0x42, "E.163"},
+       { 0x43, "E.163"},
+       { 0x44, "E.164"},
+       { 0x45, "E.164"},
+       { 0x46, "ISO 6523-ICD"},
+       { 0x47, "ISO 6523-ICD"},
+       { 0x48, "Local"},
+       { 0x49, "Local"},
+       { 0x50, "Local ISO/IEC 646 character "},
+       { 0x51, "Local ( National character )"},
+       { 0x52, "X.121"},
+       { 0x53, "X.121"},
+       { 0x54, "F.69"},
+       { 0x55, "F.69"},
+       { 0x56, "E.163"},
+       { 0x57, "E.163"},
+       { 0x58, "E.164"},
+       { 0x59, "E.164"},
+
+       { 0x76, "ITU-T IND"},
+       { 0x77, "ITU-T IND"},
+
+       { 0xb8, "IANA ICP Group no"},
+       { 0xb9, "IANA ICP Group no"},
+       { 0xba, "X.121 Group no"},
+       { 0xbb, "X.121 Group no"},
+       { 0xbc, "ISO DCC Group no"},
+       { 0xbd, "ISO DCC Group no"},
+       { 0xbe, "F.69 Group no"},
+       { 0xbf, "F.69 Group no"},
+       { 0xc0, "E.163 Group no"},
+       { 0xc1, "E.163 Group no"},
+       { 0xc2, "E.164 Group no"},
+       { 0xc3, "E.164 Group no"},
+       { 0xc4, "ISO 6523-ICD Group no"},
+       { 0xc5, "ISO 6523-ICD Group no"},
+       { 0xc6, "Local Group no"},
+       { 0xc7, "Local Group no"},
+       { 0xc8, "Local ISO/IEC 646 character Group no"},
+       { 0xc9, "Local ( National character ) Group no"},
+       { 0xca, "X.121 Group no"},
+       { 0xcb, "X.121 Group no"},
+       { 0xcd, "F.69 Group no"},
+       { 0xce, "F.69 Group no"},
+       { 0xcf, "E.163 Group no"},
+       { 0xde, "E.163 Group no"},
+       { 0xd0, "E.164 Group no"},
+       { 0xd1, "E.164 Group no"},
+
+       { 0xe2, "ITU-T IND Group no"},
+       { 0xe3, "ITU-T IND Group no"},
+       { 0,    NULL }
+};
+
+static const value_string E164_country_code_value[] = {
+       { 0x00, "Reserved (Assignment of all 0XX codes will be feasible after 31 December 2000. This question is currently under study.)"}, 
+       { 0x01, "Americas"}, 
+       { 0x020,"Egypt"},
+       { 0x0210,"Spare code"},
+       { 0x0211,"Spare code"},
+       { 0x0212,"Morocco"},
+       { 0x0213,"Algeria"},
+       { 0x0214,"spare code"},
+       { 0x0215,"spare code"}, 
+       { 0x0216,"Tunisia"}, 
+       { 0x0217,"Spare code"}, 
+       { 0x0218,"Libya"},
+       { 0x0219,"Spare code"}, 
+       { 0x0220,"Gambia"},
+       { 0x0221,"Senegal"},
+       { 0x0222,"Mauritania"}, 
+       { 0x0223,"Mali"},
+       { 0x0224,"Guinea"},
+       { 0x0225,"Ivory Coast"}, 
+       { 0x0226,"Burkina Faso"},
+       { 0x0227,"Niger"},
+       { 0x0228,"Togolese Republic"},
+       { 0x0229,"Benin"},
+       { 0x0230,"Mauritius"}, 
+       { 0x0231,"Liberia "},
+       { 0x0232,"Sierra Leone"},
+       { 0x0233,"Ghana"},
+       { 0x0234,"Nigeria"},
+       { 0x0235,"Chad"},
+       { 0x0236,"Central African Republic"},
+       { 0x0237,"Cameroon"},
+       { 0x0238,"Cape Verde"},
+       { 0x0239,"Sao Tome and Principe"},
+       { 0x0240,"Equatorial Guinea"},
+       { 0x0241,"Gabonese Republic"},
+       { 0x0242,"Republic of Congo"},
+       { 0x0243,"Democratic Republic of Congo"},
+       { 0x0244,"Angola"},
+       { 0x0245,"Guinea-Bissau"},
+       { 0x0246,"Diego Garcia"},
+       { 0x0247,"Ascension"},
+       { 0x0248,"Seychelles"},
+       { 0x0249,"Sudan"},
+       { 0x0250,"Rwandese Republic"},
+       { 0x0251,"Ethiopia"},
+       { 0x0252,"Somali"},
+       { 0x0253,"Djibouti"},
+       { 0x0254,"Kenya"},
+       { 0x0255,"Tanzania"}, 
+       { 0x0256,"Uganda"},
+       { 0x0257,"Burundi"},
+       { 0x0258,"Mozambique"}, 
+       { 0x0259,"Spare code"},
+       { 0x0260,"Zambia"},
+       { 0x0261,"Madagascar"}, 
+       { 0x0262,"Reunion Island"}, 
+       { 0x0263,"Zimbabwe"},
+       { 0x0264,"Namibia"},
+       { 0x0265,"Malawi"},
+       { 0x0266,"Lesotho"},
+       { 0x0267,"Botswana"},
+       { 0x0268,"Swaziland"},
+       { 0x0269,"Comoros Mayotte"},
+       { 0x027,"South Africa"},
+       { 0x0281,"spare code"},
+       { 0x0282,"spare code"},
+       { 0x0283,"spare code"},
+       { 0x0284,"spare code"},
+       { 0x0285,"spare code"},
+       { 0x0286,"spare code"},
+       { 0x0287,"spare code"},
+       { 0x0288,"spare code"},
+       { 0x0289,"spare code"},
+       { 0x0290,"Saint Helena"},
+       { 0x0291,"Eritrea"},
+       { 0x0292,"spare code"}, 
+       { 0x0293,"spare code"},
+       { 0x0294,"spare code"},
+       { 0x0295,"spare code"},
+       { 0x0296,"spare code"},
+       { 0x0297,"Aruba"}, 
+       { 0x0298,"Faroe Islands"},
+       { 0x0299,"Greenland"},
+       { 0x030,"Greece"},
+       { 0x031,"Netherlands"}, 
+       { 0x032,"Belgium"},
+       { 0x033,"France"},
+       { 0x034,"Spain"},
+       { 0x0350,"Gibraltar"}, 
+       { 0x0351,"Portugal"},
+       { 0x0352,"Luxembourg"}, 
+       { 0x0353,"Ireland"},
+       { 0x0354,"Iceland"},
+       { 0x0355,"Albania"},
+       { 0x0356,"Malta"},
+       { 0x0357,"Cyprus"},
+       { 0x0358,"Finland"},
+       { 0x0359,"Bulgaria"},
+       { 0x036,"Hungary"},
+       { 0x0370,"Lithuania"}, 
+       { 0x0371,"Latvia"},
+       { 0x0372,"Estonia"},
+       { 0x0373,"Moldova"},
+       { 0x0374,"Armenia"},
+       { 0x0375,"Belarus"},
+       { 0x0376,"Andorra"},
+       { 0x0377,"Monaco"},
+       { 0x0378,"San Marino"}, 
+       { 0x0379,"Vatican"},
+       { 0x0380,"Ukraine"},
+       { 0x0381,"Yugoslavia"}, 
+       { 0x0382,"spare code"},
+       { 0x0383,"spare code"},
+       { 0x0384,"spare code"},
+       { 0x0385,"Croatia"},
+       { 0x0386,"Slovenia"},
+       { 0x0387,"Bosnia and Herzegovina"},
+       { 0x0388,"Groups of contries:"},  
+       { 0x0389,"Macedonia"},
+       { 0x039,"Italy"},
+       { 0x040,"Romania"}, 
+       { 0x041,"Switzerland"}, 
+       { 0x0420,"Czech Republic"}, 
+       { 0x0421,"Slovak Republic"},
+       { 0x0422,"Spare code"},
+       { 0x0423,"Liechtenstein"}, 
+       { 0x0424,"spare code"},
+       { 0x0425,"spare code"},
+       { 0x0426,"spare code"},
+       { 0x0427,"spare code"},
+       { 0x0428,"spare code"},
+       { 0x0429,"spare code"}, 
+       { 0x043,"Austria"},
+       { 0x044,"United Kingdom"},
+       { 0x045,"Denmark"},
+       { 0x046,"Sweden"},
+       { 0x047,"Norway"},
+       { 0x048,"Poland"},
+       { 0x049,"Germany"},
+       { 0x0500,"Falkland Islands (Malvinas)"},
+       { 0x0501,"Belize"},
+       { 0x0502,"Guatemala"}, 
+       { 0x0503,"El Salvador"}, 
+       { 0x0504,"Honduras"},
+       { 0x0505,"Nicaragua"},
+       { 0x0506,"Costa Rica"},
+       { 0x0507,"Panama"},
+       { 0x0508,"Saint Pierre and Miquelon"}, 
+       { 0x0509,"Haiti"},
+       { 0x051,"Peru"},
+       { 0x052,"Mexico"}, 
+       { 0x053,"Cuba"},
+       { 0x054,"Argentina"},
+       { 0x055,"Brazil"},
+       { 0x056,"Chile"},
+       { 0x057,"Colombia"}, 
+       { 0x058,"Venezuela"},
+       { 0x0590,"Guadeloupe"}, 
+       { 0x0591,"Bolivia"},
+       { 0x0592,"Guyana"},
+       { 0x0593,"Ecuador"},
+       { 0x0594,"French Guiana"}, 
+       { 0x0595,"Paraguay"},
+       { 0x0596,"Martinique"}, 
+       { 0x0597,"Suriname"},
+       { 0x0598,"Uruguay"},
+       { 0x0599,"Netherlands Antilles"}, 
+       { 0x060,"Malaysia"},
+       { 0x061,"Australia"},
+       { 0x062,"Indonesia"},
+       { 0x063,"Philippines"}, 
+       { 0x064,"New Zealand"},
+       { 0x065,"Singapore"},
+       { 0x066,"Thailand"},
+       { 0x0670,"East Timor"}, 
+       { 0x0671,"Spare code"},
+       { 0x0672,"Australian External Territories"}, 
+       { 0x0673,"Brunei Darussalam"},
+       { 0x0674,"Nauru"},
+       { 0x0675,"Papua New Guinea"},
+       { 0x0676,"Tonga"},
+       { 0x0677,"Solomon Islands"},
+       { 0x0678,"Vanuatu"},
+       { 0x0679,"Fiji"},
+       { 0x0680,"Palau"},
+       { 0x0681,"Wallis and Futuna"},
+       { 0x0682,"Cook Islands"},
+       { 0x0683,"Niue"},
+       { 0x0684,"American Samoa"},
+       { 0x0685,"Samoa"},
+       { 0x0686,"Kiribati"},
+       { 0x0687,"New Caledonia"},
+       { 0x0688,"Tuvalu"},
+       { 0x0689,"French Polynesia"},
+       { 0x0690,"Tokelau"},
+       { 0x0691,"Micronesia"}, 
+       { 0x0692,"Marshall Islands"},
+       { 0x0693,"spare code"},
+       { 0x0694,"spare code"},
+       { 0x0695,"spare code"},
+       { 0x0696,"spare code"},
+       { 0x0697,"spare code"},
+       { 0x0698,"spare code"},
+       { 0x0699,"spare code"},
+       { 0x07,"Russian Federation,Kazakstan"}, 
+       { 0x0800,"International Freephone Service (see E.169.1)"}, 
+       { 0x0801,"spare code"},
+       { 0x0802,"spare code"},
+       { 0x0803,"spare code"},
+       { 0x0804,"spare code"},
+       { 0x0805,"spare code"},
+       { 0x0806,"spare code"},
+       { 0x0807,"spare code"},
+       { 0x0808,"Universal International Shared Cost Number (see E.169.3)"}, 
+       { 0x0809,"Spare code"},
+       { 0x081,"Japan"},
+       { 0x082,"Korea (Republic of)"}, 
+       { 0x0830,"Spare code"},
+       { 0x0831,"Spare code"},
+       { 0x0832,"Spare code"},
+       { 0x0833,"Spare code"},
+       { 0x0834,"Spare code"},
+       { 0x0835,"Spare code"},
+       { 0x0836,"Spare code"},
+       { 0x0837,"Spare code"},
+       { 0x0838,"Spare code"},
+       { 0x0839,"Spare code"},
+       { 0x084,"Viet Nam"},
+       { 0x0850,"Democratic People's Republic of Korea"}, 
+       { 0x0851,"Spare code"},
+       { 0x0852,"Hongkong, China"}, 
+       { 0x0853,"Macau, China"},
+       { 0x0854,"Spare code"},
+       { 0x0855,"Cambodia"},
+       { 0x0856,"Laos"},
+       { 0x0857,"Spare code"},
+       { 0x0858,"Spare code"},
+       { 0x0859,"Spare code"},
+       { 0x086,"China (People's Republic of)"},
+       { 0x0870,"Inmarsat SNAC"},
+       { 0x0871,"Inmarsat (Atlantic Ocean-East)"}, 
+       { 0x0872,"Inmarsat (Pacific Ocean)"},
+       { 0x0873,"Inmarsat (Indian Ocean)"},
+       { 0x0874,"Inmarsat (Atlantic Ocean-West)"},
+       { 0x0875,"Reserved - Maritime Mobile Service Applications"},
+       { 0x0876,"Reserved - Maritime Mobile Service Applications"},
+       { 0x0877,"Reserved - Maritime Mobile Service Applications"}, 
+       { 0x0878,"Reserved - Universal Personal Telecommunication Service (UPT)"}, 
+       { 0x0879,"Reserved for national non-commercial purposes"},
+       { 0x0880,"Bangladesh"},
+       { 0x0881,"Global Mobile Satellite System (GMSS), shared code:"}, 
+       { 0x0882,"International Networks: (see E.164)"},
+       { 0x0883,"Spare code"},
+       { 0x0884,"Spare code"},
+       { 0x0885,"Spare code"},
+       { 0x0886,"Reserved"}, 
+       { 0x0887,"Spare code"},
+       { 0x0888,"Reserved for future global services (see E.164)"}, 
+       { 0x0889,"Spare code"},
+       { 0x0890,"Spare code"},
+       { 0x0891,"Spare code"},
+       { 0x0892,"Spare code"},
+       { 0x0893,"Spare code"},
+       { 0x0894,"Spare code"},
+       { 0x0895,"Spare code"},
+       { 0x0896,"Spare code"},
+       { 0x0897,"Spare code"},
+       { 0x0898,"Spare code"},
+       { 0x0899,"Spare code"}, 
+       { 0x090,"Turkey"}, 
+       { 0x091,"India"},
+       { 0x092,"Pakistan"}, 
+       { 0x093,"Afghanistan"}, 
+       { 0x094,"Sri Lanka"},
+       { 0x095,"Myanmar"},
+       { 0x0960,"Maldives"}, 
+       { 0x0961,"Lebanon"},
+       { 0x0962,"Jordan"},
+       { 0x0963,"Syrian Arab Republic"}, 
+       { 0x0964,"Iraq"},
+       { 0x0965,"Kuwait"}, 
+       { 0x0966,"Saudi Arabia"}, 
+       { 0x0967,"Yemen"},
+       { 0x0968,"Oman"},
+       { 0x0969,"Reserved"}, 
+       { 0x0970,"Reserved"},
+       { 0x0971,"United Arab Emirates"}, 
+       { 0x0972,"Israel"},
+       { 0x0973,"Bahrain"},
+       { 0x0974,"Qatar"},
+       { 0x0975,"Bhutan"},
+       { 0x0976,"Mongolia"}, 
+       { 0x0977,"Nepal"},
+       { 0x0978,"Spare code"}, 
+       { 0x0979,"Universal International Premium Rate Number (see E.169.2)"}, 
+       { 0x098,"Iran"},
+       { 0x0990,"Spare code"}, 
+       { 0x0991,"Trial service (see E.164.2)"}, 
+       { 0x0992,"Tajikstan"},
+       { 0x0993,"Turkmenistan"}, 
+       { 0x0994,"Azerbaijani Republic"}, 
+       { 0x0995,"Georgia"},
+       { 0x0996,"Kyrgyz Republic"}, 
+       { 0x0997,"Spare code"},
+       { 0x0998,"Uzbekistan"},
+       { 0x0999,"Spare code"},
+       { 0,    NULL }
+};    
+static const value_string E164_International_Networks_vals[] = {
+       {   0x10, "British Telecommunications"}, 
+       {   0x11, "Singapore Telecommunications"},
+       {   0x12, "MCIWorldCom"},
+       {   0x13, "Telespazio"},
+       {   0x14, "GTE"},
+       {   0x15, "Telstra"}, 
+       {   0x16, "United Arab Emirates"}, 
+       {   0x17, "AT&T"},
+       {   0x18, "Teledesic"}, 
+       {   0x19, "Telecom Italia"}, 
+       {   0x20, "Asia Cellular Satellite"}, 
+       {   0x21, "Ameritech"},
+       {   0x22, "Cable & Wireless"}, 
+       {   0x23, "Sita-Equant"},
+       {   0x24, "Telia AB"},
+       {   0x25, "Constellation Communications"}, 
+       {   0x26, "SBC Communications"},
+       { 0,    NULL }
+};    
+
+/* Up-to-date information on the allocated ICP values can be found at: */
+/*http://www.iana.org/assignments/osi-nsapanumbers.                    */
+static const value_string iana_icp_values[] = {
+       {   0x0, "IP Version 6 Address"},
+       {   0x1, "IP Version 4 Address"},
+       { 0,    NULL }
+};
+
+static void
+dissect_nsap(tvbuff_t *parameter_tvb,gint offset,gint len, proto_tree *parameter_tree)
+{
+       guint8 afi, cc_length = 0;
+       guint8 length = 0, address_digit_pair = 0;
+       guint icp,  cc, id_code, cc_offset;
+       guint32    addr;
+       struct e_in6_addr ipv6_addr;
+
+
+       afi = tvb_get_guint8(parameter_tvb, offset);
+
+       switch ( afi ) {
+               case 0x35:      /* IANA ICP Binary fortmat*/
+                       proto_tree_add_text(parameter_tree, parameter_tvb, offset, 3,
+                           "IDP = %s", tvb_bytes_to_str(parameter_tvb, offset, 3));
+
+                       proto_tree_add_uint(parameter_tree, hf_afi, parameter_tvb, offset, 1, afi );
+                       offset = offset + 1;
+                       icp = tvb_get_ntohs(parameter_tvb, offset);
+                       proto_tree_add_uint(parameter_tree, hf_iana_icp, parameter_tvb, offset, 1, icp );
+                       if ( icp == 0 ){ /* IPv6 addr */
+                               tvb_memcpy(parameter_tvb, (guint8 *)&ipv6_addr,( offset + 2 ), 16);
+                               proto_tree_add_text(parameter_tree, parameter_tvb, offset + 2 , 3,
+                                   "DSP = %s", tvb_bytes_to_str(parameter_tvb, offset + 2, 17));
+                                           proto_tree_add_ipv6(parameter_tree, hf_nsap_ipv6_addr, parameter_tvb, offset,
+                                                       16, (guint8 *)&ipv6_addr);
+
+                       }
+                       else { /* IPv4 addr */
+                               tvb_memcpy(parameter_tvb,(guint8 *) &addr, ( offset + 2 ), 4);
+                               proto_tree_add_text(parameter_tree, parameter_tvb, offset + 2 , 3,
+                                   "DSP = %s", tvb_bytes_to_str(parameter_tvb, offset + 2, 17));
+                               proto_tree_add_ipv4(parameter_tree, hf_nsap_ipv4_addr, parameter_tvb, offset + 2, 4, addr);
+                       }
+                       
+                       break;
+               case 0x45:      /* E.164 ATM format */
+               case 0xC3:      /* E.164 ATM group format */
+                       proto_tree_add_text(parameter_tree, parameter_tvb, offset, 9,
+                           "IDP = %s", tvb_bytes_to_str(parameter_tvb, offset, 9));
+
+                       proto_tree_add_uint(parameter_tree, hf_afi, parameter_tvb, offset, 1, afi );
+       
+                       proto_tree_add_text(parameter_tree, parameter_tvb, offset + 1, 8,
+                           "IDI = %s", tvb_bytes_to_str(parameter_tvb, offset + 1, 8));
+                       offset = offset +1;
+                       /* Dissect country code after removing non significant zeros */
+                       cc_offset = offset;
+                       address_digit_pair = tvb_get_guint8(parameter_tvb, cc_offset);
+                       while ( address_digit_pair == 0 ) {
+                               cc_offset = cc_offset + 1;
+                               address_digit_pair = tvb_get_guint8(parameter_tvb, cc_offset);
+                       }
+                       cc = tvb_get_ntohs(parameter_tvb, cc_offset);
+                       if (( address_digit_pair & 0xf0 ) != 0 )
+                       cc = cc >> 4;
+
+                       switch ( cc & 0x0f00 ) {
+               
+                       case 0x0 : cc_length = 1;       
+                       break;
+
+                       case 0x0100 : cc_length = 1;    
+                       break;
+
+                       case 0x0200 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 0 : 
+                               case 7 : cc_length = 2; 
+                               break;
+                               default : cc_length = 3;
+                               }
+                       break;
+                               
+                       case 0x0300 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 0 : 
+                               case 1 : 
+                               case 2 : 
+                               case 3 : 
+                               case 4 : 
+                               case 6 : 
+                               case 9 : cc_length = 2;
+                               break;  
+                               default : cc_length = 3;
+                               break;
+                               }
+                       break;
+
+                       case 0x0400 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 2 : cc_length = 3;
+                               break;  
+                               default : cc_length = 2;
+                               break;
+                               }
+                       break;
+
+                       case 0x0500 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 0 : 
+                               case 9 : cc_length = 3;
+                               break;  
+                               default : cc_length = 2;
+                               break;
+                               }
+                       break;
+
+                       case 0x0600 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 7 : 
+                               case 8 : 
+                               case 9 : cc_length = 3; 
+                               break;  
+                               default : cc_length = 2;
+                               break;
+                               }
+                       break;
+
+                       case 0x0700 : cc_length = 1;    
+                       break;
+
+                       case 0x0800 : 
+                       switch ( cc & 0x00f0 ) {
+                               case 1 : 
+                               case 2 : 
+                               case 4 :  
+                               case 6 : cc_length = 2; 
+                               break;  
+                               default : cc_length = 3;
+                               break;
+                               }
+                       break;
+
+                       case 0x0900 : 
+                               switch ( cc & 0x00f0 ) {
+                               case 0 : 
+                               case 1 : 
+                               case 2 :  
+                               case 3 :  
+                               case 4 :  
+                               case 5 :  
+                               case 8 : cc_length = 2; 
+                               break;  
+                               default : cc_length = 3;
+                               break;
+                               }
+                       break;
+
+                       default: ;
+                       }/* End switch cc */
+                       switch ( cc_length ) {
+                       case 0x1 :      cc = cc >> 8;
+                                       length = 1;
+                       break;
+                       case 0x2 :      cc = cc >> 4;
+                                       length = 2;
+                       break;
+                       default:        length = 2;
+                       break;
+                       }/* end switch cc_length */
+                       proto_tree_add_text(parameter_tree,parameter_tvb, cc_offset, length,"Country Code: %x %s length %u",cc,
+                                       val_to_str(cc,E164_country_code_value,"unknown (%x)"),cc_length);
+                       switch ( cc ) {
+                               case 0x882 :
+                                               id_code = tvb_get_ntohs(parameter_tvb, cc_offset + 1);
+                                               id_code = (id_code & 0x0fff) >> 4;
+                                               proto_tree_add_text(parameter_tree,parameter_tvb, (cc_offset + 1), 2,"Identification Code: %x %s ",id_code,
+                                                       val_to_str(id_code,E164_International_Networks_vals,"unknown (%x)"));
+
+                               break;
+                               default:;
+                               }
+                       proto_tree_add_text(parameter_tree, parameter_tvb, offset + 8, (len - 9),
+                                   "DSP = %s", tvb_bytes_to_str(parameter_tvb, offset + 8, (len -9)));
+       
+               break;
+               default:
+                       proto_tree_add_uint(parameter_tree, hf_afi, parameter_tvb, offset, len, afi );
+               }/* end switch afi */
+
+}
+
+
+#define  ACTION_INDICATOR                              0x01    
+#define  BACKBONE_NETWORK_CONNECTION_IDENTIFIER        0x02    
+#define  INTERWORKING_FUNCTION_ADDRESS                 0x03    
+#define  CODEC_LIST                                    0x04    
+#define  CODEC                                         0x05    
+#define  BAT_COMPATIBILITY_REPORT                      0x06    
+#define  BEARER_NETWORK_CONNECTION_CHARACTERISTICS     0x07    
+#define  BEARER_CONTROL_INFORMATION                    0x08    
+#define  BEARER_CONTROL_TUNNELLING                     0x09    
+#define  BEARER_CONTROL_UNIT_IDENTIFIER                0x0A    
+#define  SIGNAL                                                0x0B    
+#define  BEARER_REDIRECTION_CAPABILITY                 0x0C    
+#define  BEARER_REDIRECTION_INDICATORS                 0x0D    
+#define  SIGNAL_TYPE                                   0x0E    
+#define  DURATION                                      0x0F
+
+       
+static const value_string bat_ase_list_of_Identifiers_vals[] = {
+
+       { 0x00                                          ,       "spare" },
+       { ACTION_INDICATOR                              ,       "Action Indicator" },
+       { BACKBONE_NETWORK_CONNECTION_IDENTIFIER        ,       "Backbone Network Connection Identifier" },
+       { INTERWORKING_FUNCTION_ADDRESS                 ,       "Interworking Function Address" },
+       { CODEC_LIST                                    ,       "Codec List" },
+       { CODEC                                         ,       "Codec" },
+       { BAT_COMPATIBILITY_REPORT                      ,       "BAT Compatibility Report" },
+       { BEARER_NETWORK_CONNECTION_CHARACTERISTICS     ,       "Bearer Network Connection Characteristics" },
+       { BEARER_CONTROL_INFORMATION                    ,       "Bearer Control Information"},
+       { BEARER_CONTROL_TUNNELLING                     ,       "Bearer Control Tunnelling"},
+       { BEARER_CONTROL_UNIT_IDENTIFIER                ,       "Bearer Control Unit Identifier" },
+       { SIGNAL                                        ,       "Signal"},
+       { BEARER_REDIRECTION_CAPABILITY                 ,       "Bearer Redirection Capability"},
+       { BEARER_REDIRECTION_INDICATORS                 ,       "Bearer Redirection Indicators"},
+       { SIGNAL_TYPE                                   ,       "Signal Type"},
+       { DURATION                                      ,       "Duration" },
+       { 0,    NULL }
+};    
+
+/*ITU-T Q.765.5 (06/2000) 13*/
+static const value_string Instruction_indicator_for_general_action_vals[] =
+{
+  { 0,     "Pass on information element"},
+  { 1,     "Discard information element"},
+  { 2,     "Discard BICC data"},
+  { 3,     "Release call"},
+  { 0,     NULL}};
+
+static const value_string Instruction_indicator_for_pass_on_not_possible_vals[] = {
+  { 0,     "Release call"},
+  { 1,     "Discard information element"},
+  { 2,     "Discard BICC data"},
+  { 3,     "reserved (interpreted as 00)"},
+  { 0,     NULL}};
+
+static value_string bat_ase_action_indicator_field_vals[] = {
+      
+       { 0x00, "no indication"},
+       { 0x01, "connect backward"},
+       { 0x02, "connect forward"},
+       { 0x03, "connect forward, no notification"},
+       { 0x04, "connect forward, plus notification"},
+       { 0x05, "connect forward, no notification + selected codec"},
+       { 0x06, "connect forward, plus notification + selected codec"},
+       { 0x07, "use idle"},
+       { 0x08, "connected"},
+       { 0x09, "switched"},
+       { 0x0a, "selected codec"},
+       { 0x0b, "modify codec"},
+       { 0x0c, "successful codec modification"},
+       { 0x0d, "codec modification failure"},
+       { 0x0e, "mid-call codec negotiation"},
+       { 0x0f, "modify to selected codec information"},
+       { 0x10, "mid-call codec negotiation failure"},
+       { 0x11, "start signal, notify"},
+       { 0x12, "start signal, no notify"},
+       { 0x13, "stop signal, notify"},
+       { 0x14, "stop signal, no notify"},
+       { 0x15, "start signal acknowledge"},
+       { 0x16, "start signal reject"},
+       { 0x16, "stop signal acknowledge"},
+       { 0x18, "bearer redirect"},
+       { 0,    NULL }
+};    
+
+static const true_false_string BCTP_BVEI_value  = {
+  "Version Error Indication, BCTP version not supported",
+  "No indication"
+};
+
+static value_string BCTP_Tunnelled_Protocol_Indicator_vals[] = {
+      
+       { 0x20, "IPBCP (text encoded)"},
+       { 0x21, "spare (text encoded protocol)"},
+       { 0x22, "not used"},
+       { 0,    NULL }
+};    
+
+static const true_false_string BCTP_TPEI_value  = {
+  "Protocol Error Indication, Bearer Control Protocol not supported",
+  "No indication"
+};
+
+#define  ITU_T                                 0x01    
+#define  ETSI                                  0x02    
+
+static const value_string bat_ase_organization_identifier_subfield_vals[] = {
+
+       { 0x00, "no indication"},
+       { 0x01, "ITU-T"},
+       { 0x02, "ETSI (refer to TS 26.103)"},
+       { 0,    NULL }
+};
+
+
+#define        G_711_64_A                                              0x01
+#define        G_711_64_U                                              0x02
+#define        G_711_56_A                                              0x03
+#define        G_711_56_U                                              0x04
+#define        G_722_SB_ADPCM                                          0x05
+#define        G_723_1                                                 0x06
+#define        G_723_1_Annex_A                                         0x07
+#define        G_726_ADPCM                                             0x08
+#define        G_727_Embedded_ADPCM                                    0x09
+#define        G_728                                                   0x0a
+#define        G_729_CS_ACELP                                          0x0b
+#define        G_729_Annex_B                                           0x0c
+
+static const value_string ITU_T_codec_type_subfield_vals[] = {
+
+       { 0x00,                         "no indication"},
+       { G_711_64_A,                   "G.711 64 kbit/s A-law"},
+       { G_711_64_U,                   "G.711 64 kbit/s -law"},
+       { G_711_56_A,                   "G.711 56 kbit/s A-law"},
+       { G_711_56_U,                   "G.711 56 kbit/s -law"},
+       { G_722_SB_ADPCM,               "G.722 (SB-ADPCM)"},
+       { G_723_1,                      "G.723.1"},
+       { G_723_1_Annex_A,              "G.723.1 Annex A (silence suppression)"},
+       { G_726_ADPCM,                  "G.726 (ADPCM)"},
+       { G_727_Embedded_ADPCM,         "G.727 (Embedded ADPCM)"},
+       { G_728,                        "G.728"},
+       { G_729_CS_ACELP,               "G.729 (CS-ACELP)"},
+       { G_729_Annex_B,                "G.729 Annex B (silence suppression)"},
+       { 0,    NULL }
+};
+
+static const value_string ETSI_codec_type_subfield_vals[] = {
+
+       { 0x00, "GSM Full Rate (13.0 kBit/s)( GSM FR )"},
+       { 0x01, "GSM Half Rate (5.6 kBit/s) ( GSM HR )"},
+       { 0x02, "GSM Enhanced Full Rate (12.2 kBit/s)( GSM EFR )"},
+       { 0x03, "Full Rate Adaptive Multi-Rate ( FR AMR )"},
+       { 0x04, "Half Rate Adaptive Multi-Rate ( HR AMR )"},
+       { 0x05, "UMTS Adaptive Multi-Rate ( UMTS AMR )"},
+       { 0x06, "UMTS Adaptive Multi-Rate 2 ( UMTS AMR 2 )"},
+       { 0x07, "TDMA Enhanced Full Rate (7.4 kBit/s) ( TDMA EFR )"},
+       { 0x08, "PDC Enhanced Full Rate (6.7 kBit/s) ( PDC EFR )"},
+       { 0x09, "Full Rate Adaptive Multi-Rate WideBand ( FR AMR-WB )"},
+       { 0x0a, "UMTS Adaptive Multi-Rate WideBand ( UMTS AMR-WB )"},
+       { 0x0b, "8PSK Half Rate Adaptive Multi-Rate ( OHR AMR )"},
+       { 0x0c, "8PSK Full Rate Adaptive Multi-Rate WideBand  ( OFR AMR-WB )"},
+       { 0x0d, "8PSK Half Rate Adaptive Multi-Rate WideBand ( OHR AMR-WB )"},
+       { 0xfe, "Reserved for future use."},
+       { 0xff, "Reserved for MuMe dummy Codec Type ( MuMe )"},
+       { 0,    NULL }
+};
+
+static const value_string bearer_network_connection_characteristics_vals[] = {
+
+       { 0x00, "no indication"},
+       { 0x01, "AAL type 1"},
+       { 0x02, "AAL type 2"},
+       { 0x03, "Structured AAL type 1"},
+       { 0x04, "IP/RTP"},
+       { 0,    NULL }
+};
+
+static const true_false_string Bearer_Control_Tunnelling_ind_value  = {
+  "Tunnelling to be used",
+  "No indication"
+};
+
+static const true_false_string late_cut_trough_cap_ind_value  = {
+  "Late Cut-through supported",
+  "Late Cut-through not supported"
+};
+/*  ITU-T Rec. Q.765.5/Amd.1 (07/2001) */
+static const value_string Bearer_Redirection_Indicator_vals[] = {
+       { 0x00, " no indication"},
+       { 0x01, "late cut-through request"},
+       { 0x02, "redirect temporary reject"},
+       { 0x03, "redirect backwards request"},
+       { 0x04, "redirect forwards request"},
+       { 0x05, "redirect bearer release request"},
+       { 0x06, "redirect bearer release proceed"},
+       { 0x07, "redirect bearer release complete"},
+       { 0x08, "redirect cut-through request"},
+       { 0x09, "redirect bearer connected indication"},
+       { 0x0a, "redirect failure"},
+       { 0x0b, "new connection identifier"},
+       { 0,    NULL }
+};
+
+/*26/Q.765.5 - Signal Type */
+static const value_string BAt_ASE_Signal_Type_vals[] = {
+       { 0x00, "DTMF 0"},
+       { 0x01, "DTMF 1"},
+       { 0x02, "DTMF 2"},
+       { 0x03, "DTMF 3"},
+       { 0x04, "DTMF 4"},
+       { 0x05, "DTMF 5"},
+       { 0x06, "DTMF 6"},
+       { 0x07, "DTMF 7"},
+       { 0x08, "DTMF 8"},
+       { 0x09, "DTMF 9"},
+       { 0x0a, "DTMF *"},
+       { 0x0b, "DTMF #"},
+       { 0x0c, "DTMF A"},
+       { 0x0d, "DTMF B"},
+       { 0x0e, "DTMF C"},
+       { 0x1f, "DTMF D"},
+       { 0x40, "dial tone"},
+       { 0x41, "PABX internal dial tone"},
+       { 0x42, "special dial tone"},
+       { 0x43, "second dial tone"},
+       { 0x44, "ringing tone"},
+       { 0x45, "special ringing tone"},
+       { 0x46, "busy tone"},
+       { 0x47, "congestion tone"},
+       { 0x48, "special information tone"},
+       { 0x49, "warning tone"},
+       { 0x4a, "intrusion tone"},
+       { 0x4b, "call waiting tone"},
+       { 0x4c, "pay tone"},
+       { 0x4d, "payphone recognition tone"},
+       { 0x4e, "comfort tone"},
+       { 0x4f, "tone on hold"},
+       { 0x50, "record tone"},
+       { 0x51, "Caller waiting tone"},
+       { 0x52, "positive indication tone"},
+       { 0x53, "negative indication tone"},
+       { 0,    NULL }
+};
+
+static const value_string BAT_ASE_Report_Reason_vals[] = {
+
+       { 0x00, "no indication"},
+       { 0x01, "information element non-existent or not implemented"},
+       { 0x02, "BICC data with unrecognized information element, discarded"},
+       { 0,    NULL }
+};
+static int
+dissect_codec(tvbuff_t *parameter_tvb, proto_tree *bat_ase_element_tree, gint length_indicator, gint offset,gint identifier)
+{
+/* offset is at length indicator e.g 1 step past identifier */
+guint content_len;
+guint8 tempdata, compatibility_info;
+
+       proto_tree_add_uint(bat_ase_element_tree , hf_bat_ase_identifier , parameter_tvb, offset - 1, 1, identifier );
+       proto_tree_add_uint(bat_ase_element_tree , hf_length_indicator  , parameter_tvb, offset, 1, length_indicator );
+       offset = offset + 1;    
+       compatibility_info = tvb_get_guint8(parameter_tvb, offset);
+       proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_general_action , parameter_tvb, offset, 1, compatibility_info );
+       proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_general_action , parameter_tvb, offset, 1, compatibility_info );
+       proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_pass_on_not_possible , parameter_tvb, offset, 1, compatibility_info );
+       proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_pass_on_not_possible , parameter_tvb, offset, 1, compatibility_info );
+       proto_tree_add_boolean(bat_ase_element_tree, hf_isup_extension_ind , parameter_tvb, offset, 1, compatibility_info );
+
+       content_len = length_indicator - 1 ; /* exclude the treated Compatibility information */
+       offset = offset + 1;
+       tempdata = tvb_get_guint8(parameter_tvb, offset);
+       proto_tree_add_uint(bat_ase_element_tree, hf_Organization_Identifier , parameter_tvb, offset, 1, tempdata );
+               switch ( tempdata ){
+                       case ITU_T :
+                                       offset = offset + 1;
+                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                       proto_tree_add_uint(bat_ase_element_tree, hf_codec_type , parameter_tvb, offset, 1, tempdata );
+                                       offset = offset + 1;
+                                       switch ( tempdata ) {
+                                               case G_711_64_A :
+                                               case G_711_64_U :               
+                                               case G_711_56_A :               
+                                               case G_711_56_U :               
+                                               case G_722_SB_ADPCM :   
+                                               case G_723_1 :                          
+                                               case G_723_1_Annex_A :  /* These codecs have no configuration data */   
+                                               break;
+                                               case G_726_ADPCM :                                      
+                                               case G_727_Embedded_ADPCM : /* four bit config data, TODO decode config */
+                                               if ( content_len > 2 ) {        
+                                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                                       proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1, "Configuration data : 0x%x", tempdata);
+                                               }
+                                               break;  
+                                               case G_728 :                                                    
+                                               case G_729_CS_ACELP :           
+                                               case G_729_Annex_B :     /* three bit config data, TODO decode config */
+                                               if ( content_len > 2 ) {        
+                                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                                       proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1 , "Configuration data : 0x%x", tempdata);
+                                               }
+                                               break;
+                                               default:
+                                               break;
+
+                                       }/* switch ITU codec type*/
+                       offset = offset + 1;
+                       break;  
+                       case ETSI:
+                                       offset = offset + 1;
+                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                       proto_tree_add_uint(bat_ase_element_tree, hf_etsi_codec_type , parameter_tvb, offset, 1, tempdata );
+                                       if ( content_len > 2 )  {
+                                               offset = offset + 1;
+                                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                               proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1 , "ACS : 0x%x", tempdata);
+                                       }
+                                       if ( content_len > 3 )  {
+                                               offset = offset + 1;
+                                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                               proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1 , "SCS : 0x%x", tempdata);
+                                       }
+                                       if ( content_len > 4 )  {
+                                               offset = offset + 1;
+                                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                               proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1 , "OM MACS : 0x%x", tempdata);
+                                       }
+                                       offset = offset + 1;
+                       break;
+                       default:
+                                       offset = offset + 1;
+                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                       proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, content_len ,
+                                                "Unknown organisation Identifier ( Non ITU-T/ETSI codec ) %u", tempdata);
+                                       offset = offset + content_len - 1;
+                       break;
+                       }/* switch OID */
+return offset;
+}
+
+/* Dissect BAT ASE message according to Q.765.5 200006 and Amendment 1 200107  */
+/* Layout of message                                                           */
+/*     Element name                    Octet                                   */                      
+/*     Identifier 1                    1                                       */
+/*     Length indicator 1              2                                       */
+/*     Compatibility information 1     3                                       */
+/*     Contents 1                              4                                       */
+/*     Identifier n                    m                                       */
+/*     Length indicator n                                                      */
+/*     Compatibility information n                                             */
+/*     Contents n                              p                                       */
+
+static void
+dissect_bat_ase_Encapsulated_Application_Information(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, gint offset)
+{ 
+       gint            length = tvb_reported_length_remaining(parameter_tvb, offset), list_end;
+       tvbuff_t        *next_tvb;
+       proto_tree      *bat_ase_tree, *bat_ase_element_tree, *bat_ase_iwfa_tree;
+       proto_item      *bat_ase_item, *bat_ase_element_item, *bat_ase_iwfa_item;
+       guint8 identifier,compatibility_info,content, BCTP_Indicator_field_1, BCTP_Indicator_field_2;
+       guint8 sdp_length, tempdata, element_no, number_of_indicators;
+       guint8 iwfa[32], diagnostic_len;
+       guint content_len, length_indicator;
+       guint duration;
+       guint diagnostic;
+       guint32 bncid, Local_BCU_ID;
+       element_no = 0;
+
+       bat_ase_item = proto_tree_add_text(parameter_tree,parameter_tvb,
+                                          offset, -1,
+"Bearer Association Transport (BAT) Application Service Element (ASE) Encapsulated Application Information:");
+       bat_ase_tree = proto_item_add_subtree(bat_ase_item , ett_bat_ase);
+
+       proto_tree_add_text(bat_ase_tree, parameter_tvb, offset, -1, "BAT ASE Encapsulated Application Information, (%u byte%s length)", length, plurality(length, "", "s"));
+       while(tvb_reported_length_remaining(parameter_tvb, offset) > 0){
+               element_no = element_no + 1;
+               identifier = tvb_get_guint8(parameter_tvb, offset);
+
+               /* length indicator may be 11 bits long                         */
+               offset = offset + 1;
+               tempdata = tvb_get_guint8(parameter_tvb, offset);
+               if ( tempdata & 0x80 ) {
+                       length_indicator = tempdata & 0x7f;     
+               }
+               else {
+                       offset = offset +1;
+                       length_indicator = tvb_get_guint8(parameter_tvb, offset);
+                       length_indicator = length_indicator << 7;
+                       length_indicator = length_indicator & ( tempdata & 0x7f );
+               }
+
+               bat_ase_element_item = proto_tree_add_text(bat_ase_tree,parameter_tvb,
+                                         ( offset - 1),(length_indicator + 2),"BAT ASE Element %u, Identifier: %s",element_no,
+                                       val_to_str(identifier,bat_ase_list_of_Identifiers_vals,"unknown (%u)"));
+               bat_ase_element_tree = proto_item_add_subtree(bat_ase_element_item , ett_bat_ase_element);
+               if ( identifier != CODEC ) {
+                       /* identifier, lengt indicator and compabillity info must be printed inside CODEC */
+                       /* dissection in order to use dissect_codec routine for codec list */
+               proto_tree_add_uint(bat_ase_element_tree , hf_bat_ase_identifier , parameter_tvb, offset - 1, 1, identifier );
+               proto_tree_add_uint(bat_ase_element_tree , hf_length_indicator  , parameter_tvb, offset, 1, length_indicator );
+               
+               offset = offset + 1;
+               compatibility_info = tvb_get_guint8(parameter_tvb, offset);
+               proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_general_action , parameter_tvb, offset, 1, compatibility_info );
+               proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_general_action , parameter_tvb, offset, 1, compatibility_info );
+               proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_pass_on_not_possible , parameter_tvb, offset, 1, compatibility_info );
+               proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_pass_on_not_possible , parameter_tvb, offset, 1, compatibility_info );
+               proto_tree_add_boolean(bat_ase_element_tree, hf_isup_extension_ind , parameter_tvb, offset, 1, compatibility_info );
+               offset = offset + 1;
+               }
+               content_len = length_indicator - 1 ; /* exclude the treated Compatibility information */
+       
+               /* content will be different depending on identifier */
+               switch ( identifier ){
+
+                       case ACTION_INDICATOR :
+
+                               content = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_Action_Indicator , parameter_tvb, offset, 1, content );
+                               proto_item_append_text(bat_ase_element_item, " - %s",
+                                                val_to_str(content,bat_ase_action_indicator_field_vals, "unknown (%u)"));
+                               offset = offset + 1;
+                               break;                          
+                       case BACKBONE_NETWORK_CONNECTION_IDENTIFIER :           
+
+                               bncid = tvb_get_ntohl(parameter_tvb, offset);
+                               switch ( content_len ){
+                               case 1:
+                                               bncid = bncid & 0x000000ff;
+                                               break;  
+                               case 2:
+                                               bncid = bncid & 0x0000ffff;
+                                               break;  
+                               case 3:
+                                               bncid = bncid & 0x00ffffff;
+                                               break;  
+                               case 4:;  
+                               default:;
+                               }
+                               proto_tree_add_uint_format(bat_ase_element_tree, hf_bncid, parameter_tvb, offset, content_len, bncid, "BNCId: 0x%08x", bncid);
+                               proto_item_append_text(bat_ase_element_item, " - 0x%08x",bncid);
+                               offset = offset + content_len;
+
+                       break;
+                       case INTERWORKING_FUNCTION_ADDRESS :            
+                               tvb_memcpy(parameter_tvb, iwfa, offset, content_len);           
+                               bat_ase_iwfa_item = proto_tree_add_bytes(bat_ase_element_tree, hf_bat_ase_biwfa, parameter_tvb, offset, content_len,
+                                                           iwfa);
+                               bat_ase_iwfa_tree = proto_item_add_subtree(bat_ase_iwfa_item , ett_bat_ase_iwfa);
+                               dissect_nsap(parameter_tvb, offset, content_len, bat_ase_iwfa_tree);
+
+                               offset = offset + content_len;
+                       break;
+                       case CODEC_LIST :    
+                               list_end = offset + content_len;
+                               while ( offset < ( list_end - 1 )) { 
+                               identifier = tvb_get_guint8(parameter_tvb, offset);                             
+                               offset = offset + 1;
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               if ( tempdata & 0x80 ) {
+                                       length_indicator = tempdata & 0x7f;     
+                               }
+                               else {
+                                       offset = offset +1;
+                                       length_indicator = tvb_get_guint8(parameter_tvb, offset);
+                                       length_indicator = length_indicator << 7;
+                                       length_indicator = length_indicator & ( tempdata & 0x7f );
+                               }
+                               offset = dissect_codec(parameter_tvb, bat_ase_element_tree, length_indicator , offset, identifier);
+                               }
+                       break;
+                       case CODEC :       
+                               /* offset is at length indicator in this case */                        
+                               offset = dissect_codec(parameter_tvb, bat_ase_element_tree, length_indicator , offset, identifier);
+                               break;/* case codec */
+                       case BAT_COMPATIBILITY_REPORT :                 
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_BAT_ASE_Comp_Report_Reason, parameter_tvb, offset, 1, tempdata );
+                               offset = offset + 1;
+
+                               diagnostic_len = content_len - 1;
+                               while ( diagnostic_len > 0 ) {
+                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                       proto_tree_add_uint(bat_ase_element_tree, hf_BAT_ASE_Comp_Report_ident, parameter_tvb, offset, 1, tempdata );
+                                       offset = offset + 1;
+                                       diagnostic = tvb_get_letohs(parameter_tvb, offset);
+                                       proto_tree_add_uint(bat_ase_element_tree, hf_BAT_ASE_Comp_Report_diagnostic, parameter_tvb, offset, 2, diagnostic);
+                                       offset = offset + 2;
+                                       diagnostic_len = diagnostic_len - 3;
+                               }
+                       break;
+                       case BEARER_NETWORK_CONNECTION_CHARACTERISTICS :
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_characteristics , parameter_tvb,
+                                                offset, 1, tempdata );
+                               proto_item_append_text(bat_ase_element_item, " - %s",
+                                                val_to_str(tempdata,bearer_network_connection_characteristics_vals, "unknown (%u)"));
+
+                               offset = offset + content_len;
+                       break;
+/* The Bearer Control Information information element contains the bearer control tunnelling protocol */
+/* ITU-T Q.1990 (2001), BICC bearer control tunnelling protocol. */
+
+                       case BEARER_CONTROL_INFORMATION :               
+                               BCTP_Indicator_field_1 = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_BCTP_Version_Indicator, parameter_tvb, offset, 1, BCTP_Indicator_field_1 );
+                               proto_tree_add_boolean(bat_ase_element_tree, hf_BVEI, parameter_tvb, offset, 1, BCTP_Indicator_field_1 );
+                               offset = offset + 1;
+
+                               BCTP_Indicator_field_2 = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_Tunnelled_Protocol_Indicator , parameter_tvb, offset, 1, BCTP_Indicator_field_2 );
+                               proto_tree_add_boolean(bat_ase_element_tree, hf_TPEI, parameter_tvb, offset, 1, BCTP_Indicator_field_2 );
+                               offset = offset + 1;
+
+                               sdp_length = ( length_indicator & 0x7f) - 3;
+
+                               next_tvb = tvb_new_subset(parameter_tvb, offset, sdp_length, sdp_length);
+                               call_dissector(sdp_handle, next_tvb, pinfo, bat_ase_element_tree);
+                               offset = offset + sdp_length;
+
+
+                       break;
+                       case BEARER_CONTROL_TUNNELLING :                
+
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_boolean(bat_ase_element_tree, hf_bearer_control_tunneling , parameter_tvb, offset, 1, ( tempdata & 0x01 ) );
+                               if ( tempdata & 0x01 )
+                                       proto_item_append_text(bat_ase_element_item, " - Tunnelling to be used ");
+
+                               offset = offset + content_len;
+                       break;
+                       case BEARER_CONTROL_UNIT_IDENTIFIER :           
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, 1, "Network ID Length indicator= %u",tempdata);
+                               offset = offset +1;
+                               if ( tempdata > 0 ) {
+                                       offset = offset +1;
+                               
+/* Q.765.5 amd 1
+       Network ID
+       The coding of the Network ID field is identical to the coding of the Network ID field in the
+       Global Call Reference parameter as specified in clause 6/Q.1902.3 (see [3]).
+       NOTE .When used inside a network domain, the Network ID may be omitted by setting the
+       Network ID Length indicator to the value "0".
+       Q.1902.3
+       The following codes are used in the subfields of the global call reference parameter field:
+       a) Network ID
+       The Network ID contains the value field (coded according to ASN.1 BER) of an object
+       identifier identifying the network. This means that the tag and length fields are omitted.
+       An example of such an object identifier can be the following:
+       .{itu-t (0) administration (2) national regulatory authority (x) network (y)}
+       The value for x is the value of the national regulatory authority (one of the Data Country
+       Codes associated to the country as specified in ITU-T X.121 shall be used for "national
+       regulatory authority"), the value for y is under the control of the national regulatory
+       authority concerned.
+       b) Node ID
+       A binary number that uniquely identifies within the network the node which generates the
+       call reference.
+       c) Call Reference ID
+       A binary number used for the call reference of the call. This is generated by the node for
+       each call.
+
+*/
+                                       proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset, tempdata , "Network ID: %s",
+                                                           tvb_bytes_to_str(parameter_tvb, offset, tempdata));
+                                       offset = offset + tempdata;
+                               } /* end if */
+
+                               Local_BCU_ID = tvb_get_letohl(parameter_tvb, offset);
+                               proto_tree_add_uint_format(bat_ase_element_tree, hf_Local_BCU_ID , parameter_tvb, offset, 4, Local_BCU_ID , "Local BCU ID : 0x%08x", Local_BCU_ID );
+                               offset = offset + 4;
+                       break;
+                       case SIGNAL :           
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_bat_ase_signal , parameter_tvb, offset, 1, tempdata );
+                               offset = offset + 1;
+                               if ( content_len > 1){
+                               duration = tvb_get_letohs(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_bat_ase_duration , parameter_tvb, offset, 2, duration );
+                               offset = offset + 2;
+                               }
+                       break;
+                       case BEARER_REDIRECTION_CAPABILITY :                    
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_boolean(bat_ase_element_tree, hf_late_cut_trough_cap_ind , parameter_tvb, offset, 1, tempdata );
+                               offset = offset + content_len;
+                       break;
+                       case BEARER_REDIRECTION_INDICATORS :
+                               number_of_indicators = 0;
+                               while ( number_of_indicators < content_len ) {          
+                                       tempdata = tvb_get_guint8(parameter_tvb, offset);
+                                       proto_tree_add_uint(bat_ase_element_tree, hf_bat_ase_bearer_redir_ind , parameter_tvb, offset, 1, tempdata );
+                                       offset = offset + 1;
+                                       number_of_indicators = number_of_indicators + 1;
+                               }
+                       break;
+                       case SIGNAL_TYPE :                                      
+                               tempdata = tvb_get_guint8(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_bat_ase_signal , parameter_tvb, offset, 1, tempdata );
+                               offset = offset + content_len;
+                       break;
+                       case DURATION :
+                               duration = tvb_get_letohs(parameter_tvb, offset);
+                               proto_tree_add_uint(bat_ase_element_tree, hf_bat_ase_duration , parameter_tvb, offset, 2, duration );
+                               offset = offset + content_len;
+                       break;
+                       default :
+                               proto_tree_add_text(bat_ase_element_tree, parameter_tvb, offset,content_len , "Default ?, (%u byte%s length)", (content_len), plurality(content_len, "", "s"));
+                               offset = offset + content_len;
+                       }                                       
+       } 
+
+}
+
+static void
+dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
+{ 
+
+  guint8 application_context_identifier;
+  guint8 application_transport_instruction_ind;
+  guint8 si_and_apm_segmentation_indicator;
+  guint8 apm_Segmentation_local_ref;
+  guint8 pointer_to_transparent_data;
+  guint16 application_context_identifier16;
+  gint offset = 0;
+  guint length = tvb_reported_length(parameter_tvb);
+  
+  proto_tree_add_text(parameter_tree, parameter_tvb, 0, -1, "Application transport parameter fields:");
+  proto_item_set_text(parameter_item, "Application transport, (%u byte%s length)", length , plurality(length, "", "s"));
+  application_context_identifier = tvb_get_guint8(parameter_tvb, 0);
+  if ( (application_context_identifier & H_8BIT_MASK) == 0x80) {
+    proto_tree_add_uint(parameter_tree, hf_isup_app_cont_ident, parameter_tvb,offset, 1, (application_context_identifier & GFEDCBA_8BIT_MASK));
+    offset = offset + 1;
+    if ((application_context_identifier & 0x7f) > 6)
+      return;
+  }
+  else {
+    application_context_identifier16 = tvb_get_letohs(parameter_tvb,offset); 
+    proto_tree_add_text(parameter_tree, parameter_tvb, offset, 2, "Application context identifier: 0x%x", application_context_identifier16);
+    offset = offset + 2;
+    return; /* no further decoding of this element */
+  }
+  proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "Application transport instruction indicators: ");
+  application_transport_instruction_ind = tvb_get_guint8(parameter_tvb, offset);       
+  proto_tree_add_boolean(parameter_tree, hf_isup_app_Release_call_ind, parameter_tvb, offset, 1, application_transport_instruction_ind);
+  proto_tree_add_boolean(parameter_tree, hf_isup_app_Send_notification_ind, parameter_tvb, offset, 1, application_transport_instruction_ind);
+  offset = offset + 1; 
+  if ( (application_transport_instruction_ind & H_8BIT_MASK) == 0x80) {
+        proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1, "APM segmentation indicator:");
+       si_and_apm_segmentation_indicator  = tvb_get_guint8(parameter_tvb, offset);
+       proto_tree_add_uint(parameter_tree, hf_isup_apm_segmentation_ind , parameter_tvb, offset, 1, si_and_apm_segmentation_indicator  );
+       proto_tree_add_boolean(parameter_tree, hf_isup_apm_si_ind , parameter_tvb, offset, 1, si_and_apm_segmentation_indicator  );
+       offset = offset + 1;
+
+       if ( (si_and_apm_segmentation_indicator & H_8BIT_MASK) == 0x80) {
+         apm_Segmentation_local_ref  = tvb_get_guint8(parameter_tvb, offset);
+         proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1, "Segmentation local reference (SLR): 0x%x", apm_Segmentation_local_ref  );
+         offset = offset + 1;
+       }
+  }    
+
+  proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "APM-user information field"  );
+  /* dissect BAT ASE element, without transparent data ( Q.765.5-200006) */ 
+  if ((application_context_identifier & 0x7f) != 5) {
+    proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "No further dissection of APM-user information field");
+    return;
+  }
+  pointer_to_transparent_data = tvb_get_guint8(parameter_tvb, offset);
+  if (pointer_to_transparent_data != 0)
+    proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1, "Pointer to transparent data: 0x%x Don't know how to dissect further", pointer_to_transparent_data  );
+  proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1, "Pointer to transparent data: 0x%x No transparent data", pointer_to_transparent_data  );
+  offset = offset + 1;
+  dissect_bat_ase_Encapsulated_Application_Information(parameter_tvb, pinfo, parameter_tree, offset);
+}
+
+
+
 /* ------------------------------------------------------------------
   Dissector Parameter Optional Forward Call indicators
  */
@@ -2357,12 +3747,97 @@ dissect_isup_message_compatibility_information_parameter(tvbuff_t *parameter_tvb
 /* ------------------------------------------------------------------
   Dissector Parameter compatibility information
  */
+static const true_false_string isup_transit_at_intermediate_exchange_ind_value  = {
+  "End node interpretation",
+  "Transit interpretation"
+};
+
+
+static const true_false_string isup_Discard_message_ind_value = {
+       "Discard message",
+       "Do not discard message (pass on)",
+};
+
+static const true_false_string isup_Discard_parameter_ind_value = {
+       "Discard parameter",
+       "Do not discard parameter (pass on)",
+};
+
+static const value_string isup_Pass_on_not_possible_indicator_vals[] = {
+       { 0x00, "Release call" },
+       { 0x01, "Discard message" },
+       { 0x02, "Discard parameter" },
+       { 0x03, "Reserved (interpreted as 00)" },
+       { 0, NULL },
+};
+static const value_string ISUP_Broadband_narrowband_interworking_indicator_vals[] = {
+       { 0x00, "Pass on" },
+       { 0x01, "Discard message" },
+       { 0x02, "Release call" },
+       { 0x03, "Discard parameter" },
+       { 0, NULL },
+}; 
+
 static void
 dissect_isup_parameter_compatibility_information_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
 {
-  guint length = tvb_length(parameter_tvb);
-  proto_tree_add_text(parameter_tree, parameter_tvb, 0, length, "Parameter compatibility information (refer to 3.41/Q.763 for detailed decoding)");
+  guint  length = tvb_length(parameter_tvb);
+  guint  len = length;
+  guint8 upgraded_parameter, upgraded_parameter_no;
+  guint8 offset;
+  guint8 instruction_indicators; 
+  offset = 0;
+  upgraded_parameter_no = 0;
+
   proto_item_set_text(parameter_item, "Parameter compatibility information (%u byte%s length)", length , plurality(length, "", "s"));
+/* etxrab Decoded as per Q.763 section 3.41 */
+
+  while ( len > 0 ) {
+  upgraded_parameter_no = upgraded_parameter_no + 1;
+  upgraded_parameter = tvb_get_guint8(parameter_tvb, offset);
+
+  proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1,
+           "Upgraded parameter no: %u = %s", upgraded_parameter_no,
+           val_to_str(upgraded_parameter, isup_parameter_type_value, "unknown (%u)"));
+  offset += 1;
+  len -= 1;
+  instruction_indicators = tvb_get_guint8(parameter_tvb, offset);
+
+  proto_tree_add_text(parameter_tree, parameter_tvb, offset, 1,
+                   "Instruction indicators: 0x%x ",
+                   instruction_indicators);
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_transit_at_intermediate_exchange_ind, 
+                parameter_tvb, offset, 1, instruction_indicators );
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_Release_call_ind, parameter_tvb, offset, 1, instruction_indicators );
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_Send_notification_ind, parameter_tvb, offset, 1, instruction_indicators );
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_Discard_message_ind_value, parameter_tvb, offset, 1, instruction_indicators );
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_Discard_parameter_ind, parameter_tvb, offset, 1, instruction_indicators );
+
+ proto_tree_add_uint(parameter_tree, hf_isup_Pass_on_not_possible_indicator, parameter_tvb, offset, 1,instruction_indicators);
+
+ proto_tree_add_boolean(parameter_tree, hf_isup_extension_ind , parameter_tvb, offset, 1, instruction_indicators );
+
+  offset += 1;
+  len -= 1;
+  if (!(instruction_indicators & H_8BIT_MASK)) {
+               if (len == 0)
+                       return;
+                  instruction_indicators = tvb_get_guint8(parameter_tvb, offset);
+                proto_tree_add_uint(parameter_tree, hf_isup_Broadband_narrowband_interworking_ind, parameter_tvb, offset, 1,instruction_indicators);
+                 offset += 1;
+                  len -= 1;
+                  }
+   if (len == 0)
+   return;
+  ;
+ }
+/* etxrab */
 }
 /* ------------------------------------------------------------------
   Dissector Parameter MLPP precedence
@@ -2904,7 +4379,7 @@ dissect_isup_unknown_parameter(tvbuff_t *parameter_tvb, proto_item *parameter_it
   Dissector all optional parameters
 */
 static void
-dissect_isup_optional_parameter(tvbuff_t *optional_parameters_tvb, proto_tree *isup_tree)
+dissect_isup_optional_parameter(tvbuff_t *optional_parameters_tvb,packet_info *pinfo, proto_tree *isup_tree)
 { proto_item* parameter_item;
   proto_tree* parameter_tree;
   gint offset = 0;
@@ -3176,6 +4651,10 @@ dissect_isup_optional_parameter(tvbuff_t *optional_parameters_tvb, proto_tree *i
        case PARAM_TYPE_GENERIC_DIGITS:
          dissect_isup_generic_digits_parameter(parameter_tvb, parameter_tree, parameter_item);
          break;
+       case PARAM_TYPE_APPLICATON_TRANS:
+         dissect_isup_application_transport_parameter(parameter_tvb, pinfo, parameter_tree, parameter_item);
+         break;
+         
        default:
          dissect_isup_unknown_parameter(parameter_tvb, parameter_item);
          break;
@@ -3548,14 +5027,14 @@ dissect_isup_circuit_group_blocking_messages(tvbuff_t *message_tvb, proto_tree *
   parameter_item = proto_tree_add_text(isup_tree, message_tvb,
                                       offset +  parameter_pointer,
                                       parameter_length + PARAMETER_LENGTH_IND_LENGTH,
-                                      "Facility indicator");
+                                      "Range and status");
   parameter_tree = proto_item_add_subtree(parameter_item, ett_isup_parameter);
   proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_type, message_tvb, 0, 0, parameter_type, "Mandatory Parameter: %u (%s)", parameter_type, val_to_str(parameter_type, isup_parameter_type_value,"unknown"));
   proto_tree_add_uint_format(parameter_tree, hf_isup_mandatory_variable_parameter_pointer, message_tvb, offset, PARAMETER_POINTER_LENGTH, parameter_pointer, "Pointer to Parameter: %u", parameter_pointer);
   proto_tree_add_uint_format(parameter_tree, hf_isup_parameter_length, message_tvb, offset + parameter_pointer, PARAMETER_LENGTH_IND_LENGTH, parameter_length, "Parameter length: %u", parameter_length);
   actual_length = tvb_ensure_length_remaining(message_tvb, offset);
   parameter_tvb = tvb_new_subset(message_tvb, offset + parameter_pointer + PARAMETER_LENGTH_IND_LENGTH, MIN(parameter_length, actual_length), parameter_length );
-  dissect_isup_facility_ind_parameter(parameter_tvb, parameter_item);
+  dissect_isup_range_and_status_parameter(parameter_tvb, parameter_tree, parameter_item);
   offset += PARAMETER_POINTER_LENGTH;
 
   return offset;
@@ -3804,6 +5283,7 @@ dissect_isup_confusion_message(tvbuff_t *message_tvb, proto_tree *isup_tree)
 static void
 dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup_tree)
 {
+  static isup_tap_rec_t tap_rec;
   tvbuff_t *parameter_tvb;
   tvbuff_t *optional_parameter_tvb;
   proto_item* pass_along_item;
@@ -3820,6 +5300,10 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
    proto_tree_add_uint_format(isup_tree, hf_isup_message_type, message_tvb, 0, MESSAGE_TYPE_LENGTH, message_type, "Message type: %s (%u)", val_to_str(message_type, isup_message_type_value, "reserved"), message_type);
    offset +=  MESSAGE_TYPE_LENGTH;
 
+   tap_rec.message_type = message_type;
+
+   tap_queue_packet(isup_tap, pinfo, &tap_rec);
+
    bufferlength = tvb_ensure_length_remaining(message_tvb, offset);
    parameter_tvb = tvb_new_subset(message_tvb, offset, bufferlength, bufferlength);
 
@@ -3996,6 +5480,19 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
       /* no dissector necessary since no mandatory parameters included */
        opt_part_possible = TRUE;
       break;
+    case MESSAGE_TYPE_APPLICATION_TRANS:
+      /* no dissector necessary since no mandatory parameters included */
+       opt_part_possible = TRUE;
+      break;
+    case MESSAGE_TYPE_PRE_RELEASE_INFO:
+      /* no dissector necessary since no mandatory parameters included */
+       opt_part_possible = TRUE;
+      break;
+    case MESSAGE_TYPE_SUBSEQUENT_DIR_NUM:
+      /* do nothing since format is a national matter */
+      proto_tree_add_text(isup_tree, parameter_tvb, 0, bufferlength, "Format is a national matter");
+      break;
+
     default:
       proto_tree_add_text(isup_tree, parameter_tvb, 0, bufferlength, "Unknown Message type (possibly reserved/used in former ISUP version)");
       break;
@@ -4008,7 +5505,7 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
        proto_tree_add_uint_format(isup_tree, hf_isup_pointer_to_start_of_optional_part, message_tvb, offset, PARAMETER_POINTER_LENGTH, opt_parameter_pointer, "Pointer to start of optional part: %u", opt_parameter_pointer);
        offset += opt_parameter_pointer;
        optional_parameter_tvb = tvb_new_subset(message_tvb, offset, -1, -1 );
-       dissect_isup_optional_parameter(optional_parameter_tvb, isup_tree);
+       dissect_isup_optional_parameter(optional_parameter_tvb, pinfo, isup_tree);
      }
      else
        proto_tree_add_uint_format(isup_tree, hf_isup_pointer_to_start_of_optional_part, message_tvb, offset, PARAMETER_POINTER_LENGTH, opt_parameter_pointer, "No optional parameter present (Pointer: %u)", opt_parameter_pointer);
@@ -4025,22 +5522,23 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 /* Set up structures needed to add the protocol subtree and manage it */
        proto_item *ti;
-       proto_tree *isup_tree;
+       proto_tree *isup_tree = NULL;
        tvbuff_t *message_tvb;
        guint16 cic;
        guint8 message_type;
 
 /* Make entries in Protocol column and Info column on summary display */
        if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISUP");
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "ISUP (ITU)");
 
 /* Extract message type field */
        message_type = tvb_get_guint8(tvb, CIC_OFFSET + CIC_LENGTH);
+       /* dissect CIC in main dissector since pass-along message type carrying complete IUSP message w/o CIC needs
+          recursive message dissector call */
+       cic = tvb_get_letohs(tvb, CIC_OFFSET) & 0x0FFF; /*since upper 4 bits spare */
 
-       if (check_col(pinfo->cinfo, COL_INFO)){
-               col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, isup_message_type_value_acro, "reserved"));
-               col_set_fence(pinfo->cinfo, COL_INFO);
-       }
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s(CIC %u)", val_to_str(message_type, isup_message_type_value_acro, "reserved"),cic);
 
 /* In the interest of speed, if "tree" is NULL, don't do any work not
    necessary to generate protocol tree items. */
@@ -4048,18 +5546,52 @@ dissect_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                ti = proto_tree_add_item(tree, proto_isup, tvb, 0, -1, FALSE);
                isup_tree = proto_item_add_subtree(ti, ett_isup);
 
-               /* dissect CIC in main dissector since pass-along message type carrying complete IUSP message w/o CIC needs
-                  recursive message dissector call */
-               cic =          tvb_get_letohs(tvb, CIC_OFFSET) & 0x0FFF; /*since upper 4 bits spare */
 
                proto_tree_add_uint_format(isup_tree, hf_isup_cic, tvb, CIC_OFFSET, CIC_LENGTH, cic, "CIC: %u", cic);
-
-               message_tvb = tvb_new_subset(tvb, CIC_LENGTH, -1, -1);
-               dissect_isup_message(message_tvb, pinfo, isup_tree);
        }
+
+       message_tvb = tvb_new_subset(tvb, CIC_LENGTH, -1, -1);
+       dissect_isup_message(message_tvb, pinfo, isup_tree);
 }
 
+/* ------------------------------------------------------------------ */
+static void
+dissect_bicc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+{
+
+/* Set up structures needed to add the protocol subtree and manage it */
+       proto_item *ti;
+       proto_tree *bicc_tree = NULL;
+       tvbuff_t *message_tvb;
+       guint32 bicc_cic;
+       guint8 message_type;
 
+/* Make entries in Protocol column and Info column on summary display */
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "BICC");
+
+/* Extract message type field */
+       message_type = tvb_get_guint8(tvb, BICC_CIC_OFFSET + BICC_CIC_LENGTH);
+
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, isup_message_type_value_acro, "reserved"));
+
+/* In the interest of speed, if "tree" is NULL, don't do any work not
+   necessary to generate protocol tree items. */
+       if (tree) {
+               ti = proto_tree_add_item(tree, proto_bicc, tvb, 0, -1, FALSE);
+               bicc_tree = proto_item_add_subtree(ti, ett_bicc);
+
+               /* dissect CIC in main dissector since pass-along message type carrying complete BICC/ISUP message w/o CIC needs
+                  recursive message dissector call */
+               bicc_cic = tvb_get_letohl(tvb, BICC_CIC_OFFSET);
+
+               proto_tree_add_uint_format(bicc_tree, hf_bicc_cic, tvb, BICC_CIC_OFFSET, BICC_CIC_LENGTH, bicc_cic, "CIC: %u", bicc_cic);
+       }
+       
+       message_tvb = tvb_new_subset(tvb, BICC_CIC_LENGTH, -1, -1);
+       dissect_isup_message(message_tvb, pinfo, bicc_tree);
+}
 /*---------------------------------------------------------------------*/
 /* Register the protocol with Ethereal */
 void
@@ -4069,7 +5601,7 @@ proto_register_isup(void)
        static hf_register_info hf[] = {
                { &hf_isup_cic,
                        { "CIC",           "isup.cic",
-                       FT_UINT16, BASE_HEX, NULL, 0xFF0F,
+                       FT_UINT16, BASE_HEX, NULL, 0x0,
                          "", HFILL }},
 
                { &hf_isup_message_type,
@@ -4347,11 +5879,6 @@ proto_register_isup(void)
                        FT_BOOLEAN, 8, TFS(&isup_suspend_resume_ind_value), A_8BIT_MASK,
                        "", HFILL }},
 
-               { &hf_isup_transmission_medium_requirement,
-                       { "Transmission medium requirement",  "isup.transmission_medium_requirement",
-                       FT_UINT8, BASE_DEC, VALS(isup_transmission_medium_requirement_value), 0x0,
-                       "", HFILL }},
-
                { &hf_isup_range_indicator,
                        { "Range indicator",  "isup.range_indicator",
                          FT_UINT8, BASE_DEC, NULL , 0x0,
@@ -4501,6 +6028,219 @@ proto_register_isup(void)
                        { "Conference acceptance indicator",  "isup.conference_acceptance_ind",
                        FT_UINT8, BASE_DEC, VALS(isup_conference_acceptance_ind_value), BA_8BIT_MASK,
                        "", HFILL }},
+
+               { &hf_isup_transit_at_intermediate_exchange_ind,
+                       { "Transit at intermediate exchange indicator", "isup.transit_at_intermediate_exchange_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_transit_at_intermediate_exchange_ind_value), A_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Release_call_ind,
+                       { "Release call indicator", "isup.Release_call_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_Release_call_indicator_value), B_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Send_notification_ind,
+                       { "Send notification indicator", "isup.Send_notification_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_Send_notification_ind_value),C_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Discard_message_ind_value,
+                       { "Discard message indicator","isup.Discard_message_ind_value",
+                       FT_BOOLEAN, 8, TFS(&isup_Discard_message_ind_value), D_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Discard_parameter_ind,               
+                       { "Discard parameter indicator","isup.Discard_parameter_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_Discard_parameter_ind_value), E_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Pass_on_not_possible_indicator,
+                       { "Pass on not possible indicator",  "isup_Pass_on_not_possible_ind",
+                       FT_UINT8, BASE_HEX, VALS(isup_Pass_on_not_possible_indicator_vals),GF_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_Broadband_narrowband_interworking_ind,
+                       { "Broadband narrowband interworking indicator Bits JF",  "isup_Pass_on_not_possible_ind",
+                       FT_UINT8, BASE_HEX, VALS(ISUP_Broadband_narrowband_interworking_indicator_vals),BA_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_app_cont_ident,
+                       { "Application context identifier",  "isup.app_context_identifier",
+                       FT_UINT8, BASE_DEC, VALS(isup_application_transport_parameter_value),0x0,
+                       "", HFILL }},
+
+               { &hf_isup_app_Release_call_ind, 
+                       { "Release call indicator (RCI)",  "isup.app_Release_call_indicator",
+                       FT_BOOLEAN, 8, TFS(&isup_Release_call_indicator_value), A_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_app_Send_notification_ind, 
+                       { "Send notification indicator (SNI)",  "isup.app_Send_notification_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_Send_notification_ind_value), B_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_apm_segmentation_ind,
+                       { "APM segmentation indicator",  "isup.apm_segmentation_ind",
+                       FT_UINT8, BASE_DEC, VALS(isup_APM_segmentation_ind_value), FEDCBA_8BIT_MASK,
+                       "", HFILL }},
+
+               { &hf_isup_apm_si_ind, 
+                       { "Sequence indicator (SI)",  "isup.APM_Sequence_ind",
+                       FT_BOOLEAN, 8, TFS(&isup_Sequence_ind_value), G_8BIT_MASK,
+                       "", HFILL }},
+               { &hf_bat_ase_identifier,
+                       { "BAT ASE Identifiers",  "bicc.bat_ase_identifier",
+                       FT_UINT8, BASE_HEX, VALS(bat_ase_list_of_Identifiers_vals),0x0, 
+                       "", HFILL }},
+  
+               { &hf_length_indicator,
+                       { "BAT ASE Element length indicator",  "bicc.bat_ase_length_indicator",
+                       FT_UINT8, BASE_DEC, NULL,0x0,
+                       "", HFILL }},
+
+               { &hf_Action_Indicator,
+                       { "BAT ASE action indicator field",  "bicc.bat_ase_bat_ase_action_indicator_field",
+                       FT_UINT8, BASE_HEX, VALS(bat_ase_action_indicator_field_vals),0x00,     
+                       "", HFILL }},
+
+               { &hf_Instruction_ind_for_general_action,
+                       { "BAT ASE Instruction indicator for general action",  "bicc.bat_ase_Instruction_ind_for_general_action",
+                       FT_UINT8, BASE_HEX, VALS(Instruction_indicator_for_general_action_vals),0x03,   
+                       "", HFILL }},
+
+               { &hf_Send_notification_ind_for_general_action, 
+                       { "Send notification indicator for general action",  "bicc.bat_ase_Send_notification_ind_for_general_action",
+                       FT_BOOLEAN, 8, TFS(&isup_Send_notification_ind_value), 0x04,
+                       "", HFILL }},
+
+               { &hf_Instruction_ind_for_pass_on_not_possible, 
+                       { "Instruction ind for pass-on not possible",  "bicc.bat_ase_Instruction_ind_for_pass_on_not_possible",
+                       FT_UINT8, BASE_HEX, VALS(Instruction_indicator_for_pass_on_not_possible_vals),0x30,     
+                       "", HFILL }},
+
+               { &hf_Send_notification_ind_for_pass_on_not_possible, 
+                       { "Send notification indication for pass-on not possible",  "bicc.bat_ase_Send_notification_ind_for_pass_on_not_possible",
+                       FT_BOOLEAN, 8, TFS(&isup_Send_notification_ind_value), 0x40,
+                       "", HFILL }},
+
+               { &hf_BCTP_Version_Indicator,
+                       { "BCTP Version Indicator",  "bicc.bat_ase_BCTP_Version_Indicator",
+                       FT_UINT8, BASE_DEC, NULL,0x1f,
+                       "", HFILL }},
+       
+               { &hf_BVEI,
+                       { "BCTP Version Error Indicator",  "bicc.bat_ase_BCTP_BVEI",
+                       FT_BOOLEAN, 8, TFS(&BCTP_BVEI_value), 0x40,
+                       "", HFILL }},
+
+               { &hf_Tunnelled_Protocol_Indicator,
+                       { "Tunnelled Protocol Indicator",  "bicc.bat_ase_BCTP_Tunnelled_Protocol_Indicator",
+                       FT_UINT8, BASE_DEC, VALS(BCTP_Tunnelled_Protocol_Indicator_vals),0x3f,  
+                       "", HFILL }},
+
+               { &hf_TPEI,
+                       { "Tunnelled Protocol Error Indicator value",  "bicc.bat_ase_BCTP_tpei",
+                       FT_BOOLEAN, 8, TFS(&BCTP_TPEI_value), 0x40,
+                       "", HFILL }},
+
+               { &hf_bncid,
+                       { "Backbone Network Connection Identifier (BNCId)", "bat_ase.bncid",
+                       FT_UINT32, BASE_HEX, NULL, 0x0,
+                         "", HFILL }},
+
+               { &hf_bat_ase_biwfa,
+                       { "Interworking Function Address( X.213 NSAP encoded)", "bat_ase_biwfa",
+                       FT_BYTES, BASE_HEX, NULL, 0x0,
+                         "", HFILL }},
+
+               { &hf_afi,
+                       { "X.213 Address Format Information ( AFI )",  "x213.afi",
+                       FT_UINT8, BASE_HEX, VALS(x213_afi_value),0x0,   
+                       "", HFILL }},
+
+               { &hf_characteristics,
+                       { "Backbone network connection characteristics", "bat_ase.char",
+                       FT_UINT8, BASE_HEX, VALS(bearer_network_connection_characteristics_vals),0x0,   
+                         "", HFILL }},
+
+               { &hf_Organization_Identifier,
+                       { "Organization identifier subfield ",  "bat_ase.organization_identifier_subfield",
+                       FT_UINT8, BASE_DEC, VALS(bat_ase_organization_identifier_subfield_vals),0x0,
+                       "", HFILL }},
+
+               { &hf_codec_type,
+                       { "ITU-T codec type subfield",  "bat_ase.ITU_T_codec_type_subfield",
+                       FT_UINT8, BASE_HEX, VALS(ITU_T_codec_type_subfield_vals),0x0,
+                       "", HFILL }},
+
+               { &hf_etsi_codec_type,
+                       { "ETSI codec type subfield",  "bat_ase.ETSI_codec_type_subfield",
+                       FT_UINT8, BASE_HEX, VALS(ETSI_codec_type_subfield_vals),0x0,
+                       "", HFILL }},
+
+
+               { &hf_bearer_control_tunneling,
+                       { "Bearer control tunneling",  "bat_ase.bearer_control_tunneling",
+                       FT_BOOLEAN, 8, TFS(&Bearer_Control_Tunnelling_ind_value),0x01,
+                       "", HFILL }},
+
+               { &hf_BAT_ASE_Comp_Report_Reason,
+                       { "Compabillity report reason",  "bat_ase.Comp_Report_Reason",
+                       FT_UINT8, BASE_HEX, VALS(BAT_ASE_Report_Reason_vals),0x0,
+                       "", HFILL }},
+
+
+               { &hf_BAT_ASE_Comp_Report_ident,
+                       { "Bearer control tunneling",  "bat_ase.bearer_control_tunneling",
+                       FT_UINT8, BASE_HEX, VALS(bat_ase_list_of_Identifiers_vals),0x0,
+                       "", HFILL }},
+
+               { &hf_BAT_ASE_Comp_Report_diagnostic,
+                       { "Diagnostics",  "Comp_Report_diagnostic",
+                       FT_UINT16, BASE_HEX, NULL,0x0,
+                       "", HFILL }},
+
+               { &hf_Local_BCU_ID,
+                       { "Local BCU ID",  "bat_ase.Local_BCU_ID",
+                       FT_UINT32, BASE_HEX, NULL, 0x0,
+                         "", HFILL }},
+
+               { &hf_late_cut_trough_cap_ind,
+                       { "Late Cut-through capability indicator",  "bat_ase.late_cut_trough_cap_ind",
+                       FT_BOOLEAN, 8, TFS(&late_cut_trough_cap_ind_value),0x01,
+                       "", HFILL }},
+
+               { &hf_bat_ase_signal,
+                       { "Q.765.5 - Signal Type",  "bat_ase.signal_type",
+                       FT_UINT8, BASE_HEX, VALS(BAt_ASE_Signal_Type_vals),0x0,
+                       "", HFILL }},
+
+               { &hf_bat_ase_duration,
+                       { "Duration in ms",  "bat_ase.signal_type",
+                       FT_UINT16, BASE_DEC, NULL,0x0,
+                       "", HFILL }},
+
+               { &hf_bat_ase_bearer_redir_ind,
+                       { "Redirection Indicator",  "bat_ase.bearer_redir_ind",
+                       FT_UINT8, BASE_HEX, VALS(Bearer_Redirection_Indicator_vals),0x0,
+                       "", HFILL }},
+
+               { &hf_nsap_ipv4_addr,
+                       { "IWFA IPv4 Address", "nsap.ipv4_addr", 
+                       FT_IPv4, BASE_NONE, NULL, 0x0,
+                       "IPv4 address", HFILL }},
+
+               { &hf_nsap_ipv6_addr,
+                 { "IWFA IPv6 Address", "nsap.ipv6_addr",
+                 FT_IPv6, BASE_NONE, NULL, 0x0,
+                "IPv4 address", HFILL}},
+
+
+               { &hf_iana_icp,
+                       { "IANA ICP",  "nsap.iana_icp",
+                       FT_UINT16, BASE_HEX, VALS(iana_icp_values),0x0,
+                       "", HFILL }},
+
        };
 
 /* Setup protocol subtree array */
@@ -4509,7 +6249,10 @@ proto_register_isup(void)
                &ett_isup_parameter,
                &ett_isup_address_digits,
                &ett_isup_pass_along_message,
-               &ett_isup_circuit_state_ind
+               &ett_isup_circuit_state_ind,
+               &ett_bat_ase,
+               &ett_bat_ase_element,
+               &ett_bat_ase_iwfa
        };
 
 /* Register the protocol name and description */
@@ -4519,6 +6262,8 @@ proto_register_isup(void)
 /* Required function calls to register the header fields and subtrees used */
        proto_register_field_array(proto_isup, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+
+       isup_tap = register_tap("isup");
 }
 
 
@@ -4528,8 +6273,43 @@ void
 proto_reg_handoff_isup(void)
 {
   dissector_handle_t isup_handle;
-
   isup_handle = create_dissector_handle(dissect_isup, proto_isup);
   dissector_add("mtp3.service_indicator", MTP3_ISUP_SERVICE_INDICATOR, isup_handle);
   dissector_add("m3ua.protocol_data_si", MTP3_ISUP_SERVICE_INDICATOR, isup_handle);
+
+}
+
+void
+proto_register_bicc(void)
+{
+/* Setup list of header fields  See Section 1.6.1 for details*/
+       static hf_register_info hf[] = {
+               { &hf_bicc_cic,
+                       { "Call identification Code (CIC)",           "bicc.cic",
+                       FT_UINT32, BASE_HEX, NULL, 0x0,
+                         "", HFILL }},
+       };
+
+/* Setup protocol subtree array */
+       static gint *ett[] = {
+               &ett_bicc
+       };
+       proto_bicc = proto_register_protocol("Bearer Independent Call Control ",
+           "BICC", "bicc"); 
+/* Required function calls to register the header fields and subtrees used */
+       proto_register_field_array(proto_bicc, hf, array_length(hf));
+       proto_register_subtree_array(ett, array_length(ett));
+}
+
+/* Register isup with the sub-laying MTP L3 dissector */
+void
+proto_reg_handoff_bicc(void)
+{
+  dissector_handle_t bicc_handle;
+  sdp_handle = find_dissector("sdp");
+
+  bicc_handle = create_dissector_handle(dissect_bicc, proto_bicc);
+  dissector_add("mtp3.service_indicator", MTP3_BICC_SERVICE_INDICATOR, bicc_handle);
+  dissector_add("m3ua.protocol_data_si", MTP3_BICC_SERVICE_INDICATOR, bicc_handle);
 }