diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 0903e83a5..15e9e422b 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5579,10 +5579,11 @@ static MSFilter *get_audio_resource(LinphoneCore *lc, LinphoneAudioResourceType if (rtype==LinphoneLocalPlayer) return stream->local_player; return NULL; } - if (card || lc->ringstream == NULL) { - if (lc->ringstream) + if (card && lc->ringstream && card != lc->ringstream->card){ ring_stop(lc->ringstream); - + lc->ringstream = NULL; + } + if (lc->ringstream == NULL) { float amp=lp_config_get_float(lc->config,"sound","dtmf_player_amp",0.1f); MSSndCard *ringcard=lc->sound_conf.lsd_card ? lc->sound_conf.lsd_card