Index: /pjproject/trunk/pjmedia/include/pjmedia/config.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 650)
+++ /pjproject/trunk/pjmedia/include/pjmedia/config.h	(revision 651)
@@ -58,5 +58,6 @@
 #ifndef PJMEDIA_SOUND_IMPLEMENTATION
 #  if defined(PJ_WIN32) && PJ_WIN32!=0
-#   define PJMEDIA_SOUND_IMPLEMENTATION	    PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+/*#   define PJMEDIA_SOUND_IMPLEMENTATION   PJMEDIA_SOUND_WIN32_DIRECT_SOUND*/
+#   define PJMEDIA_SOUND_IMPLEMENTATION	    PJMEDIA_SOUND_PORTAUDIO_SOUND
 #  else
 #   define PJMEDIA_SOUND_IMPLEMENTATION	    PJMEDIA_SOUND_PORTAUDIO_SOUND
Index: /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
===================================================================
--- /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 650)
+++ /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 651)
@@ -918,11 +918,21 @@
     }
     /* Media clock rate. */
-    if (config->media_cfg.clock_rate) {
+    if (config->media_cfg.clock_rate != PJSUA_DEFAULT_CLOCK_RATE) {
 	pj_ansi_sprintf(line, "--clock-rate %d\n",
 			config->media_cfg.clock_rate);
 	pj_strcat2(&cfg, line);
-    }
-    if (config->media_cfg.quality != 10) {
+    } else {
+	pj_ansi_sprintf(line, "#using default --clock-rate %d\n",
+			config->media_cfg.clock_rate);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* quality */
+    if (config->media_cfg.quality != PJSUA_DEFAULT_CODEC_QUALITY) {
 	pj_ansi_sprintf(line, "--quality %d\n",
+			config->media_cfg.quality);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --quality %d\n",
 			config->media_cfg.quality);
 	pj_strcat2(&cfg, line);
@@ -936,4 +946,47 @@
 	pj_strcat2(&cfg, line);
     }
+
+    /* no-vad */
+    if (config->media_cfg.no_vad) {
+	pj_strcat2(&cfg, "--no-vad\n");
+    }
+
+    /* ec-tail */
+    if (config->media_cfg.ec_tail_len != PJSUA_DEFAULT_EC_TAIL_LEN) {
+	pj_ansi_sprintf(line, "--ec-tail %d\n",
+			config->media_cfg.ec_tail_len);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --ec-tail %d\n",
+			config->media_cfg.ec_tail_len);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* ilbc-mode */
+    if (config->media_cfg.ilbc_mode != PJSUA_DEFAULT_ILBC_MODE) {
+	pj_ansi_sprintf(line, "--ilbc-mode %d\n",
+			config->media_cfg.ilbc_mode);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --ilbc-mode %d\n",
+			config->media_cfg.ilbc_mode);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* RTP drop */
+    if (config->media_cfg.tx_drop_pct) {
+	pj_ansi_sprintf(line, "--tx-drop-pct %d\n",
+			config->media_cfg.tx_drop_pct);
+	pj_strcat2(&cfg, line);
+
+    }
+    if (config->media_cfg.rx_drop_pct) {
+	pj_ansi_sprintf(line, "--rx-drop-pct %d\n",
+			config->media_cfg.rx_drop_pct);
+	pj_strcat2(&cfg, line);
+
+    }
+
 
     /* Start RTP port. */
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 650)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 651)
@@ -2040,4 +2040,8 @@
 #endif
 
+#define PJSUA_DEFAULT_CLOCK_RATE    16000
+#define PJSUA_DEFAULT_CODEC_QUALITY 5
+#define PJSUA_DEFAULT_ILBC_MODE	    20
+#define PJSUA_DEFAULT_EC_TAIL_LEN   256
 
 
@@ -2088,5 +2092,5 @@
      * number.
      *
-     * Default: 6.
+     * Default: 5 (PJSUA_DEFAULT_CODEC_QUALITY).
      */
     unsigned		quality;
@@ -2109,5 +2113,5 @@
      * iLBC mode (20 or 30).
      *
-     * Default: 20
+     * Default: 20 (PJSUA_DEFAULT_ILBC_MODE)
      */
     unsigned		ilbc_mode;
@@ -2132,5 +2136,5 @@
      * Echo canceller tail length, in miliseconds.
      *
-     * Default: 0 (disabled, for now)
+     * Default: 128 (PJSUA_DEFAULT_EC_TAIL_LEN)
      */
     unsigned		ec_tail_len;
@@ -2147,11 +2151,11 @@
     pj_bzero(cfg, sizeof(*cfg));
 
-    cfg->clock_rate = 16000;
+    cfg->clock_rate = PJSUA_DEFAULT_CLOCK_RATE;
     cfg->max_media_ports = 32;
     cfg->has_ioqueue = PJ_TRUE;
     cfg->thread_cnt = 1;
-    cfg->quality = 6;
-    cfg->ilbc_mode = 20;
-    cfg->ec_tail_len = 500;
+    cfg->quality = PJSUA_DEFAULT_CODEC_QUALITY;
+    cfg->ilbc_mode = PJSUA_DEFAULT_ILBC_MODE;
+    cfg->ec_tail_len = PJSUA_DEFAULT_EC_TAIL_LEN;
 }
 
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 650)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 651)
@@ -796,5 +796,5 @@
 
     if (!call->inv) {
-	PJ_LOG(3,(THIS_FILE,"Call has been disconnected"));
+	PJ_LOG(3,(THIS_FILE,"Invalid call or call has been disconnected"));
 	PJSUA_UNLOCK();
 	return PJ_EINVAL;
