mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 02:39:22 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
Conflicts: mediastreamer2 oRTP
This commit is contained in:
commit
514f67a88a
13 changed files with 4051 additions and 69 deletions
|
|
@ -237,6 +237,18 @@ const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const cha
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void write_auth_infos(LinphoneCore *lc){
|
||||
MSList *elem;
|
||||
int i;
|
||||
|
||||
if (!linphone_core_ready(lc)) return;
|
||||
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 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds authentication information to the LinphoneCore.
|
||||
*
|
||||
|
|
@ -273,6 +285,7 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
|
|||
}
|
||||
}
|
||||
ms_list_free(l);
|
||||
write_auth_infos(lc);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -287,18 +300,13 @@ void linphone_core_abort_authentication(LinphoneCore *lc, LinphoneAuthInfo *inf
|
|||
* Removes an authentication information object.
|
||||
**/
|
||||
void linphone_core_remove_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info){
|
||||
int i;
|
||||
MSList *elem;
|
||||
LinphoneAuthInfo *r;
|
||||
r=(LinphoneAuthInfo*)linphone_core_find_auth_info(lc,info->realm,info->username);
|
||||
if (r){
|
||||
lc->auth_info=ms_list_remove(lc->auth_info,r);
|
||||
/*printf("len=%i newlen=%i\n",len,newlen);*/
|
||||
linphone_auth_info_destroy(r);
|
||||
for (elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){
|
||||
linphone_auth_info_write_config(lc->config,(LinphoneAuthInfo*)elem->data,i);
|
||||
}
|
||||
linphone_auth_info_write_config(lc->config,NULL,i);
|
||||
write_auth_infos(lc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -194,24 +194,27 @@ static void call_received(SalOp *h){
|
|||
lc->vtable.display_status(lc,barmesg);
|
||||
|
||||
/* play the ring if this is the only call*/
|
||||
if (lc->sound_conf.ring_sndcard!=NULL && ms_list_size(lc->calls)==1){
|
||||
if (ms_list_size(lc->calls)==1){
|
||||
lc->current_call=call;
|
||||
if (lc->ringstream && lc->dmfs_playing_start_time!=0){
|
||||
ring_stop(lc->ringstream);
|
||||
lc->ringstream=NULL;
|
||||
lc->dmfs_playing_start_time=0;
|
||||
}
|
||||
if(lc->ringstream==NULL && lc->sound_conf.local_ring){
|
||||
MSSndCard *ringcard=lc->sound_conf.lsd_card ?lc->sound_conf.lsd_card : lc->sound_conf.ring_sndcard;
|
||||
ms_message("Starting local ring...");
|
||||
lc->ringstream=ring_start(lc->sound_conf.local_ring,2000,ringcard);
|
||||
}
|
||||
else
|
||||
{
|
||||
ms_message("the local ring is already started");
|
||||
if (lc->sound_conf.ring_sndcard!=NULL){
|
||||
if(lc->ringstream==NULL && lc->sound_conf.local_ring){
|
||||
MSSndCard *ringcard=lc->sound_conf.lsd_card ?lc->sound_conf.lsd_card : lc->sound_conf.ring_sndcard;
|
||||
ms_message("Starting local ring...");
|
||||
lc->ringstream=ring_start(lc->sound_conf.local_ring,2000,ringcard);
|
||||
}
|
||||
else
|
||||
{
|
||||
ms_message("the local ring is already started");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
/* play a tone within the context of the current call */
|
||||
/* else play a tone within the context of the current call */
|
||||
call->ringing_beep=TRUE;
|
||||
linphone_core_play_tone(lc);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,8 +129,12 @@ int linphone_core_add_to_conference(LinphoneCore *lc, LinphoneCall *call){
|
|||
linphone_core_resume_call(lc,call);
|
||||
else if (call->state==LinphoneCallStreamsRunning){
|
||||
/*this will trigger a reINVITE that will later redraw the streams */
|
||||
if (call->audiostream || call->videostream)
|
||||
if (call->audiostream || call->videostream){
|
||||
linphone_call_stop_media_streams (call); /*free the audio & video local resources*/
|
||||
}
|
||||
if (call==lc->current_call){
|
||||
lc->current_call=NULL;
|
||||
}
|
||||
linphone_core_update_call(lc,call,¶ms);
|
||||
add_local_endpoint(conf,lc);
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -351,7 +351,10 @@ static void linphone_call_set_terminated(LinphoneCall *call){
|
|||
linphone_core_notify_all_friends(lc,lc->presence_mode);
|
||||
|
||||
linphone_core_conference_check_uninit(&lc->conf_ctx);
|
||||
|
||||
if (call->ringing_beep){
|
||||
linphone_core_stop_dtmf(lc);
|
||||
call->ringing_beep=FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
const char *linphone_call_state_to_string(LinphoneCallState cs){
|
||||
|
|
@ -1205,9 +1208,9 @@ void linphone_call_stop_media_streams(LinphoneCall *call){
|
|||
video_stream_stop(call->videostream);
|
||||
call->videostream=NULL;
|
||||
}
|
||||
ms_event_queue_skip(call->core->msevq);
|
||||
|
||||
#endif
|
||||
ms_event_queue_skip(call->core->msevq);
|
||||
|
||||
if (call->audio_profile){
|
||||
rtp_profile_clear_all(call->audio_profile);
|
||||
rtp_profile_destroy(call->audio_profile);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
/*#define UNSTANDART_GSM_11K 1*/
|
||||
|
||||
#define ROOT_CA_FILE PACKAGE_DATA_DIR "/linphone/rootca.pem"
|
||||
|
||||
static const char *liblinphone_version=LIBLINPHONE_VERSION;
|
||||
static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t curtime);
|
||||
static void linphone_core_run_hooks(LinphoneCore *lc);
|
||||
|
|
@ -431,10 +433,10 @@ static void sound_config_read(LinphoneCore *lc)
|
|||
linphone_core_set_play_file(lc,lp_config_get_string(lc->config,"sound","hold_music",PACKAGE_SOUND_DIR "/" HOLD_MUSIC));
|
||||
check_sound_device(lc);
|
||||
lc->sound_conf.latency=0;
|
||||
#if !defined(TARGET_OS_IPHONE) && !defined(ANDROID)
|
||||
#ifndef __ios
|
||||
tmp=TRUE;
|
||||
#else
|
||||
tmp=FALSE;
|
||||
tmp=FALSE; /* on iOS we have builtin echo cancellation.*/
|
||||
#endif
|
||||
tmp=lp_config_get_int(lc->config,"sound","echocancellation",tmp);
|
||||
linphone_core_enable_echo_cancellation(lc,tmp);
|
||||
|
|
@ -514,7 +516,11 @@ static void sip_config_read(LinphoneCore *lc)
|
|||
ms_free(contact);
|
||||
}
|
||||
|
||||
#ifdef __linux
|
||||
sal_root_ca(lc->sal, lp_config_get_string(lc->config,"sip","root_ca", "/etc/ssl/certs"));
|
||||
#else
|
||||
sal_root_ca(lc->sal, lp_config_get_string(lc->config,"sip","root_ca", ROOT_CA_FILE));
|
||||
#endif
|
||||
|
||||
tmp=lp_config_get_int(lc->config,"sip","guess_hostname",1);
|
||||
linphone_core_set_guess_hostname(lc,tmp);
|
||||
|
|
@ -831,6 +837,7 @@ bool_t linphone_core_rtcp_enabled(const LinphoneCore *lc){
|
|||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -848,6 +855,7 @@ void linphone_core_set_download_bandwidth(LinphoneCore *lc, int 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1495,6 +1503,12 @@ int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports * t
|
|||
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);
|
||||
}
|
||||
|
|
@ -2304,6 +2318,10 @@ int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call)
|
|||
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;
|
||||
|
|
@ -2361,10 +2379,6 @@ static void terminate_call(LinphoneCore *lc, LinphoneCall *call){
|
|||
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") );
|
||||
|
|
@ -3686,11 +3700,14 @@ void linphone_core_set_record_file(LinphoneCore *lc, const char *file){
|
|||
|
||||
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;
|
||||
|
|
@ -3739,7 +3756,7 @@ void linphone_core_play_tone(LinphoneCore *lc){
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
@ -3845,8 +3862,6 @@ int linphone_core_get_current_call_stats(LinphoneCore *lc, rtp_stats_t *local, r
|
|||
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);
|
||||
|
|
@ -3869,9 +3884,7 @@ void sip_config_uninit(LinphoneCore *lc)
|
|||
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);
|
||||
|
|
@ -3881,15 +3894,12 @@ void sip_config_uninit(LinphoneCore *lc)
|
|||
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);
|
||||
|
|
@ -3906,11 +3916,6 @@ void sip_config_uninit(LinphoneCore *lc)
|
|||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ struct _LinphoneCall
|
|||
bool_t all_muted; /*this flag is set during early medias*/
|
||||
bool_t playing_ringbacktone;
|
||||
bool_t owns_call_log;
|
||||
bool_t pad;
|
||||
bool_t ringing_beep; /* whether this call is ringing through an already existent current call*/
|
||||
OrtpEvQueue *audiostream_app_evq;
|
||||
char *auth_token;
|
||||
OrtpEvQueue *videostream_app_evq;
|
||||
|
|
|
|||
|
|
@ -31,10 +31,15 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org)
|
|||
void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc){
|
||||
MSList *elem;
|
||||
int i;
|
||||
if (!linphone_core_ready(lc)) return;
|
||||
|
||||
for(elem=lc->sip_conf.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);
|
||||
}
|
||||
/*to ensure removed configs are erased:*/
|
||||
linphone_proxy_config_write_to_config_file(lc->config,NULL,i);
|
||||
lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
|
||||
}
|
||||
|
||||
void linphone_proxy_config_init(LinphoneProxyConfig *obj){
|
||||
|
|
@ -536,6 +541,7 @@ void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cf
|
|||
if (lc->default_proxy==cfg){
|
||||
lc->default_proxy=NULL;
|
||||
}
|
||||
linphone_proxy_config_write_all_to_config_file(lc);
|
||||
}
|
||||
/**
|
||||
* Erase all proxies from config.
|
||||
|
|
@ -548,6 +554,7 @@ void linphone_core_clear_proxy_config(LinphoneCore *lc){
|
|||
linphone_core_remove_proxy_config(lc,(LinphoneProxyConfig *)list->data);
|
||||
}
|
||||
ms_list_free(list);
|
||||
linphone_proxy_config_write_all_to_config_file(lc);
|
||||
}
|
||||
/**
|
||||
* Sets the default proxy.
|
||||
|
|
@ -566,7 +573,8 @@ void linphone_core_set_default_proxy(LinphoneCore *lc, LinphoneProxyConfig *conf
|
|||
}
|
||||
}
|
||||
lc->default_proxy=config;
|
||||
|
||||
if (linphone_core_ready(lc))
|
||||
lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
|
||||
}
|
||||
|
||||
void linphone_core_set_default_proxy_index(LinphoneCore *lc, int index){
|
||||
|
|
|
|||
|
|
@ -755,7 +755,6 @@ void linphone_gtk_decline_clicked(GtkWidget *button){
|
|||
void linphone_gtk_answer_clicked(GtkWidget *button){
|
||||
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
|
||||
if (call){
|
||||
linphone_core_pause_all_calls(linphone_gtk_get_core());
|
||||
linphone_core_accept_call(linphone_gtk_get_core(),call);
|
||||
linphone_gtk_show_main_window(); /* useful when the button is clicked on a notification */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,24 +145,6 @@ void linphone_gtk_ipv6_toggled(GtkWidget *w){
|
|||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
|
||||
}
|
||||
|
||||
/* void linphone_gtk_udp_sip_port_changed(GtkWidget *w){
|
||||
LCSipTransports tr;
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
|
||||
linphone_core_get_sip_transports(lc,&tr);
|
||||
tr.udp_port = (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w));
|
||||
linphone_core_set_sip_transports(lc,&tr);
|
||||
}
|
||||
|
||||
void linphone_gtk_tcp_sip_port_changed(GtkWidget *w){
|
||||
LCSipTransports tr;
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
|
||||
linphone_core_get_sip_transports(lc,&tr);
|
||||
tr.tcp_port = (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w));
|
||||
linphone_core_set_sip_transports(lc,&tr);
|
||||
} */
|
||||
|
||||
void linphone_gtk_audio_port_changed(GtkWidget *w){
|
||||
linphone_core_set_audio_port(linphone_gtk_get_core(),
|
||||
(gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 9e0fbb21184fcf9396efc444c20d04408500f0d8
|
||||
Subproject commit 5429d344adf0775fa70e2696bff3f54057191143
|
||||
2
oRTP
2
oRTP
|
|
@ -1 +1 @@
|
|||
Subproject commit 5b0d57bb3de5ff1ac1bda6ca5d48f9b1df4047a7
|
||||
Subproject commit c51e20cc0c34db562754b5b7fe9be3bada83cd26
|
||||
|
|
@ -29,8 +29,13 @@ linphone_fd_DATA= linphone.desktop
|
|||
pkgconfigdir=$(libdir)/pkgconfig
|
||||
pkgconfig_DATA=linphone.pc
|
||||
|
||||
linphonedir=$(datadir)/linphone
|
||||
linphone_DATA=rootca.pem
|
||||
|
||||
EXTRA_DIST = $(LINPHONE_SOUNDS) \
|
||||
$(LINPHONE_RINGS) \
|
||||
linphone.desktop.in \
|
||||
linphone.pc.in \
|
||||
Makefile.inc
|
||||
Makefile.inc \
|
||||
rootca.pem
|
||||
|
||||
|
|
|
|||
3965
share/rootca.pem
Normal file
3965
share/rootca.pem
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue