Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/config_site.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/config_site.py	(revision 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/config_site.py	(revision 2052)
@@ -0,0 +1,4 @@
+# $Id$
+
+# Specify if host has sound device, or test should be performed using sound device
+HAS_SND_DEV = 1
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_cfg.py	(revision 2052)
@@ -1,4 +1,5 @@
 # $Id$
 import random
+from config_site import *
 
 DEFAULT_ECHO = True
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_const.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_const.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/inc_const.py	(revision 2052)
@@ -43,6 +43,6 @@
 
 # Filename to play / record
-MEDIA_PLAY_FILE = "--play-file (\S+)"
-MEDIA_REC_FILE = "--rec-file (\S+)"
+MEDIA_PLAY_FILE = "--play-file\s+(\S+)"
+MEDIA_REC_FILE = "--rec-file\s+(\S+)"
 
 ##########################
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_media_playrec.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_media_playrec.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_media_playrec.py	(revision 2052)
@@ -35,15 +35,9 @@
 	
 	# Get input file name
-	endpt.sync_stdout()
-	endpt.send("dc")
-	line = endpt.expect(const.MEDIA_PLAY_FILE)
-	ud.input_filename = re.compile(const.MEDIA_PLAY_FILE).match(line).group(1)
+	ud.input_filename = re.compile(const.MEDIA_PLAY_FILE).search(endpt.inst_param.arg).group(1)
 	endpt.trace("Input file = " + ud.input_filename)
 
 	# Get output file name
-	endpt.sync_stdout()
-	endpt.send("dc")
-	line = endpt.expect(const.MEDIA_REC_FILE)
-	ud.output_filename = re.compile(const.MEDIA_REC_FILE).match(line).group(1)
+	ud.output_filename = re.compile(const.MEDIA_REC_FILE).search(endpt.inst_param.arg).group(1)
 	endpt.trace("Output file = " + ud.output_filename)
 
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py	(revision 2052)
@@ -39,42 +39,25 @@
 # Test body function
 def test_func(t, user_data):
-	# module debugging purpose
-	#user_data.pesq_sample_rate_opt = "+16000"
-	#user_data.input_filename = "wavs/input.16.wav"
-	#user_data.output_filename = "wavs/tmp.16.wav"
-	#return
-
 	ua1 = t.process[0]
 	ua2 = t.process[1]
 
-	# Get conference clock rate of UA2 for PESQ sample rate option
-	ua2.send("cl")
-	clock_rate_line = ua2.expect("Port \#00\[\d+KHz")
-	if (clock_rate_line == None):
-		raise TestError("Failed getting")
-	clock_rate = re.match("Port \#00\[(\d+)KHz", clock_rate_line).group(1)
-	user_data.pesq_sample_rate_opt = "+" + clock_rate + "000"
-
 	# Get input file name
-	ua1.sync_stdout()
-	ua1.send("dc")
-	line = ua1.expect(const.MEDIA_PLAY_FILE)
-	user_data.input_filename = re.compile(const.MEDIA_PLAY_FILE).match(line).group(1)
+	user_data.input_filename = re.compile(const.MEDIA_PLAY_FILE).search(ua1.inst_param.arg).group(1)
 
 	# Get output file name
-	ua2.sync_stdout()
-	ua2.send("dc")
-	line = ua2.expect(const.MEDIA_REC_FILE)
-	user_data.output_filename = re.compile(const.MEDIA_REC_FILE).match(line).group(1)
+	user_data.output_filename = re.compile(const.MEDIA_REC_FILE).search(ua2.inst_param.arg).group(1)
 
 	# Find appropriate clock rate for the input file
-	clock_rate = re.compile(".+(\.\d+\.wav)$").match(user_data.output_filename)
-	if (clock_rate==None):
+	mo_clock_rate = re.compile("\.(\d+)\.wav").search(user_data.output_filename)
+	if (mo_clock_rate==None):
 		raise TestError("Cannot compare input & output, incorrect output filename format")
-	user_data.input_filename = re.sub("\.\d+\.wav$", clock_rate.group(1), user_data.input_filename)
+	clock_rate = mo_clock_rate.group(1)
+	user_data.input_filename = re.sub("\.\d+\.wav", "."+clock_rate+".wav", user_data.input_filename)
 
-	time.sleep(1)
-	ua1.sync_stdout()
-	ua2.sync_stdout()
+	if (clock_rate != "8") & (clock_rate != "16"):
+		raise TestError("PESQ only works on clock rate 8kHz or 16kHz, clock rate used = "+clock_rate+ "kHz")
+
+	# Get conference clock rate of UA2 for PESQ sample rate option
+	user_data.pesq_sample_rate_opt = "+" + clock_rate + "000"
 
 	# UA1 making call
@@ -82,16 +65,17 @@
 	ua1.send(t.inst_params[1].uri)
 	ua1.expect(const.STATE_CALLING)
-	
+	ua2.expect(const.STATE_CONFIRMED)
+
+	# Disconnect mic -> rec file to avoid echo recorded when using sound device
+	ua2.send("cd 0 1")
+
 	# Auto answer, auto play, auto hangup
 	# Just wait for call disconnected
-
-	if ua1.expect(const.STATE_CONFIRMED, False)==None:
-		raise TestError("Call failed")
-	ua2.expect(const.STATE_CONFIRMED)
-
-	while True:
+	# Assumed WAV input is no more than 30 secs
+	while 1:
 		line = ua2.proc.stdout.readline()
 		if line == "":
 			raise TestError(ua2.name + ": Premature EOF")
+
 		# Search for disconnected text
 		if re.search(const.STATE_DISCONNECTED, line) != None:
@@ -116,5 +100,5 @@
 	# Evaluate the similarity value
 	pesq_res = mo_pesq_out.group(1)
-	if (pesq_res >= PESQ_THRESHOLD):
+	if (float(pesq_res) >= PESQ_THRESHOLD):
 		endpt.trace("Success, PESQ result=" + pesq_res)
 	else:
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_16.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_16.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_16.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 16 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.16.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.11.wav --rec-file wavs/tmp.16.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_22.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_22.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_22.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 22 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 22050 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.22.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 22050 --play-file wavs/input.11.wav --rec-file wavs/tmp.22.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_32.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_32.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_32.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 32 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 32000 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.32.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 32000 --play-file wavs/input.11.wav --rec-file wavs/tmp.32.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_44.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_44.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_44.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 44 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 44100 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.44.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 44100 --play-file wavs/input.11.wav --rec-file wavs/tmp.44.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_48.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_48.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_48.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 48 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 48000 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.48.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 48000 --play-file wavs/input.11.wav --rec-file wavs/tmp.48.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_8.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_8.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_11_8.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 11 KHZ to 8 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 8000 --play-file wavs/input.11.wav --rec-file wavs/tmp_output.8.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 8000 --play-file wavs/input.11.wav --rec-file wavs/tmp.8.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_11.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_11.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_11.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 11 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 11025 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.11.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 11025 --play-file wavs/input.8.wav --rec-file wavs/tmp.11.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_16.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_16.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_16.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 16 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.16.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.8.wav --rec-file wavs/tmp.16.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_22.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_22.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_22.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 22 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 22050 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.22.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 22050 --play-file wavs/input.8.wav --rec-file wavs/tmp.22.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_32.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_32.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_32.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 32 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 32000 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.32.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 32000 --play-file wavs/input.8.wav --rec-file wavs/tmp.32.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_44.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_44.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_44.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 44 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 44100 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.44.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 44100 --play-file wavs/input.8.wav --rec-file wavs/tmp.44.wav")
 		]
 		)
Index: /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_48.py
===================================================================
--- /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_48.py	(revision 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-media-playrec/100_resample_lf_8_48.py	(revision 2052)
@@ -7,5 +7,5 @@
 		"Resample (large filter) 8 KHZ to 48 KHZ",
 		[
-			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 48000 --play-file wavs/input.8.wav --rec-file wavs/tmp_output.48.wav")
+			InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 48000 --play-file wavs/input.8.wav --rec-file wavs/tmp.48.wav")
 		]
 		)
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 2051)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py	(revision 2052)
@@ -3,10 +3,15 @@
 from inc_cfg import *
 
-# Simple call
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Call with default pjsua settings
 test_param = TestParam(
-		"PESQ",
+		"PESQ defaults pjsua settings",
 		[
-			InstanceParam("UA1", "--null-audio --max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup"),
-			InstanceParam("UA2", "--null-audio --max-calls=1 --rec-file  wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec")
+			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")
 		]
 		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
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 2052)
+++ /pjproject/trunk/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py	(revision 2052)
@@ -0,0 +1,18 @@
+# $Id$
+#
+from inc_cfg import *
+from config_site import *
+
+ADD_PARAM = ""
+
+if (HAS_SND_DEV == 0):
+	ADD_PARAM += "--null-audio"
+
+# Simple call
+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")
+		]
+		)
