diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 5def5557f..b1ef86656 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -189,6 +189,11 @@ static void call_accepted(SalOp *op){ sal_media_description_ref(call->resultdesc); call->media_pending=FALSE; } + if (call->state==LinphoneCallOutgoingProgress || + call->state==LinphoneCallOutgoingRinging || + call->state==LinphoneCallOutgoingEarlyMedia){ + linphone_call_set_state(call,LinphoneCallConnected,"Connected"); + } if (call->resultdesc && !sal_media_description_empty(call->resultdesc)){ if (sal_media_description_has_dir(call->resultdesc,SalStreamSendOnly)){ /*we initiated a pause*/ @@ -200,14 +205,14 @@ static void call_accepted(SalOp *op){ ms_free(msg); } linphone_call_set_state(call,LinphoneCallPaused,"Call paused"); - linphone_call_start_media_streams (call); }else{ - linphone_connect_incoming(lc,call); - } + linphone_call_set_state(call,LinphoneCallStreamsRunning,"Connected (streams running)"); + } + linphone_call_start_media_streams (call); }else{ /*send a bye*/ ms_error("Incompatible SDP offer received in 200Ok, need to abort the call"); - linphone_core_terminate_call(lc,NULL); + linphone_core_abort_call(lc,call,"No codec intersection"); } } diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 7e8572461..6cf8725f3 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2145,6 +2145,7 @@ int linphone_core_accept_call(LinphoneCore *lc, LinphoneCall *call) call->resultdesc=sal_call_get_final_media_description(call->op); if (call->resultdesc){ linphone_call_start_media_streams(call); + linphone_call_set_state(call,LinphoneCallStreamsRunning,"Connected (streams running)"); sal_media_description_ref(call->resultdesc); }else call->media_pending=TRUE; ms_message("call answered."); diff --git a/oRTP b/oRTP index 534074027..a08462074 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 534074027a2163694ce6f8a520f0d6f6ac82b15d +Subproject commit a084620745b1b1c81ec93501ffbb3de373f7c8c9