}
lc->zrtp_secrets_cache=file ? ms_strdup(file) : NULL;
}
+
+// if (stringUri.equals(call.getRemoteAddress().asStringUriOnly())) {
+const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri) {
+ if (uri == NULL) return NULL;
+ MSList *calls=lc->calls;
+ while(calls) {
+ const LinphoneCall *c=(LinphoneCall*)calls->data;
+ calls=calls->next;
+ const LinphoneAddress *address = linphone_call_get_remote_address(c);
+ char *current_uri=linphone_address_as_string_uri_only(address);
+ if (strcmp(uri,current_uri)==0) {
+ ms_free(current_uri);
+ return c;
+ } else {
+ ms_free(current_uri);
+ }
+ }
+ return NULL;
+}
const char* linphone_call_get_authentication_token(LinphoneCall *call);
bool_t linphone_call_get_authentication_token_verified(LinphoneCall *call);
+const LinphoneCall* linphone_core_find_call_from_uri(LinphoneCore *lc, const char *uri);
+
int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call);
int linphone_core_add_all_to_conference(LinphoneCore *lc);
int linphone_core_remove_from_conference(LinphoneCore *lc, LinphoneCall *call);
}
}
+extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_findCallFromUri(JNIEnv *env,jobject thiz,jlong pCore, jstring jUri) {
+ const char* cUri=env->GetStringUTFChars(jUri, NULL);
+ const LinphoneCall *call=linphone_core_find_call_from_uri((LinphoneCore *) pCore,cUri);
+ env->ReleaseStringUTFChars(jUri, cUri);
+ return (jlong) call;
+}
+
+
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_setVideoDevice(JNIEnv *env,jobject thiz,jlong pCore,jint id) {
LinphoneCore* lc = (LinphoneCore *) pCore;
const char** devices = linphone_core_get_video_devices(lc);
}
SalOp *sal_call_get_replaces(SalOp *h){
- if (h->replaces!=NULL){
+ if (h!=NULL && h->replaces!=NULL){
int cid;
eXosip_lock();
cid=eXosip_call_find_by_replaces(h->replaces);
void transferCall(LinphoneCall call, String referTo);
void transferCallToAnother(LinphoneCall callToTransfer, LinphoneCall destination);
+
+ LinphoneCall findCallFromUri(String uri);
}