linphone_call_delete_ice_session(call);
linphone_call_stop_media_streams(call);
}
- linphone_core_start_invite(lc,call,NULL);
+ linphone_core_start_invite(lc,call);
}
if (call->state==LinphoneCallIncomingReceived){
elapsed=curtime-call->start_time;
}
if ((ice_ready == TRUE) && (ping_ready == TRUE)) {
- return linphone_core_start_invite(lc, call, dest_proxy);
+ return linphone_core_start_invite(lc, call);
}
return 0;
}
-int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call, LinphoneProxyConfig *dest_proxy){
+int linphone_core_start_invite(LinphoneCore *lc, LinphoneCall *call){
int err;
char *contact;
char *real_url,*barmsg;
char *from;
+ LinphoneProxyConfig *dest_proxy=call->dest_proxy;
/*try to be best-effort in giving real local or routable contact address */
contact=get_fixed_contact(lc,call,dest_proxy);
{
const char *route=NULL;
const char *from=NULL;
- LinphoneProxyConfig *proxy=NULL;
+ LinphoneProxyConfig *proxy=NULL,*dest_proxy=NULL;
LinphoneAddress *parsed_url2=NULL;
char *real_url=NULL;
- LinphoneProxyConfig *dest_proxy=NULL;
LinphoneCall *call;
bool_t use_ice = FALSE;
parsed_url2=linphone_address_new(from);
call=linphone_call_new_outgoing(lc,parsed_url2,linphone_address_clone(addr),params);
+ call->dest_proxy=dest_proxy;
sal_op_set_route(call->op,route);
if(linphone_core_add_call(lc,call)!= 0)
}
}
- if (dest_proxy==NULL && lc->sip_conf.ping_with_options==TRUE){
+ if (call->dest_proxy==NULL && lc->sip_conf.ping_with_options==TRUE){
/*defer the start of the call after the OPTIONS ping*/
call->ping_replied=FALSE;
call->ping_op=sal_op_new(lc->sal);
sal_op_set_user_pointer(call->ping_op,call);
call->start_time=time(NULL);
}else{
- if (use_ice==FALSE) linphone_core_start_invite(lc,call,dest_proxy);
+ if (use_ice==FALSE) linphone_core_start_invite(lc,call);
}
if (real_url!=NULL) ms_free(real_url);
**/
int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, const LinphoneCallParams *params)
{
- LinphoneProxyConfig *cfg=NULL,*dest_proxy=NULL;
+ LinphoneProxyConfig *cfg=NULL;
const char *contact=NULL;
SalOp *replaced;
SalMediaDescription *new_md;
}
linphone_core_get_default_proxy(lc,&cfg);
- dest_proxy=cfg;
- dest_proxy=linphone_core_lookup_known_proxy(lc,call->log->to);
+ call->dest_proxy=cfg;
+ call->dest_proxy=linphone_core_lookup_known_proxy(lc,call->log->to);
- if (cfg!=dest_proxy && dest_proxy!=NULL) {
+ if (cfg!=call->dest_proxy && call->dest_proxy!=NULL) {
ms_message("Overriding default proxy setting for this call:");
- ms_message("The used identity will be %s",linphone_proxy_config_get_identity(dest_proxy));
+ ms_message("The used identity will be %s",linphone_proxy_config_get_identity(call->dest_proxy));
}
/*try to be best-effort in giving real local or routable contact address*/
- contact=get_fixed_contact(lc,call,dest_proxy);
+ contact=get_fixed_contact(lc,call,call->dest_proxy);
if (contact)
sal_op_set_contact(call->op,contact);
void linphone_core_init_default_params(LinphoneCore*lc, LinphoneCallParams *params) {
params->has_video=linphone_core_video_enabled(lc) && lc->video_policy.automatically_initiate;
- params->media_encryption=linphone_core_get_media_encryption(lc);
+ params->media_encryption=linphone_core_get_media_encryption(lc);
params->in_conference=FALSE;
}