diff --git a/Makefile.am b/Makefile.am
index b972eba81f822a082505b1ea660372dbb94a4655..ff9efa459615165cee1e539bae18d6d6d552b126 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -163,14 +163,19 @@ setup.exe: filelist
 newdate:
 	cd gtk && $(MAKE) newdate
 
+if HAVE_MD5SUM
+GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$4'})
+else
+GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$1'})
+endif
 
 Portfile:	$(top_srcdir)/scripts/Portfile.tmpl dist
 	sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-	  -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
+	  -e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@
 
 Portfile-devel:	$(top_srcdir)/scripts/Portfile-devel.tmpl dist
 	sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \
-	  -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@
+	  -e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@
 
 bundle:
 	rm -rf $(INSTALLDIR)
diff --git a/README.macos b/README.macos
index e9440307e7a00fbcc5e590d18686df90940d2b40..1ed55dc76c1da198a1bcb7e24efdd7df4d7c6989 100644
--- a/README.macos
+++ b/README.macos
@@ -2,83 +2,53 @@
 * Compiling linphone on macos X  *
 **********************************
 
+You need:
+ - Xcode (download from apple or using appstore application)
+ - Macports: http://www.macports.org/
+   Download and install macports using its user friendly installer.
 
-You have two options: using gtk-osx framework (http://gtk-osx.sourceforge.net/) which results in a Linphone GTK well integrated into Mac OS
-environment. The other option is using MacPort, in which case Linphone will run as an X11 application inside Mac OS.
-
-At the date of March 25, 2011, no video support is available yet.
-
-
-Compiling using gtk-osx
-=======================
-
-Requirements:
-* gtk-osx framework
-* xcode (for gcc)
-* macport (to retrieve dependencies easily, such as libosip2, libeXosip2, libspeex
-* linphone git tree
-
-Steps:
-
-- Install gtk-osx jhbuild environment as described at
-http://sourceforge.net/apps/trac/gtk-osx/wiki/Build
-It will build gtk for osx as well as many dependencies.
-
-- Install ige-mac-bundler following instructions here (git clone method is preferred):
-http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle
+- Install build time dependencies
+ $ port install automake autoconf libtool intltool
 
 - Install some linphone dependencies with macports
  $ port install speex-dev
  $ port install osip2
  $ port install eXosip2
+ $ port install ffmpeg-devel
 
-- Install libSDL and ffmpeg from their official git or hg repositories. At this date (2011/05/09) the macports version are too old and buggy.
-
-- Now you can compile linphone
-
-$ jhbuild shell
-$ PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-static --disable-strict --with-gsm=/opt/local --disable-x11
-#assuming you have gsm installed in /opt/local. However gsm is optional.
-$ make
+- Install SDL (for video display)
+Unfortunately the current (august 2011) version of sdl in macports crashes all the time. Fortunately these bugs are fixed in the development branch of SDL.
+So we recommend to download SDL 1.3 with mercurial (hg) and compile it by yourself, like this:
+First, make sure you have mercurial:
+ $ sudo port install mercurial
+Fetch SDL:
+ $ hg clone http://hg.libsdl.org/SDL
+Compile:
+ $ cd SDL 
+ $ ./autogen.sh
+ $ ./configure --disable-video-dummy --disable-video-x11 && make -j4
+ $ sudo make install
 
-- You can generate a bundle using
-$ make bundle
+When this version will be integrated into macports, only this will be necessary:
+ $ port install sdl-devel
 
-The bundle is generated in ~/Desktop/Linphone and can safely be exported to other places and computers.
+- Install gtk. It is recommended to use the quartz backend for better integration.
+ $ port install gtk2 +no_x11
+ $ port install ige-mac-integration
 
+- Compile linphone
 
-Compiling using MacPort
-=======================
+If you got the source code from git, run ./autogen.sh first.
 
-This procedure works for audio, video still not fully supported.
-It was tested on macos X (leopard) on september 2009.
-
-Requirements:
-* xcode (for gcc)
-* macport (GNU porting project)
-* svn or git checkout'd linphone tree.
-
-Steps:
-* install with the 'port install' command the following dependencies
-	- automake
-	- autoconf
-	- libtool
-	- gettext
-	- intltool
-	- gtk2
-	- speex-dev
-	- osip2
-	- eXosip2
+Then or otherwise, do:
 	
-* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect
+ $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make
+
+Install to /opt/local
 
-* within linphone source directory, run ./autogen.sh
-* run 
-	./configure --prefix=/opt/local --disable-video --with-readline=none && make
-	(note: we disable readline for linphonec because it appears to hang at this time)
-* install to /opt/local
-	sudo make install 
+ $ sudo make install 
 
+Done.
 
 
 
diff --git a/configure.ac b/configure.ac
index 08bcd8bf9e50887b7564ce76c6c495d19dbdf15d..03f65f7d02a692c2a5798c4de37125a8b87bb8bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([linphone],[3.4.3],[linphone-developers@nongnu.org])
+AC_INIT([linphone],[3.4.99.1],[linphone-developers@nongnu.org])
 AC_CANONICAL_SYSTEM
 AC_CONFIG_SRCDIR([coreapi/linphonecore.c])
 
@@ -41,6 +41,8 @@ AC_C_INLINE
 AM_PROG_CC_STDC
 AC_HEADER_STDC
 AM_PROG_CC_C_O
+AC_CHECK_PROGS(MD5SUM,[md5sum md5])
+AM_CONDITIONAL(HAVE_MD5SUM,test -n $MD5SUM)
 
 case $target_os in
 	*mingw32ce)
diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c
index ee69c93dc6549fdaa561d9f44d039c2255f33bea..393d43d8fae9aa81dfcc36e058e2efec58dc24c9 100644
--- a/coreapi/linphonecall.c
+++ b/coreapi/linphonecall.c
@@ -103,10 +103,17 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr
 #endif
 
 static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) {
+	char status[255]={0};
 	ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted");
 
 	LinphoneCall *call = (LinphoneCall *)data;
 	call->audiostream_encrypted=encrypted;
+
+	if (encrypted && call->core->vtable.display_status != NULL) {
+		snprintf(status,sizeof(status)-1,_("Authentication token is %s"),call->auth_token);
+		 call->core->vtable.display_status(call->core, status);
+	}
+
 	propagate_encryption_changed(call);
 
 
diff --git a/gtk/main.c b/gtk/main.c
index 6968466d8ef35dfc6a246fa9d553819a77b11336..03d66dc379dd02f6f6ea77c702ce39a4671ebd40 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -65,6 +65,7 @@ static gboolean iconified=FALSE;
 static gchar *workingdir=NULL;
 static char *progpath=NULL;
 gchar *linphone_logfile=NULL;
+static gboolean app_terminated=FALSE;
 
 static GOptionEntry linphone_options[]={
 	{
@@ -1364,6 +1365,14 @@ static void linphone_gtk_check_soundcards(){
 	}
 }
 
+#ifdef HAVE_GTK_OSX
+static gboolean on_block_termination(void){
+	gtk_main_quit();
+	g_message("Block termination returning %i",!app_terminated);
+	return !app_terminated;
+}
+#endif
+
 int main(int argc, char *argv[]){
 #ifdef ENABLE_NLS
 	void *p;
@@ -1458,7 +1467,7 @@ int main(int argc, char *argv[]){
 	g_signal_connect(G_OBJECT(theMacApp),"NSApplicationDidBecomeActive",(GCallback)linphone_gtk_show_main_window,NULL);
 	g_signal_connect(G_OBJECT(theMacApp),"NSApplicationWillTerminate",(GCallback)gtk_main_quit,NULL);
 	/*never block termination:*/
-	g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)gtk_false,NULL);
+	g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)on_block_termination,NULL);
 #endif
 	
 	the_ui=linphone_gtk_create_window("main");
@@ -1491,6 +1500,7 @@ int main(int argc, char *argv[]){
 	linphone_gtk_destroy_log_window();
 	linphone_core_destroy(the_core);
 	linphone_gtk_log_uninit();
+	app_terminated=TRUE;
 #ifndef HAVE_GTK_OSX
 	/*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
 	gtk_status_icon_set_visible(icon,FALSE);
diff --git a/m4/osip.m4 b/m4/osip.m4
index 629f92a4e20ece5ba72bacb1eace00a9b8bfc96d..585a13ffa6a85dc5266d5e34804a310d0b019c8d 100644
--- a/m4/osip.m4
+++ b/m4/osip.m4
@@ -5,28 +5,16 @@ AC_ARG_WITH( osip,
       [  --with-osip      Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr] ],
       [ osip_prefix=${withval}],[ osip_prefix=/usr ])
 
-dnl FC6's compat-osip2 headers live into "/usr/include/osip2-2.2.2",
-dnl while  libraries are "/usr/lib/libosipparser2-2.2.2.so*".
-AC_ARG_WITH( osip-version,dnl
-AC_HELP_STRING([--with-osip-version=VERSION],
-	[Set osip legacy version @<:@empty@:>@]),
-	[osip_legacy_version="-${withval}"],
-	[osip_legacy_version=""])
 
 osip_pkgconfig=true
 osip_pkgconfig_file=libosip2
-if test -n "$osip_legacy_version"; then
-	osip_pkgconfig_file=libosip2${osip_legacy_version}
-fi
 
-PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.0.0, ,osip_pkgconfig=false)
+PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.3.0, ,osip_pkgconfig=false)
 
 if test $osip_pkgconfig = false; then
 
-	if test -z "$osip_legacy_version"; then
+	if test "$osip_prefix" != "/usr" ; then
 		OSIP_CFLAGS="-I${osip_prefix}/include"
-	else
-		OSIP_CFLAGS="-I${osip_prefix}/include/osip2${osip_legacy_version}"
 	fi
 
 dnl check osip2 headers
@@ -36,7 +24,10 @@ dnl check osip2 headers
 	CPPFLAGS=$CPPFLAGS_save
 
 dnl check for osip2 libs
-	OSIP_LIBS="-L$osip_prefix/lib -losipparser2${osip_legacy_version}"
+	if test "$osip_prefix" != "/usr" ; then
+		OSIP_LIBS="-L$osip_prefix/lib" 
+	fi
+	OSIP_LIBS="$OSIP_LIBS -losipparser2"
 	LDFLAGS_save=$LDFLAGS
 	LDFLAGS=$OSIP_LIBS
 	LIBS_save=$LIBS
@@ -49,8 +40,8 @@ dnl check for osip2 libs
 			;;
 	esac
 	OSIP_LIBS="$OSIP_LIBS $osip_aux_libs"
-	AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} $osip_aux_libs ])
-	AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
+	AC_CHECK_LIB(osip2,osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2 $osip_aux_libs ])
+	AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs])
 	LDFLAGS=$LDFLAGS_save
 	LIBS=$LIBS_save
 fi
diff --git a/mediastreamer2 b/mediastreamer2
index 9300335bbb536c4e67961c9c0b6b6b013fc4e8ff..340acff0001e92d1f126b484d100e1c1d0746b34 160000
--- a/mediastreamer2
+++ b/mediastreamer2
@@ -1 +1 @@
-Subproject commit 9300335bbb536c4e67961c9c0b6b6b013fc4e8ff
+Subproject commit 340acff0001e92d1f126b484d100e1c1d0746b34
diff --git a/scripts/Portfile-devel.tmpl b/scripts/Portfile-devel.tmpl
index 418c0a97baf4e9c9d894042f11ed01ee67ed10a1..cb6a6b9d69326e51856eb68f89d0a3c6e8f4cdc1 100644
--- a/scripts/Portfile-devel.tmpl
+++ b/scripts/Portfile-devel.tmpl
@@ -17,8 +17,14 @@ distname              linphone-${version}
 
 checksums             md5 @LINPHONE_MD5@
 
-depends_lib           port:libglade2 \
-                      port:speex-devel \
-                      port:libeXosip2 
+depends_lib           port:ffmpeg-devel \
+		      port:readline \
+                      port:speex \
+                      port:libeXosip2 \
+		      port:libsdl-devel \
+		      port:gtk2  \
+		      port:ige-mac-integration
+
+configure.args-append --disable-x11 --with-readline=/opt/local --disable-strict
+
 
-configure.args-append --disable-video --with-readline=none