diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 4e22d3068f7ee97f76561ac732e26931387601d9..f39189fb908f370979277cca1cf79ffdc4e56a68 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -518,7 +518,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM       False  "Otherwise it is UM, confi
 ##########################
 # S1AP LAYER OPTIONS
 ##########################
-add_boolean_option(S1AP_LIMIT_STREAM_ID_TO_1   True  "FIXME: Despite Eurecom has implemented the spec concerning management of stream ids, there are always issues with other EPCs than EURECOM")
+# none
 
 ##########################
 # PROJECTS (IST, FRENCH COLL., etc)
diff --git a/cmake_targets/tools/epc.conf.in b/cmake_targets/tools/epc.conf.in
index 3c43dc86fda00218093151ee3c70580656f5121f..7af3cca4cc8c97be76b591b9133bb39e69b95904 100755
--- a/cmake_targets/tools/epc.conf.in
+++ b/cmake_targets/tools/epc.conf.in
@@ -67,8 +67,8 @@ MME :
     SCTP :
     {
         # Number of streams to use in input/output
-        SCTP_INSTREAMS  = 32;
-        SCTP_OUTSTREAMS = 32;
+        SCTP_INSTREAMS  = 8;
+        SCTP_OUTSTREAMS = 8;
     };
 
     # ------- S1AP definitions
diff --git a/cmake_targets/tools/epc.local.enb.conf.in b/cmake_targets/tools/epc.local.enb.conf.in
index 8ae32903afc24fd333fb6b7ffd2659870213fde8..353a294f64dde85f85e915ca3b3f301b042d5898 100755
--- a/cmake_targets/tools/epc.local.enb.conf.in
+++ b/cmake_targets/tools/epc.local.enb.conf.in
@@ -34,8 +34,8 @@ MME :
     SCTP :
     {
         # Number of streams to use in input/output
-        SCTP_INSTREAMS  = 32;
-        SCTP_OUTSTREAMS = 32;
+        SCTP_INSTREAMS  = 8;
+        SCTP_OUTSTREAMS = 8;
     };
 
     # ------- S1AP definitions
diff --git a/cmake_targets/tools/run_enb_s1_usrp b/cmake_targets/tools/run_enb_s1_usrp
index 097c8532823aa76edc48feb7a355076d06de2ab6..a4766ed658980e603cacb5fe511289d53464f9ee 100755
--- a/cmake_targets/tools/run_enb_s1_usrp
+++ b/cmake_targets/tools/run_enb_s1_usrp
@@ -39,6 +39,8 @@
 ################################
 THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
 source $THIS_SCRIPT_PATH/build_helper
+declare -i g_run_msc_gen=0
+declare    g_msc_dir="/tmp"
 
 
 function help()
@@ -57,6 +59,7 @@ function help()
   echo_error "  -K, --itti-dump-file      filename  ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
   echo_error "  -M, --target-dl-mcs       mcs       Downlink target MCS."
   echo_error "  -m, --mscgen              directory Generate mscgen output files in a directory"
+  echo_error "  -s, --show-stdout                   Do not redirect stdout and stderr to file /tmp/lte_softmodem.stdout.txt."
   echo_error "  -S, --enable-missed-slot            Continue execution in case of missed slot."
   echo_error "  -T, --target-ul-mcs       mcs       Uplink target MCS."
   echo_error "  -V, --vcd                           Dump timings of processing in a GTKWave compliant file format."
@@ -68,13 +71,40 @@ function help()
 }
 
 
+function do_msc_gen()
+{
+  cd $g_msc_dir
+  last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
+  $OPENAIR_DIR/targets/SCRIPTS/msc_gen.py
+  sync
+  last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
+        
+  if [ x"$last_created_file" != x"$last_created_file2" ]; then
+    if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then 
+      command -v eog 2>/dev/null &&  eog ./$last_created_file2/oai_mscgen_page_0.png
+    fi
+  fi 
+
+}
+
+
+function control_c()
+# run if user hits control-c
+{
+  echo_warning "\nExiting by ctrl+c\n"
+  if [ $g_run_msc_gen -eq 1 ]; then 
+    do_msc_gen
+  fi
+  exit $?
+}
+
 
 function main()
 {
   local -i run_gdb=0
-  local -i run_mscgen=0
+  local -i show_stdout=0
   local    exe_arguments=""
-  local    MSC_DIR="/tmp"
+  local    itti_dump_file=""
   
   until [ -z "$1" ]
     do
@@ -99,7 +129,7 @@ function main()
         ;;
       -g | --gdb)
         run_gdb=1
-        echo "setting GDB flag to: $GDB"
+        echo "setting GDB flag to: $run_gdb"
         shift;
         ;;
       -h | --help)
@@ -108,23 +138,23 @@ function main()
         exit 0
         ;;
       -K | --itti-dump-file)
-        ITTI_DUMP_FILE=$2
+        itti_dump_file=$2
         # can omit file name if last arg on the line
-        if [ "x$ITTI_DUMP_FILE" = "x" ]; then
-          ITTI_DUMP_FILE="/tmp/enb_s1_usrp_itti.log"
+        if [ "x$itti_dump_file" = "x" ]; then
+          itti_dump_file="/tmp/enb_s1_usrp_itti.log"
           shift 1;
         else
           shift 2;
         fi
-        echo "setting ITTI dump file to: $ITTI_DUMP_FILE"
-        exe_arguments="$exe_arguments -K $ITTI_DUMP_FILE"
+        echo "setting ITTI dump file to: $itti_dump_file"
+        exe_arguments="$exe_arguments -K $itti_dump_file"
         ;;      
       -m | --mscgen)
-        MSC_DIR=$2
+        g_msc_dir=$2
         # can omit file name if last arg on the line
-        if [ -d  "$MSC_DIR" ]; then
-          echo "setting mscgen log files to dir: $MSC_DIR"
-          run_mscgen=1
+        if [ -d  "$g_msc_dir" ]; then
+          echo "setting mscgen log files to dir: $g_msc_dir"
+          g_run_msc_gen=1
           shift 2;
         else
           echo_error "Mscgen log dir does not exist"
@@ -141,6 +171,11 @@ function main()
         exe_arguments="$exe_arguments -V /tmp/oai_gtk_wave.vcd"
         shift ;
         ;;
+      -s | --show-stdout)
+        echo "setting show stdout"
+        show_stdout=1
+        shift ;
+        ;;
       -S | --enable-missed-slot)
         echo "setting continue even if missed slot"
         exe_arguments="$exe_arguments -S"
@@ -151,14 +186,14 @@ function main()
         exe_arguments="$exe_arguments -t $2"
         shift 2;
         ;;
-      -W | ----wireshark-l2)
+      -W | --wireshark-l2)
         echo "setting l2 pcap dump output"
         exe_arguments="$exe_arguments -W"
         shift ;
         ;;
       -x | --xforms)
         exe_arguments="$exe_arguments -d"
-        echo "setting xforms to: $XFORMS"
+        echo "setting xforms"
         shift;
         ;;
       *)   
@@ -180,32 +215,32 @@ function main()
 
 
   if [ $run_gdb -eq 0 ]; then 
-    exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10  `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
+    # trap keyboard interrupt (control-c)
+    trap control_c SIGINT
+    if  [ $show_stdout -eq 0 ]; then 
+      echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/lte_softmodem.stdout.txt"
+      exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10  `echo $exe_arguments` 2>&1 > /tmp/lte_softmodem.stdout.txt
+    else
+      exec $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10  `echo $exe_arguments`
+    fi
   else
+    # trap keyboard interrupt (control-c) is done by gdb
     touch      ~/.gdb_lte_softmodem
     chmod 777  ~/.gdb_lte_softmodem
     echo "file $OPENAIR_DIR/targets/bin/lte-softmodem.Rel10" > ~/.gdb_lte_softmodem
     echo "set args $exe_arguments" >> ~/.gdb_lte_softmodem
     echo "run"                        >> ~/.gdb_lte_softmodem
     cat ~/.gdb_lte_softmodem
-    gdb -n -x ~/.gdb_lte_softmodem 2>&1 
-    #> /tmp/gdb_lte_softmodem.stdout.txt
+    if  [ $show_stdout -eq 0 ]; then 
+      echo_warning "stdout/sderr of lte-softmodem executable redirected to /tmp/gdb_lte_softmodem.stdout.txt"
+      gdb -n -x ~/.gdb_lte_softmodem 2>&1 > /tmp/gdb_lte_softmodem.stdout.txt
+    else
+      gdb -n -x ~/.gdb_lte_softmodem 
+    fi
+    if [ $g_run_msc_gen -eq 1 ]; then 
+      do_msc_gen
+    fi
   fi
-  
-  if [ $run_mscgen -eq 1 ]; then 
-    cd $MSC_DIR
-    last_created_file=`ls -t mscgen* | head -1 | tr -d ':'`
-    $OPENAIR_DIR/targets/SCRIPTS/msc_gen.py  --profile E_UTRAN
-    sync
-    last_created_file2=`ls -t mscgen* | head -1 | tr -d ':'`
-        
-    if [ x"$last_created_file" != x"$last_created_file2" ]; then
-      if [ -f ./$last_created_file2/oai_mscgen_page_0.png ]; then 
-        command -v eog 2>/dev/null &&  eog ./$last_created_file2/oai_mscgen_page_0.png
-      fi
-    fi 
-  fi
-
 }
 
 
diff --git a/cmake_targets/tools/run_epc b/cmake_targets/tools/run_epc
index da8652883330694b4fc3345776c27f0a1f57a565..08a014cde0fee053102075a35c9ec03426035677 100755
--- a/cmake_targets/tools/run_epc
+++ b/cmake_targets/tools/run_epc
@@ -39,8 +39,8 @@
 ################################
 THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
 source $THIS_SCRIPT_PATH/build_helper
-global -i g_run_msc_gen=0
-global    g_msc_dir="/tmp"
+declare -i g_run_msc_gen=0
+declare    g_msc_dir="/tmp"
 
 set_openair_env 
 
@@ -128,11 +128,9 @@ function main()
         ;;
       -m | --mscgen)
         g_msc_dir=$2
-        # can omit file name if last arg on the line
         if [ -d  "$g_msc_dir" ]; then
           echo "setting mscgen log files to dir: $g_msc_dir"
           g_run_msc_gen=1
-          exe_arguments="-m $exe_arguments"
           shift 2;
         else
           echo_error "Mscgen log dir does not exist"
diff --git a/openair-cn/OAI_EPC/oai_epc.c b/openair-cn/OAI_EPC/oai_epc.c
index aea64ab3c7153e67405723f2ae71936e8cb029d7..f2fe6776be84b977e27188ba5f82a39d9b1609d1 100644
--- a/openair-cn/OAI_EPC/oai_epc.c
+++ b/openair-cn/OAI_EPC/oai_epc.c
@@ -64,6 +64,7 @@
 #include "s6a_defs.h"
 
 #include "oai_epc.h"
+#include "msc.h"
 
 int main(int argc, char *argv[])
 {
@@ -73,6 +74,7 @@ int main(int argc, char *argv[])
                               mme_config.itti_config.log_file));
   /* Parse the command line for options and set the mme_config accordingly. */
   CHECK_INIT_RETURN(config_parse_opt_line(argc, argv, &mme_config) < 0);
+  MSC_INIT(MSC_MME_GW, THREAD_MAX+TASK_MAX);
 
   /* Calling each layer init function */
   CHECK_INIT_RETURN(log_init(&mme_config, oai_epc_log_specific));
diff --git a/openair-cn/S1AP/s1ap_eNB.c b/openair-cn/S1AP/s1ap_eNB.c
index 46e968457bd47bca5339e9e705d4c5d61a97acd5..da11f2893f11ff4783a2855b3fd0399de3a163dd 100644
--- a/openair-cn/S1AP/s1ap_eNB.c
+++ b/openair-cn/S1AP/s1ap_eNB.c
@@ -98,7 +98,9 @@ uint32_t s1ap_generate_eNB_id(void)
 
 static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
                                   net_ip_address_t    *mme_ip_address,
-                                  net_ip_address_t    *local_ip_addr)
+                                  net_ip_address_t    *local_ip_addr,
+                                  uint16_t             in_streams,
+                                  uint16_t             out_streams)
 {
   MessageDef                 *message_p                   = NULL;
   sctp_new_association_req_t *sctp_new_association_req_p  = NULL;
@@ -114,6 +116,9 @@ static void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
   sctp_new_association_req_p->port = S1AP_PORT_NUMBER;
   sctp_new_association_req_p->ppid = S1AP_SCTP_PPID;
 
+  sctp_new_association_req_p->in_streams  = in_streams;
+  sctp_new_association_req_p->out_streams = out_streams;
+
   memcpy(&sctp_new_association_req_p->remote_address,
          mme_ip_address,
          sizeof(*mme_ip_address));
@@ -197,8 +202,11 @@ void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *
 
   /* Trying to connect to provided list of MME ip address */
   for (index = 0; index < s1ap_register_eNB->nb_mme; index++) {
-    s1ap_eNB_register_mme(new_instance, &s1ap_register_eNB->mme_ip_address[index],
-                          &s1ap_register_eNB->enb_ip_address);
+    s1ap_eNB_register_mme(new_instance,
+    		              &s1ap_register_eNB->mme_ip_address[index],
+                          &s1ap_register_eNB->enb_ip_address,
+                          s1ap_register_eNB->sctp_in_streams,
+                          s1ap_register_eNB->sctp_out_streams);
   }
 }
 
diff --git a/openair-cn/S1AP/s1ap_eNB_nas_procedures.c b/openair-cn/S1AP/s1ap_eNB_nas_procedures.c
index 4521148984c0aeeb6a3e29445c0b2f1ac8f275df..41eacac88924e735dfcfb14e81cd47f799389a90 100644
--- a/openair-cn/S1AP/s1ap_eNB_nas_procedures.c
+++ b/openair-cn/S1AP/s1ap_eNB_nas_procedures.c
@@ -224,13 +224,6 @@ int s1ap_eNB_handle_nas_first_req(
     mme_desc_p->nextstream += 1;
   }
 
-#if defined(S1AP_LIMIT_STREAM_ID_TO_0)
-  mme_desc_p->nextstream = 0;
-#else
-#  if defined(S1AP_LIMIT_STREAM_ID_TO_1)
-  mme_desc_p->nextstream = 1;
-#  endif
-#endif
   ue_desc_p->stream = mme_desc_p->nextstream;
 
   MSC_LOG_TX_MESSAGE(
diff --git a/openair-cn/SCTP/sctp_default_values.h b/openair-cn/SCTP/sctp_default_values.h
index 5985dd907c313400c958240d7370a46c2b48c6df..28b6cc1fbffaa1d1688c07d2c72e883ba9b21ba6 100644
--- a/openair-cn/SCTP/sctp_default_values.h
+++ b/openair-cn/SCTP/sctp_default_values.h
@@ -29,8 +29,8 @@
 #ifndef SCTP_DEFAULT_VALUES_H_
 #define SCTP_DEFAULT_VALUES_H_
 
-#define SCTP_OUT_STREAMS        (64)
-#define SCTP_IN_STREAMS         (64)
+#define SCTP_OUT_STREAMS        (16)
+#define SCTP_IN_STREAMS         (16)
 #define SCTP_MAX_ATTEMPTS       (2)
 #define SCTP_TIMEOUT            (5)
 #define SCTP_RECV_BUFFER_SIZE   (1024)
diff --git a/openair-cn/SCTP/sctp_eNB_task.c b/openair-cn/SCTP/sctp_eNB_task.c
index e2238fddca10f5ea9ee8fbf4887dc60da5cbf93f..c9039f714d90c825c2a1c3ce456dbb6a549111cd 100644
--- a/openair-cn/SCTP/sctp_eNB_task.c
+++ b/openair-cn/SCTP/sctp_eNB_task.c
@@ -125,7 +125,7 @@ sctp_handle_new_association_req(
   const task_id_t requestor,
   const sctp_new_association_req_t * const sctp_new_association_req_p)
 {
-  int                           sd;
+  int                           sd       = 0;
   int32_t                       assoc_id = 0;
 
   struct sctp_event_subscribe   events;
@@ -134,8 +134,10 @@ sctp_handle_new_association_req(
   enum sctp_connection_type_e   connection_type = SCTP_TYPE_CLIENT;
 
   struct ifreq                  ifr;
-  struct ifaddrs               *ifaddr, *ifa;
-  int                           family, s;
+  struct ifaddrs               *ifaddr = NULL;
+  struct ifaddrs               *ifa    = NULL;
+  int                           family = 0;
+  int                           s = 0;
   struct in_addr                in;
   struct in6_addr               in6;
   /* Prepare a new SCTP association as requested by upper layer and try to connect
@@ -144,6 +146,7 @@ sctp_handle_new_association_req(
   DevAssert(sctp_new_association_req_p != NULL);
 
   /* Create new socket with IPv6 affinity */
+#warning "SCTP may Force IPv4 only, here"
 #ifdef NO_VIRTUAL_MACHINE
 
   // in init chunk appears a list of host addresses, IPv4 and IPv4 in an arbitrary (unsorted) order
@@ -162,8 +165,10 @@ sctp_handle_new_association_req(
   /* Add the socket to list of fd monitored by ITTI */
   itti_subscribe_event_fd(TASK_SCTP, sd);
 
-  if (sctp_set_init_opt(sd, SCTP_IN_STREAMS, SCTP_OUT_STREAMS,
-                        SCTP_MAX_ATTEMPTS, SCTP_TIMEOUT) != 0) {
+  if (sctp_set_init_opt(sd,
+		  sctp_new_association_req_p->in_streams,
+		  sctp_new_association_req_p->out_streams,
+		  SCTP_MAX_ATTEMPTS, SCTP_TIMEOUT) != 0) {
     SCTP_ERROR("Setsockopt IPPROTO_SCTP_INITMSG failed: %s\n",
                strerror(errno));
     itti_unsubscribe_event_fd(TASK_SCTP, sd);
diff --git a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h b/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h
index 43d2681c9a29d81436a07088c8fd521351d4a15c..3e3c186d1999fce9f9256947b97202ce27921b21 100755
--- a/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h
+++ b/openair-cn/TEST/oaisim_mme_test_s1c_s1ap.h
@@ -55,6 +55,8 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
 
 void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
                                   net_ip_address_t    *mme_ip_address,
-                                  net_ip_address_t    *local_ip_addr);
+                                  net_ip_address_t    *local_ip_addr,
+                                  uint16_t             in_streams,
+                                  uint16_t             out_streams);
 void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB);
 void *s1ap_eNB_task(void *arg);
diff --git a/openair-cn/UTILS/mme_config.c b/openair-cn/UTILS/mme_config.c
index dc6aea613ce5ecb42de70ad5cc14988811ba3f01..c162199bb4392b7656a98b8078ff6320b81efa92 100644
--- a/openair-cn/UTILS/mme_config.c
+++ b/openair-cn/UTILS/mme_config.c
@@ -653,10 +653,6 @@ static void usage(void)
   fprintf(stdout, "Usage: oaisim_mme [options]\n\n");
   fprintf(stdout, "Available options:\n");
   fprintf(stdout, "-h      Print this help and return\n");
-  fprintf(stdout, "-i<interface name>\n");
-  fprintf(stdout, "        Set the network card to use for IPv4 forwarding\n");
-  fprintf(stdout, "-m\n");
-  fprintf(stdout, "        Use mscgen dump trace tool\n");
   fprintf(stdout, "-c<path>\n");
   fprintf(stdout, "        Set the configuration file for mme\n");
   fprintf(stdout, "        See template in UTILS/CONF\n");
@@ -677,7 +673,7 @@ int config_parse_opt_line(int argc, char *argv[], mme_config_t *mme_config_p)
   mme_config_init(mme_config_p);
 
   /* Parsing command line */
-  while ((c = getopt (argc, argv, "O:c:hi:K:mv:V")) != -1) {
+  while ((c = getopt (argc, argv, "O:c:hi:K:v:V")) != -1) {
     switch (c) {
     case 'O':
     case 'c': {
@@ -692,21 +688,6 @@ int config_parse_opt_line(int argc, char *argv[], mme_config_t *mme_config_p)
     }
     break;
 
-    case 'm': {
-      fprintf(stdout, "Logging Message chart(mscgen)\n");
-      MSC_INIT(MSC_MME_GW, THREAD_MAX+TASK_MAX);
-    }
-    break;
-
-    /*case 'i': {
-        int interface_len = 0;
-
-        // Copying provided interface name to use for ipv4 forwarding
-        interface_len = strlen(optarg);
-        mme_config_p->ipv4.sgw_interface_name_for_S1u_S12_S4_up = calloc(interface_len + 1, sizeof(char));
-        memcpy(mme_config_p->ipv4.sgw_interface_name_for_S1u_S12_S4_up, optarg, interface_len);
-        mme_config_p->ipv4.sgw_interface_name_for_S1u_S12_S4_up[interface_len] = '\0';
-    } break;*/
     case 'v': {
       mme_config_p->verbosity_level = atoi(optarg);
     }
diff --git a/openair-cn/UTILS/mme_default_values.h b/openair-cn/UTILS/mme_default_values.h
index 547d0f2f7dc944767dff85c3578dd05357df8744..25111aea607ac54139270aae477d60ca13c7ace6 100644
--- a/openair-cn/UTILS/mme_default_values.h
+++ b/openair-cn/UTILS/mme_default_values.h
@@ -59,8 +59,8 @@
  ******************************************************************************/
 
 #define SCTP_RECV_BUFFER_SIZE (1 << 16)
-#define SCTP_OUT_STREAMS      (64)
-#define SCTP_IN_STREAMS       (64)
+#define SCTP_OUT_STREAMS      (32)
+#define SCTP_IN_STREAMS       (32)
 #define SCTP_MAX_ATTEMPTS     (5)
 
 /*******************************************************************************
diff --git a/openair2/COMMON/s1ap_messages_types.h b/openair2/COMMON/s1ap_messages_types.h
index 1d65155baf90d626b9a4c8aa5f3e48532578f78b..7849e418d168198a4989ded4057d10b1e5d1b940 100644
--- a/openair2/COMMON/s1ap_messages_types.h
+++ b/openair2/COMMON/s1ap_messages_types.h
@@ -317,6 +317,10 @@ typedef struct s1ap_register_enb_req_s {
   uint8_t          nb_mme;
   /* List of MME to connect to */
   net_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
+
+  /* Number of SCTP streams used for a mme association */
+  uint16_t sctp_in_streams;
+  uint16_t sctp_out_streams;
 } s1ap_register_enb_req_t;
 
 //-------------------------------------------------------------------------------------------//
diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h
index 5a9279628eb64c8be57ed26820d5181d124d7fdf..0b365bd38b15a2e2728d5324d24bdef3c6784d69 100644
--- a/openair2/COMMON/sctp_messages_types.h
+++ b/openair2/COMMON/sctp_messages_types.h
@@ -54,6 +54,10 @@ typedef struct sctp_new_association_req_s {
   /* Payload Protocol Identifier to use */
   uint32_t         ppid;
 
+  /* Number of streams used for this association */
+  uint16_t in_streams;
+  uint16_t out_streams;
+
   /* Local address to bind to */
   net_ip_address_t local_address;
   /* Remote address to connect to */
diff --git a/openair2/ENB_APP/enb_app.c b/openair2/ENB_APP/enb_app.c
index b4eb87e8f3774e7db6d9a79d7c306d8ab0d462aa..4c55b050709b2012ffabaa3a106a06f398f2d553 100644
--- a/openair2/ENB_APP/enb_app.c
+++ b/openair2/ENB_APP/enb_app.c
@@ -245,6 +245,10 @@ static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end, con
                  sizeof(s1ap_register_eNB->mme_ip_address[0].ipv6_address));
       }
 
+      s1ap_register_eNB->sctp_in_streams       = enb_properties->properties[enb_id]->sctp_in_streams;
+      s1ap_register_eNB->sctp_out_streams      = enb_properties->properties[enb_id]->sctp_out_streams;
+
+
       s1ap_register_eNB->enb_ip_address.ipv6 = 0;
       s1ap_register_eNB->enb_ip_address.ipv4 = 1;
       addr.s_addr = enb_properties->properties[enb_id]->enb_ipv4_address_for_S1_MME;
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index 76e31c2caa838c2bc67bd235084b9ef9688548ec..b5eeb63e091a257daf64c143b37a9c4d1a4feba1 100755
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -56,6 +56,7 @@
 #   include "sctp_eNB_task.h"
 # endif
 #endif
+#include "sctp_default_values.h"
 #include "SystemInformationBlockType2.h"
 #include "LAYER2/MAC/extern.h"
 
@@ -158,6 +159,10 @@
 #define ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE         "active"
 #define ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE     "preference"
 
+#define ENB_CONFIG_STRING_SCTP_CONFIG                    "SCTP"
+#define ENB_CONFIG_STRING_SCTP_INSTREAMS                 "SCTP_INSTREAMS"
+#define ENB_CONFIG_STRING_SCTP_OUTSTREAMS                "SCTP_OUTSTREAMS"
+
 #define ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG     "NETWORK_INTERFACES"
 #define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
 #define ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME   "ENB_IPV4_ADDRESS_FOR_S1_MME"
@@ -166,16 +171,16 @@
 #define ENB_CONFIG_STRING_ENB_PORT_FOR_S1U              "ENB_PORT_FOR_S1U"
 
 
-#define ENB_CONFIG_STRING_ASN1_VERBOSITY                      "Asn1_verbosity"
-#define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE                 "none"
-#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING             "annoying"
-#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO                 "info"
+#define ENB_CONFIG_STRING_ASN1_VERBOSITY                   "Asn1_verbosity"
+#define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE              "none"
+#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING          "annoying"
+#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO              "info"
 
 // OTG config per ENB-UE DL
-#define ENB_CONF_STRING_OTG_CONFIG                          "otg_config"
-#define ENB_CONF_STRING_OTG_UE_ID                           "ue_id"
-#define ENB_CONF_STRING_OTG_APP_TYPE                        "app_type"
-#define ENB_CONF_STRING_OTG_BG_TRAFFIC                      "bg_traffic"
+#define ENB_CONF_STRING_OTG_CONFIG                         "otg_config"
+#define ENB_CONF_STRING_OTG_UE_ID                          "ue_id"
+#define ENB_CONF_STRING_OTG_APP_TYPE                       "app_type"
+#define ENB_CONF_STRING_OTG_BG_TRAFFIC                     "bg_traffic"
 
 // per eNB configuration
 #define ENB_CONFIG_STRING_LOG_CONFIG                       "log_config"
@@ -551,6 +556,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
   libconfig_int     srb1_poll_byte                = 0;
   libconfig_int     srb1_max_retx_threshold       = 0;
 
+  libconfig_int     my_int;
+
   char*             ipv4                          = NULL;
   char*             ipv6                          = NULL;
   char*             active                        = NULL;
@@ -593,9 +600,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
 
   config_init(&cfg);
 
-  if(lib_config_file_name_pP != NULL) {
+  if (lib_config_file_name_pP != NULL) {
     /* Read the file. If there is an error, report it and exit. */
-    if(! config_read_file(&cfg, lib_config_file_name_pP)) {
+    if (! config_read_file(&cfg, lib_config_file_name_pP)) {
       config_destroy(&cfg);
       AssertFatal (0, "Failed to parse eNB configuration file %s!\n", lib_config_file_name_pP);
     }
@@ -606,7 +613,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
 
 #if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
 
-  if(  (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) {
+  if (  (config_lookup_string( &cfg, ENB_CONFIG_STRING_ASN1_VERBOSITY, (const char **)&astring) )) {
     if (strcasecmp(astring , ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
       asn_debug      = 0;
       asn1_xer_print = 0;
@@ -626,7 +633,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
   // Get list of active eNBs, (only these will be configured)
   setting = config_lookup(&cfg, ENB_CONFIG_STRING_ACTIVE_ENBS);
 
-  if(setting != NULL) {
+  if (setting != NULL) {
     num_enbs = config_setting_length(setting);
 
     for (i = 0; i < num_enbs; i++) {
@@ -643,7 +650,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
   /* Output a list of all eNBs. */
   setting = config_lookup(&cfg, ENB_CONFIG_STRING_ENB_LIST);
 
-  if(setting != NULL) {
+  if (setting != NULL) {
     enb_properties_index = 0;
     parse_errors      = 0;
     num_enbs = config_setting_length(setting);
@@ -651,7 +658,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
     for (i = 0; i < num_enbs; i++) {
       setting_enb = config_setting_get_elem(setting, i);
 
-      if(! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) {
+      if (! config_setting_lookup_int(setting_enb, ENB_CONFIG_STRING_ENB_ID, &enb_id)) {
         /* Calculate a default eNB ID */
 # if defined(ENABLE_USE_MME)
         uint32_t hash;
@@ -663,7 +670,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
 # endif
       }
 
-      if(  !(       config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE,           &cell_type)
+      if (  !(       config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_CELL_TYPE,           &cell_type)
                     && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_ENB_NAME,            &enb_name)
                     && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_TRACKING_AREA_CODE,  &tac)
                     && config_setting_lookup_string(setting_enb, ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, &mcc)
@@ -712,7 +719,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
           setting_component_carriers = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_COMPONENT_CARRIERS);
           enb_properties.properties[enb_properties_index]->nb_cc = 0;
 
-          if(setting_component_carriers != NULL) {
+          if (setting_component_carriers != NULL) {
 
             num_component_carriers     = config_setting_length(setting_component_carriers);
             printf("num component carrier %d \n", num_component_carriers);
@@ -722,7 +729,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               component_carrier = config_setting_get_elem(setting_component_carriers, j);
 
               //printf("Component carrier %d\n",component_carrier);
-              if(!(config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_FRAME_TYPE, &frame_type)
+              if (!(config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_FRAME_TYPE, &frame_type)
                    && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TDD_CONFIG, &tdd_config)
                    && config_setting_lookup_int(component_carrier, ENB_CONFIG_STRING_TDD_CONFIG_S, &tdd_config_s)
                    && config_setting_lookup_string(component_carrier, ENB_CONFIG_STRING_PREFIX_TYPE, &prefix_type)
@@ -1929,9 +1936,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
                              lib_config_file_name_pP, i, srb1_poll_byte);
             }
 
-            if  (srb1_timer_poll_retransmit <= 250) {
+            if (srb1_timer_poll_retransmit <= 250) {
               enb_properties.properties[enb_properties_index]->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 5)/5;
-            } else if  (srb1_timer_poll_retransmit <= 500) {
+            } else if (srb1_timer_poll_retransmit <= 500) {
               enb_properties.properties[enb_properties_index]->srb1_timer_poll_retransmit = (srb1_timer_poll_retransmit - 300)/50 + 50;
             } else {
               AssertError (0, parse_errors ++,
@@ -1939,9 +1946,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
                            lib_config_file_name_pP, i, srb1_timer_poll_retransmit);
             }
 
-            if  (srb1_timer_status_prohibit <= 250) {
+            if (srb1_timer_status_prohibit <= 250) {
               enb_properties.properties[enb_properties_index]->srb1_timer_status_prohibit = srb1_timer_status_prohibit/5;
-            } else if  ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) {
+            } else if ((srb1_timer_poll_retransmit >= 300) && (srb1_timer_poll_retransmit <= 500)) {
               enb_properties.properties[enb_properties_index]->srb1_timer_status_prohibit = (srb1_timer_status_prohibit - 300)/50 + 51;
             } else {
               AssertError (0, parse_errors ++,
@@ -2095,7 +2102,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
           for (j = 0; j < num_mme_address; j++) {
             setting_mme_address = config_setting_get_elem(setting_mme_addresses, j);
 
-            if(  !(
+            if (  !(
                    config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV4_ADDRESS, (const char **)&ipv4)
                    && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IPV6_ADDRESS, (const char **)&ipv6)
                    && config_setting_lookup_string(setting_mme_address, ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, (const char **)&active)
@@ -2130,11 +2137,28 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
           }
 
+          // SCTP SETTING
+          enb_properties.properties[enb_properties_index]->sctp_out_streams = SCTP_OUT_STREAMS;
+          enb_properties.properties[enb_properties_index]->sctp_in_streams  = SCTP_IN_STREAMS;
+# if defined(ENABLE_USE_MME)
+          subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_SCTP_CONFIG);
+
+          if (subsetting != NULL) {
+            if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_INSTREAMS, &my_int) )) {
+            	enb_properties.properties[enb_properties_index]->sctp_in_streams = (uint16_t)my_int;
+            }
+
+            if ( (config_setting_lookup_int( subsetting, ENB_CONFIG_STRING_SCTP_OUTSTREAMS, &my_int) )) {
+            	enb_properties.properties[enb_properties_index]->sctp_out_streams = (uint16_t)my_int;
+            }
+          }
+#endif
+
           // NETWORK_INTERFACES
           subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
 
-          if(subsetting != NULL) {
-            if(  (
+          if (subsetting != NULL) {
+            if (  (
                    config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME,
                                                  (const char **)&enb_interface_name_for_S1_MME)
                    && config_setting_lookup_string( subsetting, ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME,
@@ -2170,7 +2194,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
           // OTG _CONFIG
           setting_otg = config_setting_get_member (setting_enb, ENB_CONF_STRING_OTG_CONFIG);
 
-          if(setting_otg != NULL) {
+          if (setting_otg != NULL) {
             num_otg_elements  = config_setting_length(setting_otg);
             printf("num otg elements %d \n", num_otg_elements);
             enb_properties.properties[enb_properties_index]->num_otg_elements = 0;
@@ -2178,13 +2202,13 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             for (j = 0; j < num_otg_elements; j++) {
               subsetting_otg=config_setting_get_elem(setting_otg, j);
 
-              if(config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id)) {
+              if (config_setting_lookup_int(subsetting_otg, ENB_CONF_STRING_OTG_UE_ID, &otg_ue_id)) {
                 enb_properties.properties[enb_properties_index]->otg_ue_id[j] = otg_ue_id;
               } else {
                 enb_properties.properties[enb_properties_index]->otg_ue_id[j] = 1;
               }
 
-              if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)) {
+              if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_APP_TYPE, (const char **)&otg_app_type)) {
                 if ((enb_properties.properties[enb_properties_index]->otg_app_type[j] = map_str_to_int(otg_app_type_names,otg_app_type))== -1) {
                   enb_properties.properties[enb_properties_index]->otg_app_type[j] = BCBR;
                 }
@@ -2192,7 +2216,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
                 enb_properties.properties[enb_properties_index]->otg_app_type[j] = NO_PREDEFINED_TRAFFIC; // 0
               }
 
-              if(config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)) {
+              if (config_setting_lookup_string(subsetting_otg, ENB_CONF_STRING_OTG_BG_TRAFFIC, (const char **)&otg_bg_traffic)) {
 
                 if ((enb_properties.properties[enb_properties_index]->otg_bg_traffic[j] = map_str_to_int(switch_names,otg_bg_traffic)) == -1) {
                   enb_properties.properties[enb_properties_index]->otg_bg_traffic[j]=0;
@@ -2210,9 +2234,9 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
           // log_config
           subsetting = config_setting_get_member (setting_enb, ENB_CONFIG_STRING_LOG_CONFIG);
 
-          if(subsetting != NULL) {
+          if (subsetting != NULL) {
             // global
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_LEVEL, (const char **)  &glog_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_LEVEL, (const char **)  &glog_level)) {
               if ((enb_properties.properties[enb_properties_index]->glog_level = map_str_to_int(log_level_names, glog_level)) == -1) {
                 enb_properties.properties[enb_properties_index]->glog_level = LOG_INFO;
               }
@@ -2222,7 +2246,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->glog_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,(const char **)  &glog_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GLOBAL_LOG_VERBOSITY,(const char **)  &glog_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->glog_verbosity = map_str_to_int(log_verbosity_names, glog_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->glog_verbosity = LOG_MED;
               }
@@ -2233,7 +2257,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             // HW
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_LEVEL, (const char **) &hw_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_LEVEL, (const char **) &hw_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->hw_log_level = map_str_to_int(log_level_names,hw_log_level)) == -1) {
                 enb_properties.properties[enb_properties_index]->hw_log_level = LOG_INFO;
               }
@@ -2243,7 +2267,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->hw_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_VERBOSITY, (const char **) &hw_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_HW_LOG_VERBOSITY, (const char **) &hw_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->hw_log_verbosity = map_str_to_int(log_verbosity_names,hw_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->hw_log_verbosity = LOG_MED;
               }
@@ -2254,7 +2278,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             // phy
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_LEVEL,(const char **) &phy_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_LEVEL,(const char **) &phy_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->phy_log_level = map_str_to_int(log_level_names,phy_log_level)) == -1) {
                 enb_properties.properties[enb_properties_index]->phy_log_level = LOG_INFO;
               }
@@ -2264,7 +2288,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->phy_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_VERBOSITY, (const char **)&phy_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PHY_LOG_VERBOSITY, (const char **)&phy_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->phy_log_verbosity = map_str_to_int(log_verbosity_names,phy_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->phy_log_verbosity = LOG_MED;
               }
@@ -2275,7 +2299,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             //mac
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_LEVEL, (const char **)&mac_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_LEVEL, (const char **)&mac_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->mac_log_level = map_str_to_int(log_level_names,mac_log_level)) == -1 ) {
                 enb_properties.properties[enb_properties_index]->mac_log_level = LOG_INFO;
               }
@@ -2285,7 +2309,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->mac_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_VERBOSITY, (const char **)&mac_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_MAC_LOG_VERBOSITY, (const char **)&mac_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->mac_log_verbosity = map_str_to_int(log_verbosity_names,mac_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->mac_log_verbosity = LOG_MED;
               }
@@ -2296,7 +2320,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             //rlc
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_LEVEL, (const char **)&rlc_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_LEVEL, (const char **)&rlc_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->rlc_log_level = map_str_to_int(log_level_names,rlc_log_level)) == -1) {
                 enb_properties.properties[enb_properties_index]->rlc_log_level = LOG_INFO;
               }
@@ -2306,7 +2330,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->rlc_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_VERBOSITY, (const char **)&rlc_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RLC_LOG_VERBOSITY, (const char **)&rlc_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->rlc_log_verbosity = map_str_to_int(log_verbosity_names,rlc_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->rlc_log_verbosity = LOG_MED;
               }
@@ -2317,7 +2341,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             //pdcp
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_LEVEL, (const char **)&pdcp_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_LEVEL, (const char **)&pdcp_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->pdcp_log_level = map_str_to_int(log_level_names,pdcp_log_level)) == -1) {
                 enb_properties.properties[enb_properties_index]->pdcp_log_level = LOG_INFO;
               }
@@ -2327,7 +2351,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->pdcp_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_VERBOSITY, (const char **)&pdcp_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_PDCP_LOG_VERBOSITY, (const char **)&pdcp_log_verbosity)) {
               enb_properties.properties[enb_properties_index]->pdcp_log_verbosity = map_str_to_int(log_verbosity_names,pdcp_log_verbosity);
               //printf( "\tPDCP log verbosity:\t%s->%d\n",pdcp_log_verbosity, enb_properties.properties[enb_properties_index]->pdcp_log_verbosity);
             } else {
@@ -2335,7 +2359,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
             }
 
             //rrc
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_LEVEL, (const char **)&rrc_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_LEVEL, (const char **)&rrc_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->rrc_log_level = map_str_to_int(log_level_names,rrc_log_level)) == -1 ) {
                 enb_properties.properties[enb_properties_index]->rrc_log_level = LOG_INFO;
               }
@@ -2345,7 +2369,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->rrc_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_VERBOSITY, (const char **)&rrc_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_RRC_LOG_VERBOSITY, (const char **)&rrc_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->rrc_log_verbosity = map_str_to_int(log_verbosity_names,rrc_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->rrc_log_verbosity = LOG_MED;
               }
@@ -2355,7 +2379,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->rrc_log_verbosity = LOG_MED;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_LEVEL, (const char **)&gtpu_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_LEVEL, (const char **)&gtpu_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->gtpu_log_level = map_str_to_int(log_level_names,gtpu_log_level)) == -1 ) {
                 enb_properties.properties[enb_properties_index]->gtpu_log_level = LOG_INFO;
               }
@@ -2365,7 +2389,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->gtpu_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY, (const char **)&gtpu_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_GTPU_LOG_VERBOSITY, (const char **)&gtpu_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->gtpu_log_verbosity = map_str_to_int(log_verbosity_names,gtpu_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->gtpu_log_verbosity = LOG_MED;
               }
@@ -2375,7 +2399,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->gtpu_log_verbosity = LOG_MED;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_LEVEL, (const char **)&udp_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_LEVEL, (const char **)&udp_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->udp_log_level = map_str_to_int(log_level_names,udp_log_level)) == -1 ) {
                 enb_properties.properties[enb_properties_index]->udp_log_level = LOG_INFO;
               }
@@ -2385,7 +2409,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->udp_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_VERBOSITY, (const char **)&udp_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_UDP_LOG_VERBOSITY, (const char **)&udp_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->udp_log_verbosity = map_str_to_int(log_verbosity_names,udp_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
               }
@@ -2395,7 +2419,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->udp_log_verbosity = LOG_MED;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_LEVEL, (const char **)&osa_log_level)) {
               if ((enb_properties.properties[enb_properties_index]->osa_log_level = map_str_to_int(log_level_names,osa_log_level)) == -1 ) {
                 enb_properties.properties[enb_properties_index]->osa_log_level = LOG_INFO;
               }
@@ -2405,7 +2429,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
               enb_properties.properties[enb_properties_index]->osa_log_level = LOG_INFO;
             }
 
-            if(config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) {
+            if (config_setting_lookup_string(subsetting, ENB_CONFIG_STRING_OSA_LOG_VERBOSITY, (const char **)&osa_log_verbosity)) {
               if ((enb_properties.properties[enb_properties_index]->osa_log_verbosity = map_str_to_int(log_verbosity_names,osa_log_verbosity)) == -1) {
                 enb_properties.properties[enb_properties_index]->osa_log_verbosity = LOG_MED;
               }
diff --git a/openair2/ENB_APP/enb_config.h b/openair2/ENB_APP/enb_config.h
index 269fc32c2992a4a09ae93f4e2d6bcd15bc5a18a9..0fb82dcde3d7f51469517add9e8e09cc8644020d 100755
--- a/openair2/ENB_APP/enb_config.h
+++ b/openair2/ENB_APP/enb_config.h
@@ -193,6 +193,9 @@ typedef struct Enb_properties_s {
   /* List of MME to connect to */
   mme_ip_address_t    mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
 
+  int                 sctp_in_streams;
+  int                 sctp_out_streams;
+
   char               *enb_interface_name_for_S1U;
   in_addr_t           enb_ipv4_address_for_S1U;
   tcp_udp_port_t      enb_port_for_S1U;
diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c
index ca6cac25a5297ac646ce6d62a9e5211aa84ee16c..082f8bad44e639ebd083aeb5ad22a43d3793c2f3 100644
--- a/openair2/RRC/LITE/rrc_eNB.c
+++ b/openair2/RRC/LITE/rrc_eNB.c
@@ -745,6 +745,7 @@ rrc_eNB_free_mem_UE_context(
 
 //-----------------------------------------------------------------------------
 // called by MAC layer only
+// should be called when UE is lost by eNB
 void
 rrc_eNB_free_UE(
   const module_id_t enb_mod_idP,
diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c
index 76dbd44bbadb0dd22bfd2b3b635f88db7d99e9e3..074af029fc4118a97cdc022570d5046e9d3e1113 100644
--- a/openair2/RRC/LITE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c
@@ -93,21 +93,18 @@ rrc_eNB_S1AP_get_ue_ids(
 )
 //------------------------------------------------------------------------------
 {
-	  rrc_ue_s1ap_ids_t *result = NULL;
-	  rrc_ue_s1ap_ids_t *result2 = NULL;
+  rrc_ue_s1ap_ids_t *result = NULL;
+  rrc_ue_s1ap_ids_t *result2 = NULL;
   hashtable_rc_t     h_rc;
 
   // we assume that a rrc_ue_s1ap_ids_s is initially inserted in initial_id2_s1ap_ids
   if (eNB_ue_s1ap_id > 0) {
 	h_rc = hashtable_get(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&result);
-    if  (h_rc == HASH_TABLE_OK) {
-	  return result;
-    }
   }
   if (ue_initial_id != UE_INITIAL_ID_INVALID) {
     h_rc = hashtable_get(rrc_instance_pP->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&result);
 	if  (h_rc == HASH_TABLE_OK) {
-	  if (eNB_ue_s1ap_id != 0) {
+	  if (eNB_ue_s1ap_id > 0) {
 	    h_rc = hashtable_get(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&result2);
 	    if  (h_rc != HASH_TABLE_OK) {
 		  result2 = malloc(sizeof(*result2));
@@ -118,16 +115,16 @@ rrc_eNB_S1AP_get_ue_ids(
             h_rc = hashtable_insert(rrc_instance_pP->s1ap_id2_s1ap_ids,
 		    		               (hash_key_t)eNB_ue_s1ap_id,
 		    		               result2);
-		    LOG_E(S1AP, "[eNB %u] Error while hashtable_insert in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %u\n",
+            if (h_rc != HASH_TABLE_OK) {
+              LOG_E(S1AP, "[eNB %u] Error while hashtable_insert in s1ap_id2_s1ap_ids eNB_ue_s1ap_id %u\n",
 		    		  rrc_instance_pP - eNB_rrc_inst, eNB_ue_s1ap_id);
+            }
 		  }
 		}
 	  }
-
-	  return result;
 	}
   }
-  return NULL;
+  return result;
 }
 //------------------------------------------------------------------------------
 void
@@ -154,6 +151,8 @@ rrc_eNB_S1AP_remove_ue_ids(
 	h_rc = hashtable_remove(rrc_instance_pP->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id);
 	if (h_rc != HASH_TABLE_OK) {
 	  LOG_W(RRC, "S1AP Did not find entry in hashtable s1ap_id2_s1ap_ids for eNB_ue_s1ap_id %u\n", eNB_ue_s1ap_id);
+	} else {
+	  LOG_W(RRC, "S1AP removed entry in hashtable s1ap_id2_s1ap_ids for eNB_ue_s1ap_id %u\n", eNB_ue_s1ap_id);
 	}
   }
 
@@ -161,6 +160,8 @@ rrc_eNB_S1AP_remove_ue_ids(
     h_rc = hashtable_remove(rrc_instance_pP->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id);
 	if (h_rc != HASH_TABLE_OK) {
 	  LOG_W(RRC, "S1AP Did not find entry in hashtable initial_id2_s1ap_ids for ue_initial_id %u\n", ue_initial_id);
+	} else {
+	  LOG_W(RRC, "S1AP removed entry in hashtable initial_id2_s1ap_ids for ue_initial_id %u\n", ue_initial_id);
 	}
   }
 }
@@ -632,9 +633,10 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ(
     h_rc = hashtable_insert(eNB_rrc_inst[ctxt_pP->module_id].initial_id2_s1ap_ids,
     		               (hash_key_t)ue_context_pP->ue_context.ue_initial_id,
     		               rrc_ue_s1ap_ids_p);
-
+    if (h_rc != HASH_TABLE_OK) {
       LOG_E(S1AP, "[eNB %d] Error while hashtable_insert in initial_id2_s1ap_ids ue_initial_id %u\n",
     		  ctxt_pP->module_id, ue_context_pP->ue_context.ue_initial_id);
+    }
 
     /* Assume that cause is coded in the same way in RRC and S1ap, just check that the value is in S1ap range */
     AssertFatal(ue_context_pP->ue_context.establishment_cause < RRC_CAUSE_LAST,
@@ -1094,9 +1096,12 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
 {
   uint32_t eNB_ue_s1ap_id;
   protocol_ctxt_t              ctxt;
-  struct rrc_eNB_ue_context_s* ue_context_p = NULL;
+  struct rrc_eNB_ue_context_s *ue_context_p = NULL;
+  struct rrc_ue_s1ap_ids_s    *rrc_ue_s1ap_ids = NULL;
 
   eNB_ue_s1ap_id = S1AP_UE_CONTEXT_RELEASE_COMMAND(msg_p).eNB_ue_s1ap_id;
+
+
   ue_context_p   = rrc_eNB_get_ue_context_from_s1ap_ids(instance, UE_INITIAL_ID_INVALID, eNB_ue_s1ap_id);
 
   if (ue_context_p == NULL) {
@@ -1123,6 +1128,17 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
     msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
     S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
     itti_send_msg_to_task(TASK_S1AP, instance, msg_complete_p);
+
+    rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(
+    		&eNB_rrc_inst[instance],
+    		UE_INITIAL_ID_INVALID,
+    		eNB_ue_s1ap_id);
+
+    if (NULL != rrc_ue_s1ap_ids) {
+      rrc_eNB_S1AP_remove_ue_ids(
+    		  &eNB_rrc_inst[instance],
+    		  rrc_ue_s1ap_ids);
+    }
     return (-1);
   } else {
     PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, ENB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0);
@@ -1176,6 +1192,17 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch
       msg_complete_p = itti_alloc_new_message(TASK_RRC_ENB, S1AP_UE_CONTEXT_RELEASE_COMPLETE);
       S1AP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).eNB_ue_s1ap_id = eNB_ue_s1ap_id;
       itti_send_msg_to_task(TASK_S1AP, instance, msg_complete_p);
+
+      rrc_ue_s1ap_ids = rrc_eNB_S1AP_get_ue_ids(
+      		&eNB_rrc_inst[instance],
+      		UE_INITIAL_ID_INVALID,
+      		eNB_ue_s1ap_id);
+
+      if (NULL != rrc_ue_s1ap_ids) {
+        rrc_eNB_S1AP_remove_ue_ids(
+      		  &eNB_rrc_inst[instance],
+      		  rrc_ue_s1ap_ids);
+      }
     }
 
     return (0);
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
index 8d975cf087fee3eaaa2a0d9c8c3607a9a816b4b9..f91eddd29bd7122114d98aa73583a10b5a0db407 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
@@ -123,6 +123,16 @@ eNBs =
         # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
         max_retx_threshold       =  4;
     }
+    
+    # ------- SCTP definitions
+    SCTP :
+    {
+        # Number of streams to use in input/output
+        SCTP_INSTREAMS  = 2;
+        SCTP_OUTSTREAMS = 2;
+    };
+    
+        
     ////////// MME parameters:
     mme_ip_address      = ( { ipv4       = "192.188.2.2";
                               ipv6       = "192:168:30::17";