[sr-dev] git:master: dialog: if ACK for 200ok is not coming in 60sec, dialog lifetime is shortened for 10 more sec

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 5 12:21:23 CEST 2014


Module: sip-router
Branch: master
Commit: ca3da467f59dbaed2d20aa45314ac12a362e2deb
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ca3da467f59dbaed2d20aa45314ac12a362e2deb

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Jul 30 15:58:27 2014 +0200

dialog: if ACK for 200ok is not coming in 60sec, dialog lifetime is shortened for 10 more sec

- should handle the situation when caller cancels the call but the
  callee answered before getting the cancel
- reported by Alex Balashov

---

 modules/dialog/dlg_hash.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c
index 04807a1..8220104 100644
--- a/modules/dialog/dlg_hash.c
+++ b/modules/dialog/dlg_hash.c
@@ -249,6 +249,13 @@ int dlg_clean_run(ticks_t ti)
 				unlink_unsafe_dlg(&d_table->entries[i], tdlg);
 				destroy_dlg(tdlg);
 			}
+			if(tdlg->state==DLG_STATE_CONFIRMED_NA && tdlg->start_ts<tm-60) {
+				if(update_dlg_timer(&dlg->tl, 10)<0) {
+					LM_ERR("failed to update dialog lifetime in long non-ack state\n");
+				}
+				dlg->lifetime = 10;
+				dlg->dflags |= DLG_FLAG_CHANGED;
+			}
 		}
 		lock_set_release(d_table->locks, d_table->entries[i].lock_idx);
 	}




More information about the sr-dev mailing list