diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 3f0ac8114..bde6a2f40 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -561,16 +561,18 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de int i; ms_message("Outgoing call failed with SRTP (SAVP) enabled - retrying with AVP"); linphone_call_stop_media_streams(call); - /* clear SRTP local params */ - call->params.media_encryption = LinphoneMediaEncryptionNone; - for(i=0; ilocaldesc->nstreams; i++) { - call->localdesc->streams[i].proto = SalProtoRtpAvp; - memset(call->localdesc->streams[i].crypto, 0, sizeof(call->localdesc->streams[i].crypto)); + if (call->state==LinphoneCallOutgoingInit || call->state==LinphoneCallOutgoingProgress){ + /* clear SRTP local params */ + call->params.media_encryption = LinphoneMediaEncryptionNone; + for(i=0; ilocaldesc->nstreams; i++) { + call->localdesc->streams[i].proto = SalProtoRtpAvp; + memset(call->localdesc->streams[i].crypto, 0, sizeof(call->localdesc->streams[i].crypto)); + } + linphone_core_start_invite(lc, call, NULL); } - linphone_core_start_invite(lc, call, NULL); return; } - msg=_("No common codecs"); + msg=_("Incompatible media parameters."); if (lc->vtable.display_status) lc->vtable.display_status(lc,msg); break;