diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 853760bcb..be6923cc5 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -2638,10 +2638,18 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setUseSipInfoForDtmfs(JN linphone_core_set_use_info_for_dtmf((LinphoneCore *)lc, (bool) use); } +extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_getUseSipInfoForDtmfs(JNIEnv *env, jobject thiz, jlong lc){ + return linphone_core_get_use_info_for_dtmf((LinphoneCore *)lc); +} + extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setUseRfc2833ForDtmfs(JNIEnv *env, jobject thiz, jlong lc, jboolean use){ linphone_core_set_use_rfc2833_for_dtmf((LinphoneCore *)lc, (bool) use); } +extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_getUseRfc2833ForDtmfs(JNIEnv *env, jobject thiz, jlong lc){ + return (jboolean) linphone_core_get_use_rfc2833_for_dtmf((LinphoneCore *)lc); +} + extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDownloadPtime(JNIEnv *env, jobject thiz, jlong lc, jint ptime){ linphone_core_set_download_ptime((LinphoneCore *)lc, (int) ptime); } diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 9cf3adf9e..91ada7ac3 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -1316,10 +1316,20 @@ public interface LinphoneCore { */ void setUseSipInfoForDtmfs(boolean use); + /** + * Returns the state of use of SIP INFO for DTMFs + */ + boolean getUseSipInfoForDtmfs(); + /** * Enable/Disable the use of inband DTMFs */ void setUseRfc2833ForDtmfs(boolean use); + + /** + * Returns the state of use of inband DTMFs + */ + boolean getUseRfc2833ForDtmfs(); /** * @return returns LpConfig object to read/write to the config file: usefull if you wish to extend diff --git a/java/impl/org/linphone/core/LinphoneCoreImpl.java b/java/impl/org/linphone/core/LinphoneCoreImpl.java index 2096ea3ee..f41d9a973 100644 --- a/java/impl/org/linphone/core/LinphoneCoreImpl.java +++ b/java/impl/org/linphone/core/LinphoneCoreImpl.java @@ -924,10 +924,20 @@ class LinphoneCoreImpl implements LinphoneCore { setUseSipInfoForDtmfs(nativePtr, use); } + private native boolean getUseSipInfoForDtmfs(long ptr); + public synchronized boolean getUseSipInfoForDtmfs() { + return getUseSipInfoForDtmfs(nativePtr); + } + private native void setUseRfc2833ForDtmfs(long ptr, boolean use); public synchronized void setUseRfc2833ForDtmfs(boolean use) { setUseRfc2833ForDtmfs(nativePtr, use); } + + private native boolean getUseRfc2833ForDtmfs(long ptr); + public synchronized boolean getUseRfc2833ForDtmfs() { + return getUseRfc2833ForDtmfs(nativePtr); + } private native long getConfig(long ptr); public synchronized LpConfig getConfig() {