diff options
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index cbd2afac..a6264f3a 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -885,6 +885,14 @@ on_return: next = answer->next; pjsua_call_answer(call_id, answer->code, answer->reason, answer->msg_data); + + /* Call might have been disconnected if application is answering + * with 200/OK and the media failed to start. + * See pjsua_call_answer() below. + */ + if (!call->inv || !call->inv->pool_prov) + break; + pj_list_erase(answer); answer = next; } |