Index: pjproject/trunk/pjmedia/build/Makefile
===================================================================
--- pjproject/trunk/pjmedia/build/Makefile	(revision 240)
+++ pjproject/trunk/pjmedia/build/Makefile	(revision 241)
@@ -30,7 +30,8 @@
 export PJMEDIA_SRCDIR = ../src/pjmedia
 export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
-			codec.o endpoint.o errno.o g711.o jbuf.o rtcp.o \
-			rtp.o sdp.o sdp_cmp.o sdp_neg.o session.o stream.o \
-			pasound.o \
+			codec.o conference.o endpoint.o errno.o file_port.o \
+			g711.o jbuf.o pasound.o port.o rtcp.o \
+			rtp.o sdp.o sdp_cmp.o sdp_neg.o session.o silencedet.o \
+			stream.o \
 		      	$(PA_DIR)/pa_allocation.o \
 			$(PA_DIR)/pa_converters.o \
@@ -52,8 +53,8 @@
 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/add.o gsm/code.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/gsm_option.o gsm/long_term.o \
 			gsm/lpc.o gsm/preprocess.o gsm/rpe.o gsm/short_term.o \
 			gsm/table.o
Index: pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 240)
+++ pjproject/trunk/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 241)
@@ -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/file_port.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/file_port.c	(revision 240)
+++ pjproject/trunk/pjmedia/src/pjmedia/file_port.c	(revision 241)
@@ -44,5 +44,4 @@
 				  pjmedia_frame *frame);
 static pj_status_t file_on_destroy(pjmedia_port *this_port);
-static pj_status_t read_buffer(struct file_port *port);
 
 static struct file_port *create_file_port(pj_pool_t *pool)
Index: pjproject/trunk/pjsip/build/Makefile
===================================================================
--- pjproject/trunk/pjsip/build/Makefile	(revision 240)
+++ pjproject/trunk/pjsip/build/Makefile	(revision 241)
@@ -11,4 +11,5 @@
 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)
+export PJSUA_LIB_LIB=../lib/libpjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
 
 
@@ -21,5 +22,6 @@
 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
 		   $(HOST_CXXFLAGS) $(CXXFLAGS)
-export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
 		   $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
@@ -50,5 +52,5 @@
 export PJSIP_UA_SRCDIR = ../src/pjsip-ua
 export PJSIP_UA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
-			sip_inv.o sip_reg.o
+			sip_inv.o sip_reg.o sip_xfer.o
 export PJSIP_UA_CFLAGS += $(_CFLAGS)
 
@@ -64,10 +66,19 @@
 
 ###############################################################################
+# Defines for building PJSUA-LIB library
+#
+export PJSUA_LIB_SRCDIR = ../src/pjsua-lib
+export PJSUA_LIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			pjsua_reg.o pjsua_call.o pjsua_pres.o pjsua_opt.o \
+			pjsua_core.o
+export PJSUA_LIB_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_pres.o pjsua_opt.o \
-			pjsua_core.o
+			main.o 
 export PJSUA_CFLAGS += $(_CFLAGS)
 export PJSUA_LDFLAGS += $(_LDFLAGS)
@@ -81,5 +92,5 @@
 #
 #
-TARGETS := pjsip pjsip-ua pjsip-simple pjsua
+TARGETS := pjsip pjsip-ua pjsip-simple pjsua-lib pjsua
 
 all: $(TARGETS)
@@ -91,5 +102,5 @@
 distclean: realclean
 
-.PHONY: dep depend pjsip pjsip-ua pjsua clean realclean distclean
+.PHONY: dep depend pjsip pjsip-ua pjsua-lib pjsua clean realclean distclean
 
 pjsip:
@@ -102,5 +113,8 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(PJSIP_SIMPLE_LIB)
 
-pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB)
+pjsua-lib:
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB)
+
+pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB) $(PJSUA_LIB_LIB)
 	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $(PJSUA_EXE)
 
@@ -120,4 +134,9 @@
 	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
 
+.PHONY: ../lib/pjsua-lib.ko
+../lib/pjsua-lib.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
+
 .PHONY: ../lib/pjsua.ko
 ../lib/pjsua.ko:
@@ -128,7 +147,8 @@
 	$(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_LIB app=pjsua-lib $@
 	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
 	@if test "$@" == "depend"; then \
-	  echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB)' >> .pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
+	  echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE) $(PJSUA_LIB)' >> .pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \
 	fi
 
Index: pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c	(revision 240)
+++ pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c	(revision 241)
@@ -1115,5 +1115,5 @@
 {
     pj_status_t status;
-    pjmedia_sdp_session *sdp = NULL;
+    const pjmedia_sdp_session *sdp = NULL;
 
     /* If local_sdp is specified, then we MUST NOT have answered the
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 240)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 241)
@@ -854,5 +854,5 @@
 				   ", stream #%d: %.*s (%s)", i,
 				   (int)strm_info->fmt.encoding_name.slen,
-				   (int)strm_info->fmt.encoding_name.ptr,
+				   strm_info->fmt.encoding_name.ptr,
 				   dir);
 	    if (len > 0)
