linphone_call_set_state (call,prevstate,"Connected (streams running)");
}
}
- if (lc->current_call==NULL) linphone_core_start_pending_refered_calls (lc);
}
static void call_terminated(SalOp *op, const char *from){
lc->vtable.display_status(lc,msg);
ms_free(msg);
}
- if (lc->current_call==NULL) linphone_core_start_pending_refered_calls (lc);
+ if (call->state!=LinphoneCallPaused){
+ ms_message("Automatically pausing current call to accept transfer.");
+ linphone_core_pause_call(lc,call);
+ }
+ linphone_core_start_refered_call(lc,call);
sal_call_accept_refer(op);
}else if (lc->vtable.refer_received){
lc->vtable.refer_received(lc,referto);
if (call == lc->current_call){
ms_message("Resetting the current call");
lc->current_call=NULL;
- linphone_core_start_pending_refered_calls(lc);
}
if (linphone_core_del_call(lc,call) != 0){
return route;
}
-void linphone_core_start_pending_refered_calls(LinphoneCore *lc){
- MSList *elem;
- for(elem=lc->calls;elem!=NULL;elem=elem->next){
- LinphoneCall *call=(LinphoneCall*)elem->data;
- if (call->refer_pending){
- LinphoneCallParams *cp=linphone_core_create_default_call_parameters(lc);
- cp->referer=call;
- ms_message("Starting new call to refered address %s",call->refer_to);
- call->refer_pending=FALSE;
- linphone_core_invite_with_params(lc,call->refer_to,cp);
- linphone_call_params_destroy(cp);
- break;
- }
+void linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call){
+ if (call->refer_pending){
+ LinphoneCallParams *cp=linphone_core_create_default_call_parameters(lc);
+ cp->referer=call;
+ ms_message("Starting new call to refered address %s",call->refer_to);
+ call->refer_pending=FALSE;
+ linphone_core_invite_with_params(lc,call->refer_to,cp);
+ linphone_call_params_destroy(cp);
}
}
lc->current_call=NULL;
if (call->audiostream || call->videostream)
linphone_call_stop_media_streams (call);
- linphone_core_start_pending_refered_calls(lc);
return 0;
}
void linphone_core_stop_waiting(LinphoneCore *lc);
int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphoneProxyConfig *dest_proxy);
-void linphone_core_start_pending_refered_calls(LinphoneCore *lc);
+void linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *call);
extern SalCallbacks linphone_sal_callbacks;
void linphone_proxy_config_set_error(LinphoneProxyConfig *cfg,LinphoneError error);
ms_message("Failed to send publish request.");
return -1;
}
+ sal_add_other(sal_op_get_sal(op),op,pub);
return 0;
}
-Subproject commit bf8706f50f26e17b3ecc1501e70b712ec11d0dc3
+Subproject commit dcf3eba1afa5615cb01b52b1136d8aa0d224aca2