Index: pjproject/trunk/pjsip-apps/src/test-pjsua/mod_call.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/mod_call.py	(revision 2070)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/mod_call.py	(revision 2071)
@@ -12,4 +12,5 @@
 def check_media(ua1, ua2):
 	ua1.send("#")
+	ua1.expect("#")
 	ua1.send("1122")
 	ua2.expect(const.RX_DTMF + "1")
@@ -71,5 +72,6 @@
 	# Hold call by caller
 	caller.send("H")
-	#caller.sync_stdout()
+	caller.expect("INVITE sip:")
+	callee.expect("INVITE sip:")
 	caller.expect(const.MEDIA_HOLD)
 	callee.expect(const.MEDIA_HOLD)
@@ -82,5 +84,37 @@
 	time.sleep(0.5)
 	caller.send("v")
-	#caller.sync_stdout()
+	caller.expect("INVITE sip:")
+	callee.expect("INVITE sip:")
+	caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
+	callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
+
+	# Synchronize stdout
+	caller.sync_stdout()
+	callee.sync_stdout()
+
+	# Test that media is okay
+	check_media(caller, callee)
+	check_media(callee, caller)
+
+	# Synchronize stdout
+	caller.sync_stdout()
+	callee.sync_stdout()
+
+	# Hold call by callee
+	callee.send("H")
+	callee.expect("INVITE sip:")
+	caller.expect("INVITE sip:")
+	caller.expect(const.MEDIA_HOLD)
+	callee.expect(const.MEDIA_HOLD)
+	
+	# Synchronize stdout
+	caller.sync_stdout()
+	callee.sync_stdout()
+
+	# Release hold
+	time.sleep(0.1)
+	callee.send("v")
+	callee.expect("INVITE sip:")
+	caller.expect("INVITE sip:")
 	callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
 	caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
@@ -91,33 +125,6 @@
 
 	# Test that media is okay
-	check_media(caller, callee)
-	check_media(callee, caller)
-
-	# Synchronize stdout
-	caller.sync_stdout()
-	callee.sync_stdout()
-
-	# Hold call by callee
-	callee.send("H")
-	#callee.sync_stdout()
-	caller.expect(const.MEDIA_HOLD)
-	callee.expect(const.MEDIA_HOLD)
-	
-	# Synchronize stdout
-	caller.sync_stdout()
-	callee.sync_stdout()
-
-	# Release hold
-	time.sleep(0.5)
-	callee.send("v")
-	#callee.sync_stdout()
-	caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
-	callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
-
-	# Synchronize stdout
-	caller.sync_stdout()
-	callee.sync_stdout()
-
-	# Test that media is okay
+	# Wait for some time for ICE negotiation
+	time.sleep(0.6)
 	check_media(caller, callee)
 	check_media(callee, caller)
@@ -144,5 +151,6 @@
 	# UPDATE (by callee)
 	callee.send("U")
-	#callee.sync_stdout()
+	callee.expect("UPDATE sip:")
+	caller.expect("UPDATE sip:")
 	caller.expect(const.MEDIA_ACTIVE, title="waiting for media active with UPDATE")
 	callee.expect(const.MEDIA_ACTIVE, title="waiting for media active with UPDATE")
@@ -165,11 +173,15 @@
 	# In caller we only enable PCMU, in callee we only enable PCMA
 	caller.send("Cp")
+	caller.expect("Enter codec")
 	caller.send("* 0")
 	caller.send("Cp")
+	caller.expect("Enter codec")
 	caller.send("pcmu 120")
 	
 	callee.send("Cp")
+	callee.expect("Enter codec")
 	callee.send("* 0")
 	callee.send("Cp")
+	callee.expect("Enter codec")
 	callee.send("pcma 120")
 
@@ -188,4 +200,6 @@
 	# Test when UPDATE fails (by caller)
 	caller.send("U")
+	caller.expect("UPDATE sip:")
+	callee.expect("UPDATE sip:")
 	callee.expect("SIP/2.0 488")
 	caller.expect("SIP/2.0 488")
Index: pjproject/trunk/pjsip-apps/src/test-pjsua/runall.py
===================================================================
--- pjproject/trunk/pjsip-apps/src/test-pjsua/runall.py	(revision 2070)
+++ pjproject/trunk/pjsip-apps/src/test-pjsua/runall.py	(revision 2071)
@@ -17,4 +17,5 @@
 		   "scripts-call/301_ice_public_a.py",			# Unreliable, proxy returns 408 sometimes
 		   "scripts-call/301_ice_public_b.py",			# Doesn't work because OpenSER modifies SDP
+		   "scripts-pres/200_publish.py",			# Ok from cmdline, error from runall.py
 		   "scripts-media-playrec/100_resample_lf_8_11.py",	# related to clock-rate 11 kHz problem
 		   "scripts-media-playrec/100_resample_lf_8_22.py",	# related to clock-rate 22 kHz problem
