diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 1f924497bccfb5170d76e27755e61b9704754495..12b1a22fe2d6c8467788ef8b4b56c5c9652bcb48 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1488,6 +1488,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneCallImpl_getRemoteAddress( JNIEn return (jlong)linphone_call_get_remote_address((LinphoneCall*)ptr); } +extern "C" jstring Java_org_linphone_core_LinphoneCallImpl_get_remoteUserAgent(JNIEnv *env, jobject thiz, jlong ptr) { + LinphoneCall *call = (LinphoneCall *)ptr; + jstring jvalue = env->NewStringUTF(linphone_call_get_remote_user_agent(call)); + return jvalue; +} + extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getState( JNIEnv* env ,jobject thiz ,jlong ptr) { diff --git a/java/common/org/linphone/core/LinphoneCall.java b/java/common/org/linphone/core/LinphoneCall.java index 35e173d5a802d1a454b827780f3aca081285e475..7c02334e9f236390c9c740ef0f1b7f2b52ad63e5 100644 --- a/java/common/org/linphone/core/LinphoneCall.java +++ b/java/common/org/linphone/core/LinphoneCall.java @@ -268,6 +268,11 @@ public interface LinphoneCall { boolean isInConference(); float getPlayVolume(); + + /** + * Obtain the remote user agent string. + */ + String getRemoteUserAgent(); /** * Take a photo of currently received video and write it into a jpeg file. diff --git a/java/impl/org/linphone/core/LinphoneCallImpl.java b/java/impl/org/linphone/core/LinphoneCallImpl.java index 7e39cebc76663575642ae2de252421ffbf350b40..6a91438acf4ea8aaf80f3a4849fabae80bc8126d 100644 --- a/java/impl/org/linphone/core/LinphoneCallImpl.java +++ b/java/impl/org/linphone/core/LinphoneCallImpl.java @@ -174,6 +174,11 @@ class LinphoneCallImpl implements LinphoneCall { public float getPlayVolume() { return getPlayVolume(nativePtr); } + + private native String getRemoteUserAgent(long nativePtr); + public String getRemoteUserAgent() { + return getRemoteUserAgent(nativePtr); + } private native void takeSnapshot(long nativePtr, String path); public void takeSnapshot(String path) {