Index: conf/nas.a.rt.testbed.aaa/freeDiameter/CMakeFlags
===================================================================
--- conf/nas.a.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 5)
+++ conf/nas.a.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 14)
@@ -1,1 +1,8 @@
--DBUILD_TEST_APP:BOOL=ON -DBUILD_TEST_RT_ANY:BOOL=ON -DBUILD_DBG_MONITOR:BOOL=ON -DBUILD_DBG_RT:BOOL=ON -DBUILD_TESTING:BOOL=OFF -DCMAKE_BUILD_TYPE:STRING=Debug -DDEFAULT_CONF_PATH:PATH=/root/conf/freeDiameter
+-DBUILD_TEST_APP:BOOL=ON 
+-DBUILD_TEST_RT_ANY:BOOL=ON 
+-DBUILD_DBG_MONITOR:BOOL=ON 
+-DBUILD_DBG_INTERACTIVE:BOOL=ON 
+-DBUILD_DBG_RT:BOOL=ON 
+-DBUILD_TESTING:BOOL=OFF 
+-DCMAKE_BUILD_TYPE:STRING=Debug 
+-DDEFAULT_CONF_PATH:PATH=/root/conf/freeDiameter
Index: conf/nas.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf
===================================================================
--- conf/nas.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 0)
+++ conf/nas.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 14)
@@ -49,11 +49,13 @@
 # -------- Test configuration ---------
 
-LoadExtension = "/root/freeDiameter/extensions/dbg_monitor.fdx";
+# LoadExtension = "/root/freeDiameter/extensions/dbg_monitor.fdx";
 # LoadExtension = "/root/freeDiameter/extensions/dbg_rt.fdx";
 # LoadExtension = "/root/freeDiameter/extensions/test_rt_any.fdx";
-LoadExtension = "/root/freeDiameter/extensions/test_app.fdx"
-		: "/root/conf/freeDiameter/test_app.conf";
+#LoadExtension = "/root/freeDiameter/extensions/test_app.fdx"
+#		: "/root/conf/freeDiameter/test_app.conf";
 LoadExtension = "/root/freeDiameter/extensions/rt_default.fdx"
 		: "/root/conf/freeDiameter/rtd.conf";
+LoadExtension = "/root/freeDiameter/extensions/dbg_interactive.fdx";
+		
 
 # ConnectPeer = "serv.simple.testbed.aaa" ;
Index: conf/nas.a.rt.testbed.aaa/freeDiameter/python_.py
===================================================================
--- conf/nas.a.rt.testbed.aaa/freeDiameter/python_.py	(revision 14)
+++ conf/nas.a.rt.testbed.aaa/freeDiameter/python_.py	(revision 14)
@@ -0,0 +1,66 @@
+gdict = cvar.fd_g_config.cnf_dict
+d_si = gdict.search ( DICT_AVP, AVP_BY_NAME, "Session-Id" )
+d_oh  = gdict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Host" )
+d_or  = gdict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Realm" )
+d_dh  = gdict.search ( DICT_AVP, AVP_BY_NAME, "Destination-Host" )
+d_dr  = gdict.search ( DICT_AVP, AVP_BY_NAME, "Destination-Realm" )
+d_rc  = gdict.search ( DICT_AVP, AVP_BY_NAME, "Result-Code" )
+d_vnd = gdict.new_obj(DICT_VENDOR, 	dict_vendor_data(999999, 	"app_test_py vendor") )
+d_app = gdict.new_obj(DICT_APPLICATION, dict_application_data(0xffffff, "app_test_py appli"), d_vnd)
+d_req = gdict.new_obj(DICT_COMMAND, 	dict_cmd_data(0xfffffe, "Test_py-Request", 1), d_app)
+d_ans = gdict.new_obj(DICT_COMMAND, 	dict_cmd_data(0xfffffe, "Test_py-Answer",  0), d_app)
+d_avp = gdict.new_obj(DICT_AVP, 	dict_avp_data(0xffffff, "app_test_py avp", AVP_TYPE_INTEGER32, 999999 ))
+gdict.new_obj(DICT_RULE, dict_rule_data(d_si, RULE_FIXED_HEAD, 1, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_si, RULE_FIXED_HEAD, 1, 1), d_ans)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_avp, RULE_REQUIRED, 1, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_avp, RULE_REQUIRED, 1, 1), d_ans)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_oh, RULE_REQUIRED, 1, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_oh, RULE_REQUIRED, 1, 1), d_ans)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_or, RULE_REQUIRED, 1, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_or, RULE_REQUIRED, 1, 1), d_ans)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_dr, RULE_REQUIRED, 1, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_dh, RULE_OPTIONAL, 0, 1), d_req)
+gdict.new_obj(DICT_RULE, dict_rule_data(d_rc, RULE_REQUIRED, 1, 1), d_ans)
+
+def receive_answer(ans, testval):
+   if (ans.is_request()):
+     print "Request was expired before receiving answer..."
+     return None
+   try:
+     tval = ans.search(d_avp).header().avp_value.u32
+   except:
+     print "Error in receive_answer: no Test-AVP included"
+     tval = 0
+   try:
+     print "Py RECV %x (expected: %x) Status: %d From: '%s'" % (tval, testval, ans.search(d_rc).header().avp_value.u32, ans.search(d_oh).header().avp_value.os.as_str())
+   except:
+     print "Error in receive_answer: Result-Code or Origin-Host are missing"
+   del ans
+   return None
+
+import random
+
+def send_query(destrealm="b.rt.testbed.aaa"):
+   qry = msg(d_req)
+   sess = session()
+   tv = random.randint(1, 1<<32)
+   # Session-Id
+   a = avp(d_si, AVPFL_SET_BLANK_VALUE)
+   a.header().avp_value.os = sess.getsid()
+   qry.add_child(a)
+   # Destination-Realm
+   a = avp(d_dr, AVPFL_SET_BLANK_VALUE)
+   a.header().avp_value.os = destrealm
+   qry.add_child(a)
+   # Origin-Host, Origin-Realm
+   qry.add_origin()
+   # Test-AVP
+   a = avp(d_avp, AVPFL_SET_BLANK_VALUE)
+   a.header().avp_value.u32 = tv
+   qry.add_child(a)
+   print "Py SEND %x to '%s'" % (tv, destrealm)
+   qry.send(receive_answer, tv, 1)
+
+send_query()
+
+
Index: conf/proxy.a.rt.testbed.aaa/freeDiameter/CMakeFlags
===================================================================
--- conf/proxy.a.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 5)
+++ conf/proxy.a.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 14)
@@ -2,4 +2,5 @@
 -DBUILD_DBG_MONITOR:BOOL=ON \
 -DBUILD_DBG_RT:BOOL=ON \
+-DBUILD_TEST_NETEMUL:BOOL=ON \
 -DBUILD_TESTING:BOOL=OFF \
 -DCMAKE_BUILD_TYPE:STRING=Debug \
Index: conf/proxy.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf
===================================================================
--- conf/proxy.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 12)
+++ conf/proxy.a.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 14)
@@ -56,4 +56,7 @@
 # LoadExtension = "/root/freeDiameter/extensions/test_rt_any.fdx";
 
+LoadExtension = "/root/freeDiameter/extensions/test_netemul.fdx"
+		: "/root/conf/freeDiameter/netemul.conf";
+		
 ConnectPeer = "proxy.b.rt.testbed.aaa" ;
 
Index: conf/proxy.a.rt.testbed.aaa/freeDiameter/netemul.conf
===================================================================
--- conf/proxy.a.rt.testbed.aaa/freeDiameter/netemul.conf	(revision 14)
+++ conf/proxy.a.rt.testbed.aaa/freeDiameter/netemul.conf	(revision 14)
@@ -0,0 +1,7 @@
+#  latency_average  = 500 ms;
+#  latency_deviation = 20 % ;
+#  dupl_proba = 1 / 100 ;
+
+latency_average  = 2 s;
+latency_deviation = 50 % ;
+dupl_proba = 1 / 5 ;
Index: conf/proxy.b.rt.testbed.aaa/freeDiameter/CMakeFlags
===================================================================
--- conf/proxy.b.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 5)
+++ conf/proxy.b.rt.testbed.aaa/freeDiameter/CMakeFlags	(revision 14)
@@ -3,4 +3,5 @@
 -DBUILD_DICT_EAP:BOOL=OFF \
 -DBUILD_DICT_NASREQ:BOOL=OFF \
+-DBUILD_TEST_NETEMUL:BOOL=ON \
 -DBUILD_TESTING:BOOL=OFF \
 -DCMAKE_BUILD_TYPE:STRING=Debug \
Index: conf/proxy.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf
===================================================================
--- conf/proxy.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 12)
+++ conf/proxy.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 14)
@@ -56,4 +56,7 @@
 # LoadExtension = "/root/freeDiameter/extensions/test_rt_any.fdx";
 
+LoadExtension = "/root/freeDiameter/extensions/test_netemul.fdx"
+		: "/root/conf/freeDiameter/netemul.conf";
+		
 ConnectPeer = "proxy.a.rt.testbed.aaa" ;
 Realm = "a.rt.testbed.aaa" ;
Index: conf/proxy.b.rt.testbed.aaa/freeDiameter/netemul.conf
===================================================================
--- conf/proxy.b.rt.testbed.aaa/freeDiameter/netemul.conf	(revision 14)
+++ conf/proxy.b.rt.testbed.aaa/freeDiameter/netemul.conf	(revision 14)
@@ -0,0 +1,7 @@
+#  latency_average  = 500 ms;
+#  latency_deviation = 20 % ;
+#  dupl_proba = 1 / 100 ;
+
+latency_average  = 2 s;
+latency_deviation = 50 % ;
+dupl_proba = 1 / 5 ;
Index: conf/serv.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf
===================================================================
--- conf/serv.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 0)
+++ conf/serv.b.rt.testbed.aaa/freeDiameter/freeDiameter.conf	(revision 14)
@@ -49,5 +49,5 @@
 # -------- Test configuration ---------
 
-LoadExtension = "/root/freeDiameter/extensions/dbg_monitor.fdx";
+#LoadExtension = "/root/freeDiameter/extensions/dbg_monitor.fdx";
 # LoadExtension = "/root/freeDiameter/extensions/dbg_rt.fdx";
 # LoadExtension = "/root/freeDiameter/extensions/test_rt_any.fdx";
Index: mrb/iop_testbed.sh
===================================================================
--- mrb/iop_testbed.sh	(revision 13)
+++ mrb/iop_testbed.sh	(revision 14)
@@ -20,4 +20,7 @@
 	./vm_start.sh "iop-fdrelay.iop.testbed.aaa" &
 	sleep 3
+	./vm_start.sh "iop-crcumcli.iop.testbed.aaa" &
+	sleep 3
+	./vm_start.sh "iop-crcumsrv.iop.testbed.aaa" &
 	#./vm_start.sh "eap-supauth2.eap.testbed.aaa" &
 	#sleep 3
@@ -31,4 +34,6 @@
 	./vm_pause.sh "iop-iopmgr.testbed.aaa" &
 	./vm_pause.sh "iop-fdrelay.iop.testbed.aaa" &
+	./vm_pause.sh "iop-crcumcli.iop.testbed.aaa" &
+	./vm_pause.sh "iop-crcumsrv.iop.testbed.aaa" &
 	wait
 	;;
@@ -38,4 +43,6 @@
 	./vm_stop.sh "iop-iopmgr.testbed.aaa" &
 	./vm_stop.sh "iop-fdrelay.iop.testbed.aaa" &
+	./vm_stop.sh "iop-crcumcli.iop.testbed.aaa" &
+	./vm_stop.sh "iop-crcumsrv.iop.testbed.aaa" &
 	wait
 	;;
Index: scripts/circum-install.sh
===================================================================
--- scripts/circum-install.sh	(revision 13)
+++ scripts/circum-install.sh	(revision 14)
@@ -4,5 +4,5 @@
 aptitude install -y autoconf automake libtool pkg-config build-essential \
   git-core libhx-dev libpcre3-dev libxml2-dev libssl-dev \
-  apache2-dev libpam-dev
+  apache2-dev libpam-dev gdb
 
 # Install the link to the configuration
@@ -17,5 +17,5 @@
 cd circum
 ./autogen.sh
-./configure --prefix=/root/circum-rt
+./configure --prefix=/root/circum-rt CFLAGS="-O0 -ggdb3" CXXFLAGS="-O0 -ggdb3"
 make && make install
 
Index: scripts/freeDiameter-install.sh
===================================================================
--- scripts/freeDiameter-install.sh	(revision 0)
+++ scripts/freeDiameter-install.sh	(revision 14)
@@ -2,5 +2,5 @@
 
 # Install dependencies for freeDiameter
-aptitude install flex bison libsctp1 libsctp-dev libgcrypt-dev libgcrypt11-dbg libgnutls26 libgnutls26-dbg libgnutls-dev mercurial cmake gdb
+aptitude install flex bison libsctp1 libsctp-dev libgcrypt-dev libgcrypt11-dbg libgnutls26 libgnutls26-dbg libgnutls-dev mercurial cmake gdb python-dev swig
 
 # Install the link to the configuration
