From 75d3b31727344465d970ec4474ef1b55683f18b9 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 29 Apr 2010 11:54:16 +0200 Subject: [PATCH 1/9] add CallDirection enumeration class --- java/org/linphone/core/CallDirection.java | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 java/org/linphone/core/CallDirection.java diff --git a/java/org/linphone/core/CallDirection.java b/java/org/linphone/core/CallDirection.java new file mode 100644 index 000000000..142708cc2 --- /dev/null +++ b/java/org/linphone/core/CallDirection.java @@ -0,0 +1,32 @@ +/* +CallDirection.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +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. +*/ + +package org.linphone.core; + + public class CallDirection { + public static CallDirection Outgoing = new CallDirection("CallOutgoing"); + public static CallDirection Incoming = new CallDirection("Callincoming"); + private String mStringValue; + private CallDirection(String aStringValue) { + mStringValue = aStringValue; + } + public String toString() { + return mStringValue; + } +} From 4732204314c60fa78a0456b23e32c33062971387 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 29 Apr 2010 15:57:58 +0200 Subject: [PATCH 2/9] use mapped address in c= --- coreapi/misc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coreapi/misc.c b/coreapi/misc.c index 62fa0b1f0..894c3fc22 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -567,6 +567,9 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } } } + if (ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0){ + strcpy(call->localdesc->addr,ac->addr); + } close_socket(sock1); if (sock2>=0) close_socket(sock2); } From f96498bf651a4cf679ec45626c1601bfb6f788ac Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 29 Apr 2010 17:05:32 +0200 Subject: [PATCH 3/9] add exeptions to LiphoneCore java api --- java/org/linphone/core/LinphoneCore.java | 2 +- java/org/linphone/core/LinphoneCoreException.java | 9 +++++++-- java/org/linphone/core/LinphoneCoreFactory.java | 14 +++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/java/org/linphone/core/LinphoneCore.java b/java/org/linphone/core/LinphoneCore.java index 8c3674d66..d519c9d1e 100644 --- a/java/org/linphone/core/LinphoneCore.java +++ b/java/org/linphone/core/LinphoneCore.java @@ -99,7 +99,7 @@ public interface LinphoneCore { */ public void invite(String destination)throws LinphoneCoreException; - public void invite(LinphoneAddress to); + public void invite(LinphoneAddress to)throws LinphoneCoreException; public void terminateCall(); /** diff --git a/java/org/linphone/core/LinphoneCoreException.java b/java/org/linphone/core/LinphoneCoreException.java index 9c77ae7d2..b19679439 100644 --- a/java/org/linphone/core/LinphoneCoreException.java +++ b/java/org/linphone/core/LinphoneCoreException.java @@ -22,14 +22,19 @@ package org.linphone.core; public class LinphoneCoreException extends Exception { public LinphoneCoreException() { - // TODO Auto-generated constructor stub } public LinphoneCoreException(String detailMessage) { super(detailMessage); - // TODO Auto-generated constructor stub } + public LinphoneCoreException(Throwable e) { + super(e.getMessage()); + } + + public LinphoneCoreException(String detailMessage,Throwable e) { + super(detailMessage +" reason ["+e.getMessage()+"]"); + } } diff --git a/java/org/linphone/core/LinphoneCoreFactory.java b/java/org/linphone/core/LinphoneCoreFactory.java index 1f4815e37..b352edca1 100644 --- a/java/org/linphone/core/LinphoneCoreFactory.java +++ b/java/org/linphone/core/LinphoneCoreFactory.java @@ -19,36 +19,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. package org.linphone.core; -import java.io.IOException; abstract public class LinphoneCoreFactory { - private static String defaulfFactory = "org.linphone.core.LinphoneCoreFactoryImpl"; + private static String factoryName = "org.linphone.core.LinphoneCoreFactoryImpl"; + static LinphoneCoreFactory theLinphoneCoreFactory; /** * Indicate the name of the class used by this factory * @param pathName */ - static void setFactoryClassName (String className) { - defaulfFactory = className; + public static void setFactoryClassName (String className) { + factoryName = className; } public static LinphoneCoreFactory instance() { try { if (theLinphoneCoreFactory == null) { - Class lFactoryClass = Class.forName(defaulfFactory); + Class lFactoryClass = Class.forName(factoryName); theLinphoneCoreFactory = (LinphoneCoreFactory) lFactoryClass.newInstance(); } } catch (Exception e) { - System.err.println("cannot instanciate factory ["+defaulfFactory+"]"); + System.err.println("cannot instanciate factory ["+factoryName+"]"); } return theLinphoneCoreFactory; } abstract public LinphoneAuthInfo createAuthInfo(String username,String password); - abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object userdata) throws IOException; + abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object userdata) throws LinphoneCoreException; abstract public LinphoneAddress createLinphoneAddress(String username,String domain,String displayName); From 34f0238958d3838da2229446d80923e5cd464585 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Apr 2010 11:00:06 +0200 Subject: [PATCH 4/9] fix NAT issues with audio only --- configure.in | 2 +- coreapi/help/doxygen.dox.in | 43 +++++++++++++++++++++++++++++++++++++ coreapi/misc.c | 3 ++- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index fec1ed279..2ecf17659 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.2.99.5],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.2.99.7],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM dnl Source packaging numbers diff --git a/coreapi/help/doxygen.dox.in b/coreapi/help/doxygen.dox.in index acdec9090..13502d424 100644 --- a/coreapi/help/doxygen.dox.in +++ b/coreapi/help/doxygen.dox.in @@ -28,6 +28,49 @@ * @verbinclude COPYING */ +/** + * @defgroup tutorial_liblinphone Tutorial: Placing and receiving calls with liblinphone + * + +

Initialize liblinphone

+ +The first thing to do is to initialize the library passing it a set of callbacks functions to receive +various notifications: incoming calls, progress of calls etc... +These callbacks are all grouped in the LinphoneCoreVTable structure. +All are optionnals (use NULL if you don't need them). +The following code shows how initialize liblinphone: + +
+	##include 
+
+	//callback function for notification of incoming calls
+	static void on_invite_recv(LinphoneCore *lc, const char *from){
+		printf("Receiving a call from %s\n",from);
+	}
+
+	//callback function for notification end of calls (by remote)
+	static void on_bye_recv(LinphoneCore *lc, const char *from){
+		printf("Remote end hangup\n");
+	}
+
+	/
+	static void on_display_status(LinphoneCore *lc, const char *msg){
+		printf("%s",msg);
+	}
+
+	int main(int argc, char *argv[]){
+		LinphoneCoreVTable vtable;
+		
+		memset(&vtable,0,sizeof(vtable));
+		vtable.inv_recv=&on_invite_recv;
+		vtable.bye_recv=&on_bye_recv;
+		vtable.display_status=&on_display_status;
+		
+	}
+
+
+ + /** * @defgroup initializing Initialization and destruction diff --git a/coreapi/misc.c b/coreapi/misc.c index 894c3fc22..55aa83d4d 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -567,7 +567,8 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } } } - if (ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0){ + if ((ac->addr[0]!='\0' && vc->addr[0]!='\0' && strcmp(ac->addr,vc->addr)==0) + || sock2==-1){ strcpy(call->localdesc->addr,ac->addr); } close_socket(sock1); From 3b91933506a859c10f232de649e92e0effcc02a9 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Apr 2010 15:12:18 +0200 Subject: [PATCH 5/9] update mediastreamer2 and news. --- NEWS | 1 + mediastreamer2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c34031a76..0173bf7d2 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ linphone-3.3.0 -- ????????? * new tabbed ui * be nat friendly using OPTIONS request and using received,rport from responses. + * use stun guessed ports even if symmetric is detected (works with freeboxes) * improve bitrate usage of speex codec * allow speex to run with vbr (variable bit rate) mode * add speex/32000 (ultra wide band speex codec) diff --git a/mediastreamer2 b/mediastreamer2 index b437bd3bc..0ca839b53 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit b437bd3bcac6ce8f09218168ae75cc11e9a9255e +Subproject commit 0ca839b53751c4b687535bcfae747273f3dd0c44 From 2d7d7fdbe179fb0acac1452a78e3afa54db4e210 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 30 Apr 2010 18:00:09 +0200 Subject: [PATCH 6/9] mv most of the code to common directory. add LinphoneCoreException specific implementation both for j2me and j2se --- java/{ => common}/org/.DS_Store | Bin java/{ => common}/org/linphone/.DS_Store | Bin .../org/linphone/core/CallDirection.java | 0 .../org/linphone/core/LinphoneAddress.java | 0 .../org/linphone/core/LinphoneAuthInfo.java | 0 .../org/linphone/core/LinphoneCallLog.java | 0 .../org/linphone/core/LinphoneCore.java | 30 +++++------ .../linphone/core/LinphoneCoreFactory.java | 2 +- .../linphone/core/LinphoneCoreListener.java | 0 .../linphone/core/LinphoneProxyConfig.java | 0 .../linphone/core/LinphoneCoreException.java | 47 ++++++++++++++++++ .../linphone/core/LinphoneCoreException.java | 4 +- 12 files changed, 65 insertions(+), 18 deletions(-) rename java/{ => common}/org/.DS_Store (100%) rename java/{ => common}/org/linphone/.DS_Store (100%) rename java/{ => common}/org/linphone/core/CallDirection.java (100%) rename java/{ => common}/org/linphone/core/LinphoneAddress.java (100%) rename java/{ => common}/org/linphone/core/LinphoneAuthInfo.java (100%) rename java/{ => common}/org/linphone/core/LinphoneCallLog.java (100%) rename java/{ => common}/org/linphone/core/LinphoneCore.java (80%) rename java/{ => common}/org/linphone/core/LinphoneCoreFactory.java (98%) rename java/{ => common}/org/linphone/core/LinphoneCoreListener.java (100%) rename java/{ => common}/org/linphone/core/LinphoneProxyConfig.java (100%) create mode 100644 java/j2me/org/linphone/core/LinphoneCoreException.java rename java/{ => j2se}/org/linphone/core/LinphoneCoreException.java (93%) diff --git a/java/org/.DS_Store b/java/common/org/.DS_Store similarity index 100% rename from java/org/.DS_Store rename to java/common/org/.DS_Store diff --git a/java/org/linphone/.DS_Store b/java/common/org/linphone/.DS_Store similarity index 100% rename from java/org/linphone/.DS_Store rename to java/common/org/linphone/.DS_Store diff --git a/java/org/linphone/core/CallDirection.java b/java/common/org/linphone/core/CallDirection.java similarity index 100% rename from java/org/linphone/core/CallDirection.java rename to java/common/org/linphone/core/CallDirection.java diff --git a/java/org/linphone/core/LinphoneAddress.java b/java/common/org/linphone/core/LinphoneAddress.java similarity index 100% rename from java/org/linphone/core/LinphoneAddress.java rename to java/common/org/linphone/core/LinphoneAddress.java diff --git a/java/org/linphone/core/LinphoneAuthInfo.java b/java/common/org/linphone/core/LinphoneAuthInfo.java similarity index 100% rename from java/org/linphone/core/LinphoneAuthInfo.java rename to java/common/org/linphone/core/LinphoneAuthInfo.java diff --git a/java/org/linphone/core/LinphoneCallLog.java b/java/common/org/linphone/core/LinphoneCallLog.java similarity index 100% rename from java/org/linphone/core/LinphoneCallLog.java rename to java/common/org/linphone/core/LinphoneCallLog.java diff --git a/java/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java similarity index 80% rename from java/org/linphone/core/LinphoneCore.java rename to java/common/org/linphone/core/LinphoneCore.java index d519c9d1e..2ca76e643 100644 --- a/java/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -29,23 +29,23 @@ public interface LinphoneCore { */ static public class GeneralState { /* states for GSTATE_GROUP_POWER */ - static GeneralState GSTATE_POWER_OFF = new GeneralState(0); /* initial state */ - static GeneralState GSTATE_POWER_STARTUP = new GeneralState(1); - static GeneralState GSTATE_POWER_ON = new GeneralState(2); - static GeneralState GSTATE_POWER_SHUTDOWN = new GeneralState(3); + static public GeneralState GSTATE_POWER_OFF = new GeneralState(0); /* initial state */ + static public GeneralState GSTATE_POWER_STARTUP = new GeneralState(1); + static public GeneralState GSTATE_POWER_ON = new GeneralState(2); + static public GeneralState GSTATE_POWER_SHUTDOWN = new GeneralState(3); /* states for GSTATE_GROUP_REG */ - static GeneralState GSTATE_REG_NONE = new GeneralState(10); /* initial state */ - static GeneralState GSTATE_REG_OK = new GeneralState(11); - static GeneralState GSTATE_REG_FAILED = new GeneralState(12); + static public GeneralState GSTATE_REG_NONE = new GeneralState(10); /* initial state */ + static public GeneralState GSTATE_REG_OK = new GeneralState(11); + static public GeneralState GSTATE_REG_FAILED = new GeneralState(12); /* states for GSTATE_GROUP_CALL */ - static GeneralState GSTATE_CALL_IDLE = new GeneralState(20); /* initial state */ - static GeneralState GSTATE_CALL_OUT_INVITE = new GeneralState(21); - static GeneralState GSTATE_CALL_OUT_CONNECTED = new GeneralState(22); - static GeneralState GSTATE_CALL_IN_INVITE = new GeneralState(23); - static GeneralState GSTATE_CALL_IN_CONNECTED = new GeneralState(24); - static GeneralState GSTATE_CALL_END = new GeneralState(25); - static GeneralState GSTATE_CALL_ERROR = new GeneralState(26); - static GeneralState GSTATE_INVALID = new GeneralState(27); + static public GeneralState GSTATE_CALL_IDLE = new GeneralState(20); /* initial state */ + static public GeneralState GSTATE_CALL_OUT_INVITE = new GeneralState(21); + static public GeneralState GSTATE_CALL_OUT_CONNECTED = new GeneralState(22); + static public GeneralState GSTATE_CALL_IN_INVITE = new GeneralState(23); + static public GeneralState GSTATE_CALL_IN_CONNECTED = new GeneralState(24); + static public GeneralState GSTATE_CALL_END = new GeneralState(25); + static public GeneralState GSTATE_CALL_ERROR = new GeneralState(26); + static public GeneralState GSTATE_INVALID = new GeneralState(27); private final int mValue; static private Vector values = new Vector(); diff --git a/java/org/linphone/core/LinphoneCoreFactory.java b/java/common/org/linphone/core/LinphoneCoreFactory.java similarity index 98% rename from java/org/linphone/core/LinphoneCoreFactory.java rename to java/common/org/linphone/core/LinphoneCoreFactory.java index b352edca1..b267373a3 100644 --- a/java/org/linphone/core/LinphoneCoreFactory.java +++ b/java/common/org/linphone/core/LinphoneCoreFactory.java @@ -46,7 +46,7 @@ abstract public class LinphoneCoreFactory { } return theLinphoneCoreFactory; } - abstract public LinphoneAuthInfo createAuthInfo(String username,String password); + abstract public LinphoneAuthInfo createAuthInfo(String username,String password, String realm); abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, String userConfig,String factoryConfig,Object userdata) throws LinphoneCoreException; diff --git a/java/org/linphone/core/LinphoneCoreListener.java b/java/common/org/linphone/core/LinphoneCoreListener.java similarity index 100% rename from java/org/linphone/core/LinphoneCoreListener.java rename to java/common/org/linphone/core/LinphoneCoreListener.java diff --git a/java/org/linphone/core/LinphoneProxyConfig.java b/java/common/org/linphone/core/LinphoneProxyConfig.java similarity index 100% rename from java/org/linphone/core/LinphoneProxyConfig.java rename to java/common/org/linphone/core/LinphoneProxyConfig.java diff --git a/java/j2me/org/linphone/core/LinphoneCoreException.java b/java/j2me/org/linphone/core/LinphoneCoreException.java new file mode 100644 index 000000000..10900a633 --- /dev/null +++ b/java/j2me/org/linphone/core/LinphoneCoreException.java @@ -0,0 +1,47 @@ +/* +LinphoneCoreException.java +Copyright (C) 2010 Belledonne Communications, Grenoble, France + +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. +*/ +package org.linphone.core; + + +public class LinphoneCoreException extends Exception { + Throwable mE; + public LinphoneCoreException() { + super(); + } + + public LinphoneCoreException(String detailMessage) { + super(detailMessage); + + } + public LinphoneCoreException(Throwable e) { + mE = e; + } + + public LinphoneCoreException(String detailMessage,Throwable e) { + super(detailMessage); + mE = e; + } + + public void printStackTrace() { + super.printStackTrace(); + mE.printStackTrace(); + } + + +} diff --git a/java/org/linphone/core/LinphoneCoreException.java b/java/j2se/org/linphone/core/LinphoneCoreException.java similarity index 93% rename from java/org/linphone/core/LinphoneCoreException.java rename to java/j2se/org/linphone/core/LinphoneCoreException.java index b19679439..a424e2871 100644 --- a/java/org/linphone/core/LinphoneCoreException.java +++ b/java/j2se/org/linphone/core/LinphoneCoreException.java @@ -29,11 +29,11 @@ public class LinphoneCoreException extends Exception { } public LinphoneCoreException(Throwable e) { - super(e.getMessage()); + super(e); } public LinphoneCoreException(String detailMessage,Throwable e) { - super(detailMessage +" reason ["+e.getMessage()+"]"); + super(detailMessage,e); } From e9f488f4a37ffff774abbea00706b7e1f09552df Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Sun, 2 May 2010 19:10:22 +0200 Subject: [PATCH 7/9] set registered flag before notifying about new gstate --- coreapi/callbacks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index cdb180428..a4c2d510a 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -369,8 +369,8 @@ static void register_success(SalOp *op, bool_t registered){ LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op)); LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)sal_op_get_user_pointer(op); char *msg; - gstate_new_state(lc, GSTATE_REG_OK, NULL); cfg->registered=registered; + gstate_new_state(lc, GSTATE_REG_OK, NULL); if (cfg->registered) msg=ms_strdup_printf(_("Registration on %s successful."),sal_op_get_proxy(op)); else msg=ms_strdup_printf(_("Unregistration on %s done."),sal_op_get_proxy(op)); if (lc->vtable.display_status) From ec20c545196905108f76a78190b8273f1d3e698e Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Sun, 2 May 2010 19:11:39 +0200 Subject: [PATCH 8/9] fix LinphoneCore.GeneralState + implement missing jnis for LinphoneProxyConfig --- coreapi/linphonecore_jni.cc | 22 ++++++ .../org/linphone/core/LinphoneCore.java | 69 ++++++++++--------- 2 files changed, 59 insertions(+), 32 deletions(-) diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 4c595cd0e..390c56232 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -352,16 +352,38 @@ extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setIdentity(JNIEn linphone_proxy_config_set_identity((LinphoneProxyConfig*)proxyCfg,identity); env->ReleaseStringUTFChars(jidentity, identity); } +extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getIdentity(JNIEnv* env,jobject thiz,jlong proxyCfg) { + const char* identity = linphone_proxy_config_get_identity((LinphoneProxyConfig*)proxyCfg); + if (identity) { + return env->NewStringUTF(identity); + } else { + return NULL; + } +} extern "C" int Java_org_linphone_core_LinphoneProxyConfigImpl_setProxy(JNIEnv* env,jobject thiz,jlong proxyCfg,jstring jproxy) { const char* proxy = env->GetStringUTFChars(jproxy, NULL); int err=linphone_proxy_config_set_server_addr((LinphoneProxyConfig*)proxyCfg,proxy); env->ReleaseStringUTFChars(jproxy, proxy); return err; } +extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getProxy(JNIEnv* env,jobject thiz,jlong proxyCfg) { + const char* proxy = linphone_proxy_config_get_addr((LinphoneProxyConfig*)proxyCfg); + if (proxy) { + return env->NewStringUTF(proxy); + } else { + return NULL; + } +} extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_enableRegister(JNIEnv* env,jobject thiz,jlong proxyCfg,jboolean enableRegister) { linphone_proxy_config_enable_register((LinphoneProxyConfig*)proxyCfg,enableRegister); } +extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_isRegistered(JNIEnv* env,jobject thiz,jlong proxyCfg) { + return linphone_proxy_config_is_registered((LinphoneProxyConfig*)proxyCfg); +} +extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_isRegisterEnabled(JNIEnv* env,jobject thiz,jlong proxyCfg) { + return linphone_proxy_config_register_enabled((LinphoneProxyConfig*)proxyCfg); +} extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_edit(JNIEnv* env,jobject thiz,jlong proxyCfg) { linphone_proxy_config_edit((LinphoneProxyConfig*)proxyCfg); } diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 2ca76e643..927c9596e 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -28,39 +28,44 @@ public interface LinphoneCore { * linphone core states */ static public class GeneralState { - /* states for GSTATE_GROUP_POWER */ - static public GeneralState GSTATE_POWER_OFF = new GeneralState(0); /* initial state */ - static public GeneralState GSTATE_POWER_STARTUP = new GeneralState(1); - static public GeneralState GSTATE_POWER_ON = new GeneralState(2); - static public GeneralState GSTATE_POWER_SHUTDOWN = new GeneralState(3); - /* states for GSTATE_GROUP_REG */ - static public GeneralState GSTATE_REG_NONE = new GeneralState(10); /* initial state */ - static public GeneralState GSTATE_REG_OK = new GeneralState(11); - static public GeneralState GSTATE_REG_FAILED = new GeneralState(12); - /* states for GSTATE_GROUP_CALL */ - static public GeneralState GSTATE_CALL_IDLE = new GeneralState(20); /* initial state */ - static public GeneralState GSTATE_CALL_OUT_INVITE = new GeneralState(21); - static public GeneralState GSTATE_CALL_OUT_CONNECTED = new GeneralState(22); - static public GeneralState GSTATE_CALL_IN_INVITE = new GeneralState(23); - static public GeneralState GSTATE_CALL_IN_CONNECTED = new GeneralState(24); - static public GeneralState GSTATE_CALL_END = new GeneralState(25); - static public GeneralState GSTATE_CALL_ERROR = new GeneralState(26); - static public GeneralState GSTATE_INVALID = new GeneralState(27); - private final int mValue; - static private Vector values = new Vector(); - - private GeneralState(int value) { - mValue = value; - values.addElement(this); - } - public static GeneralState fromInt(int value) { - - for (int i=0; i Date: Mon, 3 May 2010 14:53:30 +0200 Subject: [PATCH 9/9] add AMR support --- coreapi/linphonecore.c | 1 + mediastreamer2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index eb2a58f93..4f1d367c5 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1031,6 +1031,7 @@ static void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vta linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on"); linphone_core_assign_payload_type(&payload_type_telephone_event,101,"0-11"); linphone_core_assign_payload_type(&payload_type_ilbc,113,"mode=30"); + linphone_core_assign_payload_type(&payload_type_amr,114,"octet-align=1"); #ifdef ENABLE_NONSTANDARD_GSM { diff --git a/mediastreamer2 b/mediastreamer2 index 0ca839b53..b340a76e9 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 0ca839b53751c4b687535bcfae747273f3dd0c44 +Subproject commit b340a76e998c7dd2670372212b0bf14d7c59b987