From 6296c1b7e9a239dace9a5ac6bbe2c4ddf2262ac0 Mon Sep 17 00:00:00 2001 From: pickme467 Date: Wed, 2 Mar 2022 17:18:17 +0100 Subject: [PATCH 1/3] Dont resend BYE in INVITE bye state. --- src/nksip_call_dialog.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nksip_call_dialog.erl b/src/nksip_call_dialog.erl index 8f622e9f..4c901c66 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 -> ?CALL_LOG(notice, "Dialog ~s (~p) timeout timer fired", [DialogId, Invite#invite.status], Call), case Class of proxy -> @@ -590,6 +590,9 @@ do_timer(invite_timeout, #dialog{id=DialogId, invite=Invite}=Dialog, Call) -> update({invite, {stop, timeout}}, Dialog, Call) end end; + #invite{class=Class, status=bye} -> + ?CALL_LOG(warning, "Timeout in bye state - end the dialog ~p", [DialogId], Call), + update({invite, {stop, timeout}}, Dialog, Call); _ -> ?CALL_LOG(notice, "Dialog ~s unknown INVITE timeout timer", [DialogId], Call), Call From 7792f5f235a55235d8f6f7850a609bb1c6e77335 Mon Sep 17 00:00:00 2001 From: pickme467 Date: Tue, 19 Apr 2022 20:46:42 +0200 Subject: [PATCH 2/3] Invite timeout is ignored in proceeding states. --- src/nksip_call_dialog.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nksip_call_dialog.erl b/src/nksip_call_dialog.erl index 4c901c66..e1ff41a3 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, status=Status} when Status /= bye -> + #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,9 +590,12 @@ do_timer(invite_timeout, #dialog{id=DialogId, invite=Invite}=Dialog, Call) -> update({invite, {stop, timeout}}, Dialog, Call) end end; - #invite{class=Class, status=bye} -> + #invite{status=bye} -> ?CALL_LOG(warning, "Timeout in bye state - end the dialog ~p", [DialogId], Call), update({invite, {stop, timeout}}, Dialog, Call); + #invite{status=proceeding_uac} -> + ?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 From 9ddc44535760121e1ad1f6171fead65c6f200f8e Mon Sep 17 00:00:00 2001 From: pickme467 Date: Wed, 20 Apr 2022 09:09:01 +0200 Subject: [PATCH 3/3] Notice about ignoring invite timeout for proceeding_uas. --- src/nksip_call_dialog.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nksip_call_dialog.erl b/src/nksip_call_dialog.erl index e1ff41a3..cd3f1fd7 100644 --- a/src/nksip_call_dialog.erl +++ b/src/nksip_call_dialog.erl @@ -593,7 +593,7 @@ do_timer(invite_timeout, #dialog{id=DialogId, invite=Invite}=Dialog, Call) -> #invite{status=bye} -> ?CALL_LOG(warning, "Timeout in bye state - end the dialog ~p", [DialogId], Call), update({invite, {stop, timeout}}, Dialog, Call); - #invite{status=proceeding_uac} -> + #invite{status=Status} when Status == proceeding_uac; Status == proceeding_uas -> ?CALL_LOG(notice, "Dialog ~s timeout in proceeding state - ignored", [DialogId], Call), Call; _ ->