diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index ca6230b46..e80c85dea 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -2583,6 +2583,23 @@ extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setPrivacy(JNIEnv* linphone_call_params_set_privacy((LinphoneCallParams*)cp,privacy); } +extern "C" jstring Java_org_linphone_core_LinphoneCallParamsImpl_getSessionName(JNIEnv* env + ,jobject thiz + ,jlong cp + ) { + const char* name = linphone_call_params_get_session_name((LinphoneCallParams*)cp); + return name ? env->NewStringUTF(name) : NULL; +} + +extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setSessionName(JNIEnv* env + ,jobject thiz + ,jlong cp + ,jstring jname) { + const char *name = jname ? env->GetStringUTFChars(jname,NULL) : NULL; + linphone_call_params_set_session_name((LinphoneCallParams*)cp,name); + if (name) env->ReleaseStringUTFChars(jname,name); +} + extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_audioBandwidth(JNIEnv *env, jobject thiz, jlong lcp, jint bw){ linphone_call_params_set_audio_bandwidth_limit((LinphoneCallParams*)lcp, bw); } diff --git a/java/common/org/linphone/core/LinphoneCallParams.java b/java/common/org/linphone/core/LinphoneCallParams.java index 530cf63b9..86dd1ea4b 100644 --- a/java/common/org/linphone/core/LinphoneCallParams.java +++ b/java/common/org/linphone/core/LinphoneCallParams.java @@ -105,4 +105,15 @@ public interface LinphoneCallParams { * @return the privacy mask as defined in interface {@link org.linphone.core.Privacy} */ int getPrivacy(); + + /** + * Set the session name of the media session (ie in SDP). Subject from the SIP message can be retrieved using linphone_call_params_get_custom_header(). + * @param name the session name + **/ + void setSessionName(String name); + /** + * Get the session name of the media session (ie in SDP). Subject from the SIP message can be retrieved using linphone_call_params_get_custom_header(). + * @return the session name + **/ + String getSessionName(); }