diff --git a/src/nksip_call_dialog.erl b/src/nksip_call_dialog.erl index 8f622e9f..cd3f1fd7 100644 --- a/src/nksip_call_dialog.erl +++ b/src/nksip_call_dialog.erl @@ -571,7 +571,7 @@ do_timer(invite_refresh, #dialog{invite=Invite}=Dialog, Call) -> do_timer(invite_timeout, #dialog{id=DialogId, invite=Invite}=Dialog, Call) -> case Invite of - #invite{class=Class} -> + #invite{class=Class, status=Status} when Status /= bye, Status /= proceeding_uac, Status /= proceeding_uas -> ?CALL_LOG(notice, "Dialog ~s (~p) timeout timer fired", [DialogId, Invite#invite.status], Call), case Class of proxy -> @@ -590,6 +590,12 @@ do_timer(invite_timeout, #dialog{id=DialogId, invite=Invite}=Dialog, Call) -> update({invite, {stop, timeout}}, Dialog, Call) end end; + #invite{status=bye} -> + ?CALL_LOG(warning, "Timeout in bye state - end the dialog ~p", [DialogId], Call), + update({invite, {stop, timeout}}, Dialog, Call); + #invite{status=Status} when Status == proceeding_uac; Status == proceeding_uas -> + ?CALL_LOG(notice, "Dialog ~s timeout in proceeding state - ignored", [DialogId], Call), + Call; _ -> ?CALL_LOG(notice, "Dialog ~s unknown INVITE timeout timer", [DialogId], Call), Call