Index: pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py	(revision 2057)
@@ -68,4 +68,6 @@
 	# params is list containing InstanceParams objects
 	inst_params = []
+	# flag if this tes should be skipped
+	skip = None
 	# list of Expect instances, to be filled at run-time by
         # the test program	
@@ -78,4 +80,5 @@
 			title, 		# Test title
 			inst_params, 	# InstanceParam's as list
+			skip=False,
 			func=None,
 			post_func=None,
@@ -83,4 +86,5 @@
 		self.title = title
 		self.inst_params = inst_params
+		self.skip = skip
 		self.test_func = func
 		self.post_func = post_func
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py	(revision 2057)
@@ -26,5 +26,5 @@
 # PESQ_THRESHOLD specifies the minimum acceptable PESQ MOS value, so test can be declared successful
 PESQ = "tools/pesq.exe"
-PESQ_THRESHOLD = 1.0
+PESQ_THRESHOLD = 3.0
 
 # UserData
@@ -39,4 +39,8 @@
 # Test body function
 def test_func(t, user_data):
+
+	if len(t.process) == 0:
+		return
+
 	ua1 = t.process[0]
 	ua2 = t.process[1]
@@ -94,5 +98,5 @@
 
 	# Parse ouput
-	mo_pesq_out = re.compile("Prediction\s+:\s+PESQ_MOS\s+=\s+(.+)\s*").search(pesq_out[0])
+	mo_pesq_out = re.compile("Prediction[^=]+=\s+([\d\.]+)\s*").search(pesq_out[0])
 	if (mo_pesq_out == None):
 		raise TestError("Failed to fetch PESQ result")
@@ -101,7 +105,7 @@
 	pesq_res = mo_pesq_out.group(1)
 	if (float(pesq_res) >= PESQ_THRESHOLD):
-		endpt.trace("Success, PESQ result=" + pesq_res)
+		endpt.trace("Success, PESQ result = " + pesq_res)
 	else:
-		endpt.trace("Failed, PESQ result=" + pesq_res)
+		endpt.trace("Failed, PESQ result = " + pesq_res)
 		raise TestError("WAV seems to be degraded badly")
 
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/run.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/run.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/run.py	(revision 2057)
@@ -144,4 +144,8 @@
 	sys.exit(1)
 
+if script.test.skip:
+	print "Test " + script.test.title + " is skipped"
+	sys.exit(0)
+
 if len(script.test.inst_params) == 0:
 	print "Error: test doesn't contain pjsua run descriptions"
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py	(revision 2057)
@@ -13,5 +13,5 @@
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --rec-file  wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-audio --max-calls=1 --rec-file  wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py	(revision 2057)
@@ -0,0 +1,17 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with default pjsua settings
+test_param = TestParam(
+		"PESQ defaults pjsua settings (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --rec-file  wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec")
+		]
+		)
+
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
+
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with PCMA codec
 test_param = TestParam(
 		"PESQ codec PCMA",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with PCMU codec
 test_param = TestParam(
 		"PESQ codec PCMU",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with G722 codec
 test_param = TestParam(
 		"PESQ codec G722",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with GSM codec
 test_param = TestParam(
 		"PESQ codec GSM",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with iLBC codec
 test_param = TestParam(
 		"PESQ codec iLBC",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with Speex/16000 codec
 test_param = TestParam(
 		"PESQ codec Speex WB",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py	(revision 2056)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py	(revision 2057)
@@ -2,5 +2,4 @@
 #
 from inc_cfg import *
-from config_site import *
 
 ADD_PARAM = ""
@@ -9,10 +8,10 @@
 	ADD_PARAM += "--null-audio"
 
-# Simple call
+# Call with Speex/8000 codec
 test_param = TestParam(
 		"PESQ codec Speex NB",
 		[
 			InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"),
-			InstanceParam("UA2", ADD_PARAM + " --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+			InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
 		]
 		)
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with PCMA codec
+test_param = TestParam(
+		"PESQ codec PCMA (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with PCMU codec
+test_param = TestParam(
+		"PESQ codec PCMU (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with G722 codec
+test_param = TestParam(
+		"PESQ codec G722 (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with GSM codec
+test_param = TestParam(
+		"PESQ codec GSM (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with iLBC codec
+test_param = TestParam(
+		"PESQ codec iLBC (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with Speex/16000 codec
+test_param = TestParam(
+		"PESQ codec Speex WB (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file  wavs/tmp.16.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py	(revision 2057)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py	(revision 2057)
@@ -0,0 +1,15 @@
+# $Id$
+#
+from inc_cfg import *
+
+# Call with Speex/8000 codec
+test_param = TestParam(
+		"PESQ codec Speex NB (RX side uses snd dev)",
+		[
+			InstanceParam("UA1", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"),
+			InstanceParam("UA2", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file  wavs/tmp.8.wav   --auto-answer 200 --auto-rec")
+		]
+		)
+
+if (HAS_SND_DEV == 0):
+	test_param.skip = True
