}
return "unknown error";
}
-
+/**
+ * enable signaling keep alive
+ */
+void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable) {
+ if (enable > 0) {
+ sal_set_keepalive_period(lc->sal,lc->sip_conf.keepalive_period);
+ } else {
+ sal_set_keepalive_period(lc->sal,0);
+ }
+}
+/**
+ * Is signaling keep alive
+ */
+bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc) {
+ return sal_get_keepalive_period(lc->sal) > 0;
+}
*/
bool_t linphone_core_is_network_reachabled(LinphoneCore* lc);
+/**
+ * enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
+ */
+void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable);
+/**
+ * Is signaling keep alive
+ */
+bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc);
void *linphone_core_get_user_data(LinphoneCore *lc);
return NULL;
}
}
+extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableKeepAlive(JNIEnv* env
+ ,jobject thiz
+ ,jlong lc
+ ,jboolean enable) {
+ linphone_core_enable_keep_alive((LinphoneCore*)lc,enable);
+}
+extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isKeepAliveEnabled(JNIEnv* env
+ ,jobject thiz
+ ,jlong lc) {
+ return linphone_core_keep_alive_enabled((LinphoneCore*)lc);
+}
//ProxyConfig
extern "C" jlong Java_org_linphone_core_LinphoneProxyConfigImpl_newLinphoneProxyConfig(JNIEnv* env,jobject thiz) {
void sal_set_user_agent(Sal *ctx, const char *user_agent);
/*keepalive period in ms*/
void sal_set_keepalive_period(Sal *ctx,unsigned int value);
+/**
+ * returns keepalive period in ms
+ * 0 desactiaved
+ * */
+unsigned int sal_get_keepalive_period(Sal *ctx);
void sal_use_session_timers(Sal *ctx, int expires);
void sal_use_one_matching_codec_policy(Sal *ctx, bool_t one_matching_codec);
int sal_iterate(Sal *sal);
ctx->keepalive_period=value;
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE, &value);
}
+unsigned int sal_get_keepalive_period(Sal *ctx) {
+ return ctx->keepalive_period;
+}
const char * sal_address_get_port(const SalAddress *addr) {
const osip_from_t *u=(const osip_from_t*)addr;
public VideoSize getPreferredVideoSize();
public PayloadType[] listVideoCodecs();
-
+ /**
+ * enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
+ */
+ void enableKeepAlive(boolean enable);
+ /**
+ * get keep elive mode
+ * @return true if enable
+ */
+ boolean isKeepAliveEnabled();
}