*/
void linphone_core_set_download_bandwidth(LinphoneCore *lc, int bw){
lc->net_conf.download_bw=bw;
+ if (linphone_core_ready(lc)) lp_config_set_int(lc->config,"net","download_bw",bw);
}
/**
*/
void linphone_core_set_upload_bandwidth(LinphoneCore *lc, int bw){
lc->net_conf.upload_bw=bw;
+ if (linphone_core_ready(lc)) lp_config_set_int(lc->config,"net","upload_bw",bw);
}
/**
return 0;
memcpy(&lc->sip_conf.transports,tr,sizeof(*tr));
+ if (linphone_core_ready(lc)){
+ lp_config_set_int(lc->config,"sip","sip_port",tr->udp_port);
+ lp_config_set_int(lc->config,"sip","sip_tcp_port",tr->tcp_port);
+ lp_config_set_int(lc->config,"sip","sip_tls_port",tr->tls_port);
+ }
+
if (lc->sal==NULL) return 0;
return apply_transports(lc);
}
ms_message("ring stopped");
lc->ringstream=NULL;
}
+ if (call->ringing_beep){
+ linphone_core_stop_dtmf(lc);
+ call->ringing_beep=FALSE;
+ }
linphone_core_get_default_proxy(lc,&cfg);
dest_proxy=cfg;
lc->ringstream=NULL;
}
- /*stop any dtmf tone still playing */
- ms_message("test");
- linphone_core_stop_dtmf(lc);
-
linphone_call_stop_media_streams(call);
if (lc->vtable.display_status!=NULL)
lc->vtable.display_status(lc,_("Call ended") );
static MSFilter *get_dtmf_gen(LinphoneCore *lc){
LinphoneCall *call=linphone_core_get_current_call (lc);
+ AudioStream *stream=NULL;
if (call){
- AudioStream *stream=call->audiostream;
- if (stream){
- return stream->dtmfgen;
- }
+ stream=call->audiostream;
+ }else if (linphone_core_is_in_conference(lc)){
+ stream=lc->conf_ctx.local_participant;
+ }
+ if (stream){
+ return stream->dtmfgen;
}
if (lc->ringstream==NULL){
float amp=0.1;
def.duration=300;
def.frequency=500;
def.amplitude=1;
- def.interval=800;
+ def.interval=2000;
ms_filter_call_method(f, MS_DTMF_GEN_PLAY_CUSTOM,&def);
}
void net_config_uninit(LinphoneCore *lc)
{
net_config_t *config=&lc->net_conf;
- lp_config_set_int(lc->config,"net","download_bw",config->download_bw);
- lp_config_set_int(lc->config,"net","upload_bw",config->upload_bw);
if (config->stun_server!=NULL){
lp_config_set_string(lc->config,"net","stun_server",config->stun_server);
MSList *elem;
int i;
sip_config_t *config=&lc->sip_conf;
- lp_config_set_int(lc->config,"sip","sip_port",config->transports.udp_port);
- lp_config_set_int(lc->config,"sip","sip_tcp_port",config->transports.tcp_port);
- lp_config_set_int(lc->config,"sip","sip_tls_port",config->transports.tls_port);
+
lp_config_set_int(lc->config,"sip","guess_hostname",config->guess_hostname);
lp_config_set_string(lc->config,"sip","contact",config->contact);
lp_config_set_int(lc->config,"sip","inc_timeout",config->inc_timeout);
lp_config_set_int(lc->config,"sip","register_only_when_network_is_up",config->register_only_when_network_is_up);
- lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
+
for(elem=config->proxies,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)(elem->data);
- linphone_proxy_config_write_to_config_file(lc->config,cfg,i);
linphone_proxy_config_edit(cfg); /* to unregister */
}
- /*to ensure remove configs are erased:*/
- linphone_proxy_config_write_to_config_file(lc->config,NULL,i);
for (i=0;i<20;i++){
sal_iterate(lc->sal);
linphone_proxy_config_write_to_config_file(lc->config,NULL,i); /*mark the end */
- for(elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
- LinphoneAuthInfo *ai=(LinphoneAuthInfo*)(elem->data);
- linphone_auth_info_write_config(lc->config,ai,i);
- }
- linphone_auth_info_write_config(lc->config,NULL,i); /* mark the end */
ms_list_for_each(lc->auth_info,(void (*)(void*))linphone_auth_info_destroy);
ms_list_free(lc->auth_info);
lc->auth_info=NULL;