Index: /pjproject/trunk/pjmedia/include/pjmedia/aec.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/aec.h	(revision 647)
+++ /pjproject/trunk/pjmedia/include/pjmedia/aec.h	(revision 648)
@@ -52,5 +52,5 @@
  * @param clock_rate	    Media clock rate/sampling rate.
  * @param samples_per_frame Number of samples per frame.
- * @param tail_size	    Tail length, in number of samples.
+ * @param tail_ms	    Tail length, miliseconds.
  *
  * @return		    PJ_SUCCESS on success.
@@ -59,5 +59,5 @@
 					 unsigned clock_rate,
 					 unsigned samples_per_frame,
-					 unsigned tail_size,
+					 unsigned tail_ms,
 					 unsigned options,
 					 pjmedia_aec **p_aec );
Index: /pjproject/trunk/pjmedia/include/pjmedia/aec_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/aec_port.h	(revision 647)
+++ /pjproject/trunk/pjmedia/include/pjmedia/aec_port.h	(revision 648)
@@ -44,5 +44,5 @@
  * @param pool		Pool to allocate memory.
  * @param dn_port	Downstream port.
- * @param tail_length	Tail length in samples.
+ * @param tail_ms	Tail length in miliseconds.
  * @param p_port	Pointer to receive the port instance.
  *
@@ -51,5 +51,5 @@
 PJ_DECL(pj_status_t) pjmedia_aec_port_create( pj_pool_t *pool,
 					      pjmedia_port *dn_port,
-					      unsigned tail_length,
+					      unsigned tail_ms,
 					      pjmedia_port **p_port );
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/sound_port.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/sound_port.h	(revision 647)
+++ /pjproject/trunk/pjmedia/include/pjmedia/sound_port.h	(revision 648)
@@ -184,4 +184,38 @@
 
 /**
+ * Enable accoustic echo cancellation (AEC) to the specified sound. 
+ * The AEC can only be enabled for sound streams with full-duplex direction.
+ *
+ * And note, you should only change the AEC settings when the sound port
+ * is not connected to any downstream ports.
+ *
+ * @param snd_port	    The sound device port.
+ * @param pool		    Pool to re-create the AEC if necessary.
+ * @param tail_ms	    Maximum echo tail length to be supported, in
+ *			    miliseconds. If zero is specified, the AEC would
+ *			    be disabled.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_set_aec(pjmedia_snd_port *snd_port,
+					      pj_pool_t *pool,
+					      unsigned tail_ms);
+
+
+/**
+ * Get current AEC tail length, in miliseconds. The tail length will be zero
+ * if AEC is not enabled.
+ *
+ * @param snd_port	    The sound device port.
+ * @param p_length	    Pointer to receive the tail length.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_get_aec_tail(pjmedia_snd_port *snd_port,
+						   unsigned *p_length);
+
+
+
+/**
  * Connect a port to the sound device port. If the sound device port has a
  * sound recorder device, then this will start periodic function call to
Index: /pjproject/trunk/pjmedia/src/pjmedia/aec_port.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/aec_port.c	(revision 647)
+++ /pjproject/trunk/pjmedia/src/pjmedia/aec_port.c	(revision 648)
@@ -46,5 +46,5 @@
 PJ_DEF(pj_status_t) pjmedia_aec_port_create( pj_pool_t *pool,
 					     pjmedia_port *dn_port,
-					     unsigned tail_length,
+					     unsigned tail_ms,
 					     pjmedia_port **p_port )
 {
@@ -54,5 +54,5 @@
 
     PJ_ASSERT_RETURN(pool && dn_port && p_port, PJ_EINVAL);
-    PJ_ASSERT_RETURN(dn_port->info.bits_per_sample==16 && tail_length, 
+    PJ_ASSERT_RETURN(dn_port->info.bits_per_sample==16 && tail_ms, 
 		     PJ_EINVAL);
 
@@ -68,5 +68,5 @@
     status = pjmedia_aec_create(pool, dn_port->info.clock_rate, 
 				dn_port->info.samples_per_frame,
-				tail_length, 0, &aec->aec);
+				tail_ms, 0, &aec->aec);
     if (status != PJ_SUCCESS)
 	return status;
Index: /pjproject/trunk/pjmedia/src/pjmedia/aec_speex.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/aec_speex.c	(revision 647)
+++ /pjproject/trunk/pjmedia/src/pjmedia/aec_speex.c	(revision 648)
@@ -27,8 +27,9 @@
 #include <pj/pool.h>
 #include <speex/speex_echo.h>
+#include <speex/speex_preprocess.h>
 
 
 #define THIS_FILE   "aec_speex.c"
-#define BUF_COUNT   16
+#define BUF_COUNT   8
 
 
@@ -40,8 +41,11 @@
 struct pjmedia_aec
 {
-    SpeexEchoState  *state;
+    SpeexEchoState	 *state;
+    SpeexPreprocessState *preprocess;
+
     unsigned	     samples_per_frame;
     unsigned	     options;
     pj_int16_t	    *tmp_frame;
+    spx_int32_t	    *residue;
 
     pj_lock_t	    *lock;		/* To protect buffers, if required  */
@@ -60,5 +64,5 @@
 					unsigned clock_rate,
 					unsigned samples_per_frame,
-					unsigned tail_size,
+					unsigned tail_ms,
 					unsigned options,
 					pjmedia_aec **p_aec )
@@ -69,4 +73,6 @@
     pj_status_t status;
 
+    *p_aec = NULL;
+
     aec = pj_pool_zalloc(pool, sizeof(pjmedia_aec));
     PJ_ASSERT_RETURN(aec != NULL, PJ_ENOMEM);
@@ -79,6 +85,15 @@
     aec->options = options;
 
-    aec->state = speex_echo_state_init(samples_per_frame,tail_size);
+    aec->state = speex_echo_state_init(samples_per_frame,
+					clock_rate * tail_ms / 1000);
     if (aec->state == NULL) {
+	pj_lock_destroy(aec->lock);
+	return PJ_ENOMEM;
+    }
+
+    aec->preprocess = speex_preprocess_state_init(samples_per_frame, 
+						  clock_rate);
+    if (aec->preprocess == NULL) {
+	speex_echo_state_destroy(aec->state);
 	pj_lock_destroy(aec->lock);
 	return PJ_ENOMEM;
@@ -91,7 +106,11 @@
 
     /* Create temporary frame for echo cancellation */
-    aec->tmp_frame = pj_pool_zalloc(pool, sizeof(pj_int16_t) *
+    aec->tmp_frame = pj_pool_zalloc(pool, 2 * samples_per_frame);
+    PJ_ASSERT_RETURN(aec->tmp_frame != NULL, PJ_ENOMEM);
+
+    /* Create temporary frame to receive residue */
+    aec->residue = pj_pool_zalloc(pool, sizeof(spx_int32_t) * 
 					    samples_per_frame);
-    PJ_ASSERT_RETURN(aec->tmp_frame != NULL, PJ_ENOMEM);
+    PJ_ASSERT_RETURN(aec->residue != NULL, PJ_ENOMEM);
 
     /* Create internal playback buffers */
@@ -109,5 +128,5 @@
 			 clock_rate,
 			 samples_per_frame,
-			 tail_size * 1000 / clock_rate));
+			 tail_ms));
     return PJ_SUCCESS;
 
@@ -121,8 +140,16 @@
 {
     PJ_ASSERT_RETURN(aec && aec->state, PJ_EINVAL);
+
+    if (aec->lock)
+	pj_lock_acquire(aec->lock);
 
     if (aec->state) {
 	speex_echo_state_destroy(aec->state);
 	aec->state = NULL;
+    }
+
+    if (aec->preprocess) {
+	speex_preprocess_state_destroy(aec->preprocess);
+	aec->preprocess = NULL;
     }
 
@@ -225,6 +252,4 @@
 					     void *reserved )
 {
-    unsigned level0, level1;
-
     /* Sanity checks */
     PJ_ASSERT_RETURN(aec && rec_frm && play_frm && options==0 &&
@@ -234,18 +259,11 @@
     speex_echo_cancel(aec->state, (const spx_int16_t*)rec_frm, 
 		      (const spx_int16_t*)play_frm, 
-		      (spx_int16_t*)aec->tmp_frame, NULL);
-
-#if 0
-    level0 = pjmedia_calc_avg_signal(rec_frm, aec->samples_per_frame);
-    level1 = pjmedia_calc_avg_signal(aec->tmp_frame, aec->samples_per_frame);
-
-    if (level1 < level0) {
-	PJ_LOG(5,(THIS_FILE, "Input signal reduced from %d to %d",
-		  level0, level1));
-    }
-#else
-    PJ_UNUSED_ARG(level0);
-    PJ_UNUSED_ARG(level1);
-#endif
+		      (spx_int16_t*)aec->tmp_frame, 
+		      aec->residue);
+
+
+    /* Preprocess output */
+    speex_preprocess(aec->preprocess, (spx_int16_t*)aec->tmp_frame, 
+		     aec->residue);
 
     /* Copy temporary buffer back to original rec_frm */
Index: /pjproject/trunk/pjmedia/src/pjmedia/dsound.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/dsound.c	(revision 647)
+++ /pjproject/trunk/pjmedia/src/pjmedia/dsound.c	(revision 648)
@@ -453,5 +453,4 @@
     unsigned eventCount;
     unsigned bytes_per_frame;
-    int excess_rec = 0;
     pj_status_t status;
 
@@ -503,5 +502,4 @@
 	    
 	    struct dsound_stream *dsound_strm;
-	    int i;
 
 	    /*
@@ -513,28 +511,23 @@
 	    status = PJ_SUCCESS;
 
-	    for (i=0; i <= excess_rec; ++i) {
-		/* Get frame from application. */
-		status = (*strm->play_cb)(strm->user_data, 
-					  dsound_strm->timestamp.u32.lo,
-					  strm->buffer,
-					  bytes_per_frame);
-		if (status != PJ_SUCCESS)
-		    break;
-
-		/* Write to DirectSound buffer. */
-		AppWriteDataToBuffer( dsound_strm->ds.play.lpDsBuffer, 
-				      dsound_strm->dwBytePos,
-				      (LPBYTE)strm->buffer, 
+	    /* Get frame from application. */
+	    status = (*strm->play_cb)(strm->user_data, 
+				      dsound_strm->timestamp.u32.lo,
+				      strm->buffer,
 				      bytes_per_frame);
-
-		/* Increment position. */
-		dsound_strm->dwBytePos += bytes_per_frame;
-		if (dsound_strm->dwBytePos >= dsound_strm->dwDsBufferSize)
-		    dsound_strm->dwBytePos -= dsound_strm->dwDsBufferSize;
-		dsound_strm->timestamp.u64 += strm->samples_per_frame;
-	    }
-
 	    if (status != PJ_SUCCESS)
 		break;
+
+	    /* Write to DirectSound buffer. */
+	    AppWriteDataToBuffer( dsound_strm->ds.play.lpDsBuffer, 
+				  dsound_strm->dwBytePos,
+				  (LPBYTE)strm->buffer, 
+				  bytes_per_frame);
+
+	    /* Increment position. */
+	    dsound_strm->dwBytePos += bytes_per_frame;
+	    if (dsound_strm->dwBytePos >= dsound_strm->dwDsBufferSize)
+		dsound_strm->dwBytePos -= dsound_strm->dwDsBufferSize;
+	    dsound_strm->timestamp.u64 += strm->samples_per_frame;
 
 	} else {
@@ -545,5 +538,4 @@
 	     */
 	    struct dsound_stream *dsound_strm;
-	    int captured = 0;
 	    BOOL rc;
 
@@ -559,7 +551,5 @@
 		if (!rc) {
 		    pj_bzero(strm->buffer, bytes_per_frame);
-		} else {
-		    captured++;
-		}
+		} 
 
 		/* Call callback */
@@ -583,6 +573,4 @@
 	    } while (dsound_captured_size(dsound_strm) > bytes_per_frame);
 
-	    excess_rec = captured-1;
-	    if (excess_rec < 0) excess_rec = 0;
 	}
     }
Index: /pjproject/trunk/pjmedia/src/pjmedia/sound_port.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/sound_port.c	(revision 647)
+++ /pjproject/trunk/pjmedia/src/pjmedia/sound_port.c	(revision 648)
@@ -35,5 +35,5 @@
 
 //#define SIMULATE_LOST_PCT   20
-#define AEC_TAIL    500	    /* in ms */
+#define AEC_TAIL    128	    /* default AEC length in ms */
 
 #define THIS_FILE	    "sound_port.c"
@@ -58,4 +58,5 @@
 
     pjmedia_aec		*aec;
+    unsigned		 aec_tail_len;
     pjmedia_plc		*plc;
 
@@ -136,8 +137,4 @@
 
 
-    if (snd_port->aec) {
-	pjmedia_aec_playback(snd_port->aec, output);
-    }
-
     return PJ_SUCCESS;
 }
@@ -156,9 +153,4 @@
     pjmedia_port *port;
     pjmedia_frame frame;
-
-    /* Cancel echo */
-    if (snd_port->aec) {
-	pjmedia_aec_capture(snd_port->aec, input, 0);
-    }
 
     /* We're risking accessing the port without holding any mutex.
@@ -171,4 +163,9 @@
     if (port == NULL)
 	return PJ_SUCCESS;
+
+    /* Cancel echo */
+    if (snd_port->aec) {
+	pjmedia_aec_capture(snd_port->aec, input, 0);
+    }
 
     frame.buf = (void*)input;
@@ -247,16 +244,17 @@
 					snd_port->channel_count,
 				    0, &snd_port->plc);
-	if (status != PJ_SUCCESS)
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(4,(THIS_FILE, "Unable to create PLC"));
 	    snd_port->plc = NULL;
+	}
     }
 
     /* Create AEC only when direction is full duplex */
     if (snd_port->dir == PJMEDIA_DIR_CAPTURE_PLAYBACK) {
-	status = pjmedia_aec_create(pool, snd_port->clock_rate, 
-				    snd_port->samples_per_frame, 
-				    snd_port->clock_rate * AEC_TAIL / 1000,
-				    0, &snd_port->aec);
-	if (status != PJ_SUCCESS)
+	status = pjmedia_snd_port_set_aec(snd_port, pool, AEC_TAIL);
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(4,(THIS_FILE, "Unable to create AEC"));
 	    snd_port->aec = NULL;
+	}
     }
 
@@ -433,4 +431,52 @@
 
 /*
+ * Enable AEC
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_set_aec( pjmedia_snd_port *snd_port,
+					      pj_pool_t *pool,
+					      unsigned tail_ms)
+{
+    pj_status_t status;
+
+    /* Sound must be opened in full-duplex mode */
+    PJ_ASSERT_RETURN(snd_port && 
+		     snd_port->dir == PJMEDIA_DIR_CAPTURE_PLAYBACK,
+		     PJ_EINVALIDOP);
+
+    /* Destroy AEC */
+    if (snd_port->aec) {
+	pjmedia_aec_destroy(snd_port->aec);
+	snd_port->aec = NULL;
+    }
+
+    snd_port->aec_tail_len = tail_ms;
+
+    if (tail_ms != 0) {
+	status = pjmedia_aec_create(pool, snd_port->clock_rate, 
+				    snd_port->samples_per_frame, 
+				    snd_port->clock_rate * tail_ms / 1000,
+				    0, &snd_port->aec);
+	if (status != PJ_SUCCESS)
+	    snd_port->aec = NULL;
+    } else {
+	status = PJ_SUCCESS;
+    }
+
+    return status;
+}
+
+
+/* Get AEC tail length */
+PJ_DEF(pj_status_t) pjmedia_snd_port_get_aec_tail( pjmedia_snd_port *snd_port,
+						   unsigned *p_length)
+{
+    PJ_ASSERT_RETURN(snd_port && p_length, PJ_EINVAL);
+    *p_length =  snd_port->aec ? snd_port->aec_tail_len : 0;
+    return PJ_SUCCESS;
+}
+
+
+
+/*
  * Connect a port.
  */
Index: /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
===================================================================
--- /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp	(revision 647)
+++ /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp	(revision 648)
@@ -13,7 +13,6 @@
 static HWND	    hMainWnd;
 static HWND	    hwndCB;
-static HWND	    hwndGlobalStatus;
-static HWND	    hwndURI;
-static HWND	    hwndCallStatus;
+static HWND	    hwndGlobalStatus, hwndURI, hwndCallStatus;
+static HWND	    hwndActionButton, hwndExitButton;
 
 static pj_pool_t   *g_pool;
@@ -21,4 +20,5 @@
 static int	    g_current_acc;
 static int	    g_current_call = PJSUA_INVALID_ID;
+static int	    g_current_action;
 
 enum
@@ -36,5 +36,8 @@
     ID_MENU_ANSWER,
     ID_MENU_DISCONNECT,
+    ID_BTN_ACTION,
 };
+
+#define DEFAULT_URI	"sip:192.168.0.7"
 
 
@@ -64,4 +67,5 @@
 {
     wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(uri);
     pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
     SetDlgItemText(hMainWnd, ID_GLOBAL_STATUS, tmp);
@@ -74,4 +78,5 @@
 {
     wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(uri);
     pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
     SetDlgItemText(hMainWnd, ID_URI, tmp);
@@ -83,4 +88,5 @@
 {
     wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(state);
     pj_ansi_to_unicode(state, len, tmp, PJ_ARRAY_SIZE(tmp));
     SetDlgItemText(hMainWnd, ID_CALL_STATUS, tmp);
@@ -101,17 +107,24 @@
     case ID_MENU_NONE:
 	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("None"));
+	SetWindowText(hwndActionButton, TEXT("-"));
 	break;
     case ID_MENU_CALL:
 	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Call"));
+	SetWindowText(hwndActionButton, TEXT("&Call"));
 	break;
     case ID_MENU_ANSWER:
 	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Answer"));
+	SetWindowText(hwndActionButton, TEXT("&Answer"));
 	break;
     case ID_MENU_DISCONNECT:
 	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Hangup"));
+	SetWindowText(hwndActionButton, TEXT("&Hangup"));
 	break;
     }
 
     EnableMenuItem(hMenu, action, MF_BYCOMMAND | (enable?MF_ENABLED:MF_GRAYED));
+    DrawMenuBar(hMainWnd);
+
+    g_current_action = action;
 }
 
@@ -131,7 +144,8 @@
 
 	g_current_call = PJSUA_INVALID_ID;
-	SetURI("sip:", 4);
+	SetURI(DEFAULT_URI, -1);
 	SetAction(ID_MENU_CALL);
-	SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+	//SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+	SetCallStatus(call_info.last_status_text.ptr, call_info.last_status_text.slen);
 
     } else {
@@ -259,5 +273,7 @@
     pjsua_media_config_default(&media_cfg);
     pjsua_transport_config_default(&udp_cfg);
+    udp_cfg.port = 50060;
     pjsua_transport_config_default(&rtp_cfg);
+    rtp_cfg.port = 40000;
 
     /* Setup media */
@@ -388,5 +404,5 @@
     LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
     hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
-	    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
+	    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 200, 
 	    NULL, NULL, hInstance, NULL);
 
@@ -412,4 +428,5 @@
     {
 	X = 10,
+	Y = 40,
 	W = 220,
 	H = 30,
@@ -431,8 +448,8 @@
                 dwStyle,        // Window style
                 X,		// x-coordinate of the upper-left corner
-                60,            // y-coordinate of the upper-left corner
+                Y+0,            // y-coordinate of the upper-left corner
                 W,		// Width of the window for the edit
                                 // control
-                H,		// Height of the window for the edit
+                H-5,		// Height of the window for the edit
                                 // control
                 hWnd,           // Window handle to the parent window
@@ -451,8 +468,8 @@
                 dwStyle,        // Window style
                 X,  // x-coordinate of the upper-left corner
-                100,  // y-coordinate of the upper-left corner
+                Y+H,  // y-coordinate of the upper-left corner
                 W,  // Width of the window for the edit
                                 // control
-                H,  // Height of the window for the edit
+                H-5,  // Height of the window for the edit
                                 // control
                 hWnd,           // Window handle to the parent window
@@ -461,6 +478,21 @@
                 NULL);          // Specify NULL for this parameter when 
                                 // you create a control
-    SetURI("sip:", 4, true);
-    SetFocus(hwndURI);
+
+    // Create action Button
+    hwndActionButton = CreateWindow( L"button", L"Action", 
+                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
+                         X, Y+2*H, 
+			 60, H-5, hWnd, 
+                         (HMENU) ID_BTN_ACTION,
+                         hInst, NULL );
+
+    // Create exit button
+    hwndExitButton = CreateWindow( L"button", L"E&xit", 
+                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
+                         X+70, Y+2*H, 
+			 60, H-5, hWnd, 
+                         (HMENU) ID_EXIT,
+                         hInst, NULL );
+
 
     // Create call status edit
@@ -471,8 +503,8 @@
                 dwStyle,        // Window style
                 X,  // x-coordinate of the upper-left corner
-                140,  // y-coordinate of the upper-left corner
+                Y+3*H,  // y-coordinate of the upper-left corner
                 W,  // Width of the window for the edit
                                 // control
-                H,  // Height of the window for the edit
+                H-5,  // Height of the window for the edit
                                 // control
                 hWnd,           // Window handle to the parent window
@@ -482,6 +514,8 @@
                                 // you create a control
     SetCallStatus("Ready", 5);
-
     SetAction(ID_MENU_CALL);
+    SetURI(DEFAULT_URI, -1);
+    SetFocus(hwndURI);
+
 }
 
@@ -500,4 +534,6 @@
 	wmId    = LOWORD(wParam); 
 	wmEvent = HIWORD(wParam); 
+	if (wmId == ID_BTN_ACTION)
+	    wmId = g_current_action;
 	switch (wmId)
 	{
Index: /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp
===================================================================
--- /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp	(revision 647)
+++ /pjproject/trunk/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp	(revision 648)
@@ -76,4 +76,5 @@
 # PROP CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -91,5 +92,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSII_FP) Debug"
@@ -108,4 +109,5 @@
 # PROP CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -123,5 +125,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSII) Release"
@@ -140,4 +142,5 @@
 # PROP CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -155,5 +158,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSII) Debug"
@@ -172,4 +175,5 @@
 # PROP CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -187,5 +191,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE SH4) Release"
@@ -204,4 +208,5 @@
 # PROP CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -219,5 +224,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE SH4) Debug"
@@ -236,4 +241,5 @@
 # PROP CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -251,5 +257,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE SH3) Release"
@@ -268,4 +274,5 @@
 # PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -283,5 +290,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE SH3) Debug"
@@ -300,4 +307,5 @@
 # PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -315,5 +323,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSIV) Release"
@@ -332,4 +340,5 @@
 # PROP CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -347,5 +356,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSIV) Debug"
@@ -364,4 +373,5 @@
 # PROP CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -379,5 +389,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Release"
@@ -396,4 +406,5 @@
 # PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -411,5 +422,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
-# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Debug"
@@ -435,5 +446,5 @@
 CPP=cl.exe
 # ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c
-# ADD CPP /nologo /W3 /Zi /Od /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /FR /Yu"stdafx.h" /Gs8192 /GF /c
 MTL=midl.exe
 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
@@ -444,5 +455,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
-# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Release"
@@ -461,4 +472,5 @@
 # PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -476,5 +488,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Debug"
@@ -493,4 +505,5 @@
 # PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -508,5 +521,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSIV_FP) Release"
@@ -525,4 +538,5 @@
 # PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -540,5 +554,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPSIV_FP) Debug"
@@ -557,4 +571,5 @@
 # PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -572,5 +587,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Release"
@@ -589,4 +604,5 @@
 # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -604,5 +620,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Debug"
@@ -621,4 +637,5 @@
 # PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -636,5 +653,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPS16) Release"
@@ -653,4 +670,5 @@
 # PROP CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -668,5 +686,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE MIPS16) Debug"
@@ -685,4 +703,5 @@
 # PROP CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -700,5 +719,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Release"
@@ -717,4 +736,5 @@
 # PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -732,5 +752,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Debug"
@@ -749,4 +769,5 @@
 # PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -764,5 +785,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
-# ADD LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Release"
@@ -781,4 +802,5 @@
 # PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -796,5 +818,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
-# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
 
 !ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Debug"
@@ -813,4 +835,5 @@
 # PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
 # PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 RSC=rc.exe
@@ -828,5 +851,5 @@
 LINK32=link.exe
 # ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
-# ADD LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
 
 !ENDIF 
@@ -1109,4 +1132,133 @@
 
 DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjsip\include\pjsip-simple\evsub.h"\
+	"..\..\..\pjsip\include\pjsip-simple\iscomposing.h"\
+	"..\..\..\pjsip\include\pjsip-simple\pidf.h"\
+	"..\..\..\pjsip\include\pjsip-simple\presence.h"\
+	"..\..\..\pjsip\include\pjsip-simple\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\xpidf.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_inv.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_regc.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_xfer.h"\
+	"..\..\..\pjsip\include\pjsip.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_config.h"\
+	"..\..\..\pjsip\include\pjsip\sip_dialog.h"\
+	"..\..\..\pjsip\include\pjsip\sip_endpoint.h"\
+	"..\..\..\pjsip\include\pjsip\sip_errno.h"\
+	"..\..\..\pjsip\include\pjsip\sip_event.h"\
+	"..\..\..\pjsip\include\pjsip\sip_module.h"\
+	"..\..\..\pjsip\include\pjsip\sip_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_parser.h"\
+	"..\..\..\pjsip\include\pjsip\sip_resolve.h"\
+	"..\..\..\pjsip\include\pjsip\sip_tel_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transaction.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_loop.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tcp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_udp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_types.h"\
+	"..\..\..\pjsip\include\pjsip\sip_ua_layer.h"\
+	"..\..\..\pjsip\include\pjsip\sip_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_util.h"\
+	"..\..\..\pjsip\include\pjsip_simple.h"\
+	"..\..\..\pjsip\include\pjsip_ua.h"\
+	"..\..\..\pjsip\include\pjsua-lib\pjsua.h"\
 	".\pjsua_wince.h"\
 	".\StdAfx.h"\
@@ -1116,4 +1268,133 @@
 
 DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjsip\include\pjsip-simple\evsub.h"\
+	"..\..\..\pjsip\include\pjsip-simple\iscomposing.h"\
+	"..\..\..\pjsip\include\pjsip-simple\pidf.h"\
+	"..\..\..\pjsip\include\pjsip-simple\presence.h"\
+	"..\..\..\pjsip\include\pjsip-simple\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\xpidf.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_inv.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_regc.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_xfer.h"\
+	"..\..\..\pjsip\include\pjsip.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_config.h"\
+	"..\..\..\pjsip\include\pjsip\sip_dialog.h"\
+	"..\..\..\pjsip\include\pjsip\sip_endpoint.h"\
+	"..\..\..\pjsip\include\pjsip\sip_errno.h"\
+	"..\..\..\pjsip\include\pjsip\sip_event.h"\
+	"..\..\..\pjsip\include\pjsip\sip_module.h"\
+	"..\..\..\pjsip\include\pjsip\sip_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_parser.h"\
+	"..\..\..\pjsip\include\pjsip\sip_resolve.h"\
+	"..\..\..\pjsip\include\pjsip\sip_tel_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transaction.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_loop.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tcp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_udp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_types.h"\
+	"..\..\..\pjsip\include\pjsip\sip_ua_layer.h"\
+	"..\..\..\pjsip\include\pjsip\sip_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_util.h"\
+	"..\..\..\pjsip\include\pjsip_simple.h"\
+	"..\..\..\pjsip\include\pjsip_ua.h"\
+	"..\..\..\pjsip\include\pjsua-lib\pjsua.h"\
 	".\pjsua_wince.h"\
 	".\StdAfx.h"\
Index: /pjproject/trunk/pjsip-apps/src/samples/aectest.c
===================================================================
--- /pjproject/trunk/pjsip-apps/src/samples/aectest.c	(revision 647)
+++ /pjproject/trunk/pjsip-apps/src/samples/aectest.c	(revision 648)
@@ -161,11 +161,4 @@
     pjmedia_bidirectional_port_create(pool, play_port, rec_port, &bidir_port);
 
-    /* Create AEC port */
-    if (0) {
-	pjmedia_aec_port_create(pool, bidir_port, 
-				bidir_port->info.clock_rate * 200 / 1000,
-				&bidir_port);
-    }
-
     /* Create sound device. */
     status = pjmedia_snd_port_create(pool, -1, -1, 
@@ -181,4 +174,7 @@
 
 
+    /* Customize AEC */
+    pjmedia_snd_port_set_aec(snd, pool, 800);
+
     /* Connect sound to the port */
     pjmedia_snd_port_connect(snd, bidir_port);
Index: /pjproject/trunk/pjsip/docs/PJSUA-TESTING.txt
===================================================================
--- /pjproject/trunk/pjsip/docs/PJSUA-TESTING.txt	(revision 648)
+++ /pjproject/trunk/pjsip/docs/PJSUA-TESTING.txt	(revision 648)
@@ -0,0 +1,41 @@
+TESTING
+
+SANITY CHECKS:
+- Do pjlib-test
+- Do pjsip-test
+
+BASIC FLOW TEST (compaq1.cfg, compaq2.cfg);
+- with other pjsua
+- with EyeBeam
+- Register 
+	- with Route
+	- without Route
+	- with TCP
+- Presence (client and server)
+- Call (UAC and UAS)
+	- hold and being held
+	- DTMF send/receive
+- IM and typing
+- TCP (if there's UDP route, then Contact will be UDP)
+
+- Repeat basic flow test without Route set (to wheter TCP is correctly specified in the contact etc)
+
+
+- STUN test	(fwd1.cfg)
+
+COMPATIBILITY WITH FWD
+- presence (xpidf)
+
+
+MULTIPLE ACCOUNTS (combo.cfg)
+
+
+AUDIO QUALITY
+- call to another pjsua that loops incoming call
+
+TEST THE SAMPLES
+
+LINUX TEST
+
+UPDATE DOCUMENTATION
+
Index: /pjproject/trunk/pjsip/docs/TRANSPORT-PROBLEMS.TXT
===================================================================
--- /pjproject/trunk/pjsip/docs/TRANSPORT-PROBLEMS.TXT	(revision 648)
+++ /pjproject/trunk/pjsip/docs/TRANSPORT-PROBLEMS.TXT	(revision 648)
@@ -0,0 +1,46 @@
+Dialog's Contact Address Problems
+
+
+Background
+
+When creating a dialog (UAC or UAS dialog), application needs to specify local address to be put in the Contact header generated by the dialog. This address normally is derived from the transport address created by the application.
+
+This can be a complicated thing to do, because application needs to select the appropriate address based on the transport being used to contact remote peer, and it's not so easy especially when multiple transports are created, or when multiple interfaces are present in the host (multihoming).
+
+(Note: also similarly for client registration).
+
+So a change is being/to be made to allow the dialog to automate this process. If application specify NULL as the value of the local contact when creating a dialog, then the dialog should choose the best transport address according to the following rules.
+
+
+1a. UAC
+
+UAC SHOULD select the Contact address based on the transport to be used to send initial request to target (this can be deduced by the ";transport" param in the target URI).  For example, if initial transport is UDP, then the Contact SHOULD specify the appropriate UDP transport address.
+
+When there are multiple transports available to reach the destination (such as multiple UDP transports, although this is not really tested/supported), then which transport to use follows the policy used by the transport manager.
+
+Note that target can be the URI in the request URI, or the first route in the route set. Because initial route set is specified AFTER dialog is created, the Contact header generation is done when the initial request is created/sent.
+
+Unsolved problem(s):
+ - what if the remote Contact header in the 2xx response indicates different transport? Ideally the local Contact needs to be updated too, but this is quite a complicated problem, because if we change the local Contact, then remote may change its Contact too, and this can result in an endles loop.
+
+
+1b. UAS
+
+UAS MUST select the Contact address based on the value of Contact header and the Record-Route set in the incoming request.
+
+
+
+
+2. Multihoming
+
+Problem:
+If application does not specify the address to be used when creating SIP transport, then transport address is calculated based on the primary IP address of the local host. Sometimes this is not the correct IP to be used by the dialog, especially when there are multiple interfaces in the host. If this "incorrect" address is specified in the Contact, then remote would not be able to send request to local host.
+
+
+Workaround:
+Change the behavior of determining local IP. Instead of calling gethostbyname() for local host, the local interface IP is determined by creating an UDP socket, do UDP connect() to some public host, and get the local IP address of the socket.
+
+Although this does not fully solve the problem, hopefully it solves many problems in typical desktop systems, where an "unwanted" adapter takes precendence over the "wanted" adapter on the host/address resolution.
+
+A fully working solution would probably involve having a table to track which interface to use based on the destination, or to query the host's routing table.
+
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 647)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 648)
@@ -2153,5 +2153,5 @@
     cfg->quality = 6;
     cfg->ilbc_mode = 20;
-    cfg->ec_tail_len = 0;
+    cfg->ec_tail_len = 500;
 }
 
@@ -2498,4 +2498,27 @@
 
 
+/**
+ * Configure the AEC settings of the sound port.
+ *
+ * @param tail_ms	The tail length, in miliseconds. Set to zero to
+ *			disable AEC.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsua_set_aec(unsigned tail_ms);
+
+
+/**
+ * Get current AEC tail length.
+ *
+ * @param p_tail_ms	Pointer to receive the tail length, in miliseconds. 
+ *			If AEC is disabled, the value will be zero.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsua_get_aec(unsigned *p_tail_ms);
+
+
+
 /*****************************************************************************
  * Codecs.
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 647)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 648)
@@ -205,5 +205,4 @@
     int			 cap_dev;   /**< Capture device ID.		*/
     int			 play_dev;  /**< Playback device ID.		*/
-    pjmedia_port	*aec_port;  /**< AEC port to conf bridge.	*/
     pj_bool_t		 no_snd;    /**< No sound (app will manage it)	*/
     pjmedia_snd_port	*snd_port;  /**< Sound port.			*/
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 647)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 648)
@@ -969,30 +969,7 @@
     pj_assert(conf_port != NULL);
 
-    /* Create AEC if it's not created */
-    if (pjsua_var.aec_port == NULL && pjsua_var.media_cfg.ec_tail_len) {
-	status = pjmedia_aec_port_create(pjsua_var.pool, conf_port,
-					 conf_port->info.clock_rate * 
-					    pjsua_var.media_cfg.ec_tail_len /
-					    1000,
-					 &pjsua_var.aec_port);
-	if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Unable to create AEC port", status);
-	    pjmedia_snd_port_destroy(pjsua_var.snd_port);
-	    pjsua_var.snd_port = NULL;
-	    return status;
-	}
-    }
-
-    /* Connect to the AEC port */
-    status = pjmedia_snd_port_connect(pjsua_var.snd_port, 
-				      pjsua_var.media_cfg.ec_tail_len ? 
-					pjsua_var.aec_port : conf_port );
-    if (status != PJ_SUCCESS) {
-	pjsua_perror(THIS_FILE, "Unable to connect conference port to "
-				"sound device", status);
-	pjmedia_snd_port_destroy(pjsua_var.snd_port);
-	pjsua_var.snd_port = NULL;
-	return status;
-    }
+    /* Set AEC */
+    pjmedia_snd_port_set_aec(pjsua_var.snd_port, pjsua_var.pool, 
+			     pjsua_var.media_cfg.ec_tail_len);
 
     /* Save the device IDs */
@@ -1054,4 +1031,28 @@
 
 
+/*
+ * Configure the AEC settings of the sound port.
+ */
+PJ_DEF(pj_status_t) pjsua_set_aec(unsigned tail_ms)
+{
+    pjsua_var.media_cfg.ec_tail_len = tail_ms;
+
+    if (pjsua_var.snd_port)
+	return pjmedia_snd_port_set_aec(pjsua_var.snd_port, pjsua_var.pool,
+					tail_ms);
+    
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get current AEC tail length.
+ */
+PJ_DEF(pj_status_t) pjsua_get_aec(unsigned *p_tail_ms)
+{
+    *p_tail_ms = pjsua_var.media_cfg.ec_tail_len;
+    return PJ_SUCCESS;
+}
+
 
 /*****************************************************************************
