summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorScott Griepentrog <sgriepentrog@digium.com>2014-01-14 18:15:13 +0000
committerScott Griepentrog <sgriepentrog@digium.com>2014-01-14 18:15:13 +0000
commit5516cda6af555ad6eca7b4c8f9e0a1c23784c9df (patch)
tree122ec4cc98c8979d0e03fbfe0fcce1403ea1bf65 /channels/chan_sip.c
parent828f339a9cb52cdcb62c28962d87a5187dc7c5bc (diff)
chan_sip: fix Local From tag on outbound register regression
In ASTERISK-12117, an improvement to insure consistant local from tags on outbound registrations resulted in an undesirable behavior - caused by leftover unexpired sip_pvt dialogs (with the previous cseq number), resulting in many uncessary REGISTER requests. Instead of significant rework of transmit_register(), this change deletes the dialogs after a 200 OK response indiciating a successful registration, keeping the old dialogs from interfering with normal operation. (closes issue ASTERISK-22946) Reported by: Stephan Eisvogel Review: https://reviewboard.asterisk.org/r/3109/ ........ Merged revisions 405433 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 405434 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405435 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 42829297e..cc17ad3d3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23953,9 +23953,9 @@ static int handle_response_register(struct sip_pvt *p, int resp, const char *res
if (r->call)
r->call = dialog_unref(r->call, "unsetting registry->call pointer-- case 200");
p->registry = registry_unref(p->registry, "unref registry entry p->registry");
- /* Let this one hang around until we have all the responses */
- sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- /* p->needdestroy = 1; */
+
+ /* destroy dialog now to avoid interference with next register */
+ pvt_set_needdestroy(p, "Registration successfull");
/* set us up for re-registering
* figure out how long we got registered for