Index: /pjproject/trunk/pjlib/include/pj/compat/string.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/compat/string.h	(revision 197)
+++ /pjproject/trunk/pjlib/include/pj/compat/string.h	(revision 198)
@@ -25,13 +25,4 @@
  */
 
-/**
- * Native char type, which will be equal to wchar_t for Unicode
- * and char for ANSI.
- */
-#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
-typedef wchar_t pj_char_t;
-#else
-typedef char pj_char_t;
-#endif
 
 #if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0
Index: /pjproject/trunk/pjmedia/build/Makefile
===================================================================
--- /pjproject/trunk/pjmedia/build/Makefile	(revision 197)
+++ /pjproject/trunk/pjmedia/build/Makefile	(revision 198)
@@ -7,4 +7,5 @@
 
 export PJMEDIA_LIB:=../lib/libpjmedia-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+export PJMEDIA_CODEC_LIB:=../lib/libpjmedia-codec-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 
 ###############################################################################
@@ -46,4 +47,19 @@
 
 ###############################################################################
+# Defines for building PJMEDIA-Codec library
+#
+export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec
+export PJMEDIA_CODEC_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			gsm.o pjmedia-codec-lib.o \
+			gsm/add.o gsm/code.o gsm/debug.o gsm/decode.o \
+			gsm/gsm_create.o gsm/gsm_decode.o gsm/gsm_destroy.o \
+			gsm/gsm_encode.o gsm/gsm_explode.o gsm/gsm_implode.o \
+			gsm/gsm_option.o gsm/gsm_print.o gsm/long_term.o \
+			gsm/lpc.o gsm/preprocess.o gsm/rpe.o gsm/short_term.o \
+			gsm/table.o
+export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
 # Defines for building test application
 #
@@ -61,5 +77,5 @@
 # $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
 #
-TARGETS := pjmedia 
+TARGETS := pjmedia pjmedia-codec
 #pjmedia-test
 
@@ -72,8 +88,11 @@
 distclean: realclean
 
-.PHONY: dep depend pjmedia pjmedia-test clean realclean distclean
+.PHONY: dep depend pjmedia pjmedia-codec pjmedia-test clean realclean distclean
 
 pjmedia:
 	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $(PJMEDIA_LIB)
+
+pjmedia-codec:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $(PJMEDIA_CODEC_LIB)
 
 pjmedia-test: $(PJMEDIA_LIB)
@@ -85,4 +104,9 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
 
+.PHONY: ../lib/pjmedia-codec.ko
+../lib/pjmedia-codec.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
+
 .PHONY: ../lib/pjmedia-test.ko
 ../lib/pjmedia-test.ko:
@@ -91,5 +115,7 @@
 clean depend realclean:
 	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
 	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
 	@if test "$@" == "depend"; then \
 	  echo '$(PJMEDIA_TEST_EXE): $(PJMEDIA_LIB)' >> .pjmedia-test-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
Index: /pjproject/trunk/pjmedia/build/os-win32.mak
===================================================================
--- /pjproject/trunk/pjmedia/build/os-win32.mak	(revision 197)
+++ /pjproject/trunk/pjmedia/build/os-win32.mak	(revision 198)
@@ -9,5 +9,5 @@
 #
 export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \
-		       $(PA_DIR)/pa_win_ds.o
+		       $(PA_DIR)/pa_win_wmme.o
 
-export OS_CFLAGS += -DPA_NO_ASIO
+export OS_CFLAGS += -DPA_NO_ASIO -DPA_NO_DS
Index: /pjproject/trunk/pjmedia/build/pjmedia.dsp
===================================================================
--- /pjproject/trunk/pjmedia/build/pjmedia.dsp	(revision 197)
+++ /pjproject/trunk/pjmedia/build/pjmedia.dsp	(revision 198)
@@ -33,11 +33,11 @@
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\output\pjmedia_i386_win32_vc6_release"
-# PROP BASE Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_release"
+# PROP BASE Output_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-release"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\output\pjmedia_i386_win32_vc6_release"
-# PROP Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_release"
+# PROP Output_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-release"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
@@ -51,5 +51,5 @@
 LIB32=link.exe -lib
 # ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"../lib/pjmedia_vc6s.lib"
+# ADD LIB32 /nologo /out:"../lib/pjmedia-i386-win32-vc6-release.lib"
 
 !ELSEIF  "$(CFG)" == "pjmedia - Win32 Debug"
@@ -57,11 +57,11 @@
 # PROP BASE Use_MFC 0
 # PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ".\output\pjmedia_i386_win32_vc6_debug"
-# PROP BASE Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_debug"
+# PROP BASE Output_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-debug"
 # PROP BASE Target_Dir ""
 # PROP Use_MFC 0
 # PROP Use_Debug_Libraries 1
-# PROP Output_Dir ".\output\pjmedia_i386_win32_vc6_debug"
-# PROP Intermediate_Dir ".\output\pjmedia_i386_win32_vc6_debug"
+# PROP Output_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-debug"
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
@@ -75,5 +75,5 @@
 LIB32=link.exe -lib
 # ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"../lib/pjmedia_vc6sd.lib"
+# ADD LIB32 /nologo /out:"../lib/pjmedia-i386-win32-vc6-debug.lib"
 
 !ENDIF 
Index: /pjproject/trunk/pjmedia/build/pjmedia_codec.dsp
===================================================================
--- /pjproject/trunk/pjmedia/build/pjmedia_codec.dsp	(revision 197)
+++ /pjproject/trunk/pjmedia/build/pjmedia_codec.dsp	(revision 198)
@@ -50,5 +50,5 @@
 LIB32=link.exe -lib
 # ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-vc6.lib"
+# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-i386-vc6-release.lib"
 
 !ELSEIF  "$(CFG)" == "pjmedia_codec - Win32 Debug"
@@ -73,5 +73,5 @@
 LIB32=link.exe -lib
 # ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-vc6d.lib"
+# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-i386-win32-vc6-debug.lib"
 
 !ENDIF 
@@ -90,5 +90,5 @@
 # Begin Source File
 
-SOURCE="..\src\pjmedia-codec\pjmedia-codec.c"
+SOURCE="..\src\pjmedia-codec\pjmedia-codec-lib.c"
 # End Source File
 # End Group
Index: /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c	(revision 197)
+++ /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c	(revision 198)
@@ -281,4 +281,6 @@
 			       sizeof(pjmedia_codec));
 	PJ_ASSERT_RETURN(codec != NULL, PJ_ENOMEM);
+	codec->op = &gsm_op;
+	codec->factory = factory;
     }
 
@@ -414,5 +416,5 @@
 	return PJMEDIA_CODEC_EPCMTOOSHORT;
 
-    gsm_encode(codec->codec_data, (const short*)input->buf, 
+    gsm_encode(codec->codec_data, (short*)input->buf, 
 	       (unsigned char*)output->buf);
 
@@ -441,5 +443,5 @@
 
     gsm_decode(codec->codec_data, 
-	       (const unsigned char*)input->buf, 
+	       (unsigned char*)input->buf, 
 	       (short*)output->buf);
 
Index: /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 197)
+++ /pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 198)
@@ -10,11 +10,11 @@
 #define	CONFIG_H
 
-/*efine	SIGHANDLER_T	int 		/* signal handlers are void	*/
-/*efine HAS_SYSV_SIGNAL	1		/* sigs not blocked/reset?	*/
+/*efine	SIGHANDLER_T	int 		//* signal handlers are void	*/
+/*efine HAS_SYSV_SIGNAL	1		//* sigs not blocked/reset?	*/
 
 #define	HAS_STDLIB_H	1		/* /usr/include/stdlib.h	*/
-/*efine	HAS_LIMITS_H	1		/* /usr/include/limits.h	*/
+/*efine	HAS_LIMITS_H	1		//* /usr/include/limits.h	*/
 #define	HAS_FCNTL_H	1		/* /usr/include/fcntl.h		*/
-/*efine	HAS_ERRNO_DECL	1		/* errno.h declares errno	*/
+/*efine	HAS_ERRNO_DECL	1		//* errno.h declares errno	*/
 
 #define	HAS_FSTAT 	1		/* fstat syscall		*/
@@ -23,15 +23,15 @@
 #define	HAS_FCHOWN 	1		/* fchown syscall		*/
 #define	HAS_CHOWN 	1		/* chown syscall		*/
-/*efine	HAS__FSETMODE 	1		/* _fsetmode -- set file mode	*/
+/*efine	HAS__FSETMODE 	1		//* _fsetmode -- set file mode	*/
 
 #define	HAS_STRING_H 	1		/* /usr/include/string.h 	*/
-/*efine	HAS_STRINGS_H	1		/* /usr/include/strings.h 	*/
+/*efine	HAS_STRINGS_H	1		//* /usr/include/strings.h 	*/
 
 #define	HAS_UNISTD_H	1		/* /usr/include/unistd.h	*/
 #define	HAS_UTIME	1		/* POSIX utime(path, times)	*/
-/*efine	HAS_UTIMES	1		/* use utimes()	syscall instead	*/
+/*efine	HAS_UTIMES	1		//* use utimes()	syscall instead	*/
 #define	HAS_UTIME_H	1		/* UTIME header file		*/
-/*efine	HAS_UTIMBUF	1		/* struct utimbuf		*/
-/*efine	HAS_UTIMEUSEC   1		/* microseconds in utimbuf?	*/
+/*efine	HAS_UTIMBUF	1		//* struct utimbuf		*/
+/*efine	HAS_UTIMEUSEC   1		//* microseconds in utimbuf?	*/
 
 
Index: /pjproject/trunk/pjmedia/src/pjmedia-codec/pjmedia-codec-lib.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-codec/pjmedia-codec-lib.c	(revision 198)
+++ /pjproject/trunk/pjmedia/src/pjmedia-codec/pjmedia-codec-lib.c	(revision 198)
@@ -0,0 +1,81 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjmedia-codec.h>
+
+/* Include factories: */
+#include <pjmedia-codec/config.h>
+#include <pjmedia-codec/gsm.h>
+
+
+static pjmedia_endpt *the_endpt;
+static struct codec_list
+{
+    pj_status_t (*init)(pjmedia_endpt*);
+    pj_status_t (*deinit)(void);
+} codec_list[] = 
+{
+
+#if PJMEDIA_CODEC_HAS_GSM
+    { &pjmedia_codec_gsm_init, &pjmedia_codec_gsm_deinit},
+#endif
+
+    { NULL, NULL }
+};
+
+/*
+ * Initialize pjmedia-codec library, and register all codec factories
+ * in this library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_init(pjmedia_endpt *endpt)
+{
+    pj_status_t status;
+    unsigned i;
+
+    the_endpt = endpt;
+
+    for (i=0; codec_list[i].init; ++i) {
+	status = (*codec_list[i].init)(the_endpt);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Deinitialize pjmedia-codec library, and unregister all codec factories
+ * in this library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_deinit(void)
+{
+    pj_status_t status;
+    unsigned i;
+
+    for (i=0; codec_list[i].init; ++i) {
+	status = (*codec_list[i].deinit)();
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+
+
Index: project/trunk/pjmedia/src/pjmedia-codec/pjmedia-codec.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia-codec/pjmedia-codec.c	(revision 197)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/* $Id$ */
-/* 
- * Copyright (C)2003-2006 Benny Prijono <benny@prijono.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- */
-#include <pjmedia-codec.h>
-
-/* Include factories: */
-#include <pjmedia-codec/config.h>
-#include <pjmedia-codec/gsm.h>
-
-
-static pjmedia_endpt *the_endpt;
-static struct codec_list
-{
-    pj_status_t (*init)(pjmedia_endpt*);
-    pj_status_t (*deinit)(void);
-} codec_list[] = 
-{
-
-#if PJMEDIA_CODEC_HAS_GSM
-    { &pjmedia_codec_gsm_init, &pjmedia_codec_gsm_deinit},
-#endif
-
-    { NULL, NULL }
-};
-
-/*
- * Initialize pjmedia-codec library, and register all codec factories
- * in this library.
- */
-PJ_DEF(pj_status_t) pjmedia_codec_init(pjmedia_endpt *endpt)
-{
-    pj_status_t status;
-    unsigned i;
-
-    the_endpt = endpt;
-
-    for (i=0; codec_list[i].init; ++i) {
-	status = (*codec_list[i].init)(the_endpt);
-	if (status != PJ_SUCCESS)
-	    return status;
-    }
-    return PJ_SUCCESS;
-}
-
-
-/*
- * Deinitialize pjmedia-codec library, and unregister all codec factories
- * in this library.
- */
-PJ_DEF(pj_status_t) pjmedia_codec_deinit(void)
-{
-    pj_status_t status;
-    unsigned i;
-
-    for (i=0; codec_list[i].init; ++i) {
-	status = (*codec_list[i].deinit)();
-	if (status != PJ_SUCCESS)
-	    return status;
-    }
-
-    return PJ_SUCCESS;
-}
-
-
-
-
Index: /pjproject/trunk/pjsip/build/Makefile
===================================================================
--- /pjproject/trunk/pjsip/build/Makefile	(revision 197)
+++ /pjproject/trunk/pjsip/build/Makefile	(revision 198)
@@ -6,7 +6,9 @@
 PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 
 export PJSIP_LIB:=../lib/libpjsip-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 export PJSIP_UA_LIB:=../lib/libpjsip-ua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+export PJSIP_SIMPLE_LIB:=../lib/libpjsip-simple-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 
 
@@ -20,10 +22,12 @@
 		   $(HOST_CXXFLAGS) $(CXXFLAGS)
 export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
 		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
-		   $(LDFLAGS) -lm
+		   $(LDFLAGS) -lm -lwinmm
 
 
@@ -51,9 +55,19 @@
 
 ###############################################################################
+# Defines for building PJSIP SIMPLE library
+#
+export PJSIP_SIMPLE_SRCDIR = ../src/pjsip-simple
+export PJSIP_SIMPLE_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			errno.o evsub.o evsub_msg.o pidf.o presence.o xpidf.o
+export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
 # Defines for building PJSUA
 #
 export PJSUA_SRCDIR = ../src/pjsua
 export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
-			main.o pjsua_reg.o pjsua_inv.o pjsua_core.o
+			main.o pjsua_reg.o pjsua_inv.o pjsua_pres.o pjsua_opt.o \
+			pjsua_core.o
 export PJSUA_CFLAGS += $(_CFLAGS)
 export PJSUA_LDFLAGS += $(_LDFLAGS)
@@ -67,5 +81,5 @@
 #
 #
-TARGETS := pjsip pjsip-ua pjsua
+TARGETS := pjsip pjsip-ua pjsip-simple pjsua
 
 all: $(TARGETS)
@@ -85,5 +99,8 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(PJSIP_UA_LIB)
 
-pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB)
+pjsip-simple:
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(PJSIP_SIMPLE_LIB)
+
+pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB)
 	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $(PJSUA_EXE)
 
@@ -98,4 +115,9 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
 
+.PHONY: ../lib/pjsip-simple.ko
+../lib/pjsip-simple.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
+
 .PHONY: ../lib/pjsua.ko
 ../lib/pjsua.ko:
@@ -105,4 +127,5 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
 	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
 	@if test "$@" == "depend"; then \
Index: /pjproject/trunk/pjsip/build/pjsip_simple.dsp
===================================================================
--- /pjproject/trunk/pjsip/build/pjsip_simple.dsp	(revision 197)
+++ /pjproject/trunk/pjsip/build/pjsip_simple.dsp	(revision 198)
@@ -86,4 +86,8 @@
 # Begin Source File
 
+SOURCE="..\src\pjsip-simple\errno.c"
+# End Source File
+# Begin Source File
+
 SOURCE="..\src\pjsip-simple\evsub.c"
 # End Source File
Index: /pjproject/trunk/pjsip/src/pjsip-simple/errno.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/errno.c	(revision 198)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/errno.c	(revision 198)
@@ -0,0 +1,20 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjsip-simple/errno.h>
+
Index: /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 197)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/evsub.c	(revision 198)
@@ -569,11 +569,7 @@
     case TIMER_TYPE_UAC_TERMINATE:
 	{
-	    pjsip_event event;
-	    pj_str_t reason = { "unsubscribing", 13};
-
-	    PJSIP_EVENT_INIT_TIMER(event, entry);
 	    PJ_LOG(5,(sub->obj_name, "Timeout waiting for final NOTIFY. "
 				     "Terminating.."));
-	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, &event);
+	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, NULL);
 	}
 	break;
@@ -965,4 +961,5 @@
     /* Fill up the header */
     switch (state) {
+    case PJSIP_EVSUB_STATE_NULL:
     case PJSIP_EVSUB_STATE_SENT:
     case PJSIP_EVSUB_STATE_ACCEPTED:
Index: /pjproject/trunk/pjsip/src/pjsip-simple/presence.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip-simple/presence.c	(revision 197)
+++ /pjproject/trunk/pjsip/src/pjsip-simple/presence.c	(revision 198)
@@ -833,5 +833,5 @@
 	pj_stricmp(&ctype_hdr->media.subtype, &STR_XPIDF_XML)==0)
     {
-	status = pres_parse_pidf( pres, rdata, &pres->tmp_status);
+	status = pres_parse_xpidf( pres, rdata, &pres->tmp_status);
     }
     else
