[asterisk-commits] dvossel: branch 1.6.2 r283691 - in /branches/1.6.2: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 26 10:24:44 CDT 2010


Author: dvossel
Date: Thu Aug 26 10:24:40 2010
New Revision: 283691

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=283691
Log:
Merged revisions 283690 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r283690 | dvossel | 2010-08-26 10:22:28 -0500 (Thu, 26 Aug 2010) | 19 lines
  
  Fixed how Asterisk destroys a dialog on channel hangup before invite receives a response.
  
  If an ast_channel with a SIP tech pvt hangs up before the sip dialog gets a response
  to its outgoing INVITE, Asterisk used to pretend_ack the INVITE.  This is not rfc
  compliant and results in confusion at the other endpoint.  sip_pretend_ack will ack
  and remove all the packets in the retransmit queue.  This means that the INVITE will
  stop retransmitting, and that any response to that INVITE that comes after the pretend_ack
  occurs will be ignored.
  
  Instead of faking any sort of acknowledgement for an outgoing INVITE during an internal
  hangup, we should let the protocol stack process the INVITE transaction and terminate
  the dialog properly.  This is achieved by setting the PENDING_BYE flag.  When this flag
  is used, once the dialog proceeds to an escapable state the transaction will either be
  canceled with a SIP_CANCEL or completed followed immediately by a BYE.  Attempting to do
  this any other way is incorrect.  If the endpoint is not responding to the INVITE request,
  the INVITE must continue to be retransmitted until it times out which will result in the
  dialog being destroyed.
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_sip.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Aug 26 10:24:40 2010
@@ -1,1 +1,1 @@
-/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380
+/branches/1.4:1-279056,279206,279945,280088,280341,280448,280811,280982,281390,281566,281762,281819,281911,282129,282430,282729,282893,283048,283123,283380,283690

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=283691&r1=283690&r2=283691
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Thu Aug 26 10:24:40 2010
@@ -6109,7 +6109,6 @@
 				if (p->invitestate == INV_CALLING) {
 					/* We can't send anything in CALLING state */
 					ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
-					__sip_pretend_ack(p);
 					/* Do we need a timer here if we don't hear from them at all? Yes we do or else we will get hung dialogs and those are no fun. */
 					sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 					append_history(p, "DELAY", "Not sending cancel, waiting for timeout");




More information about the asterisk-commits mailing list