[svn-commits] mmichelson: branch 1.4 r205877 - /branches/1.4/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 10 12:39:18 CDT 2009


Author: mmichelson
Date: Fri Jul 10 12:39:13 2009
New Revision: 205877

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205877
Log:
Merged revisions 205776 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r205776 | mmichelson | 2009-07-10 10:56:45 -0500 (Fri, 10 Jul 2009) | 16 lines
  
  Merged revisions 205775 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r205775 | mmichelson | 2009-07-10 10:51:36 -0500 (Fri, 10 Jul 2009) | 10 lines
    
    Ensure that outbound NOTIFY requests are properly routed through stateful proxies.
    
    With this change, we make note of Record-Route headers present in any SUBSCRIBE
    request that we receive so that our outbound NOTIFY requests will have the proper
    Route headers in them.
    
    (closes issue #14725)
    Reported by: ibc
  ........
................

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=205877&r1=205876&r2=205877
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Fri Jul 10 12:39:13 2009
@@ -2120,11 +2120,14 @@
 	* that were created via INVITE, then thru some sequence were CANCELED,
 	* to die, rather than infinitely be rescheduled */
 	if (p->packets && !ast_test_flag(&p->flags[0], SIP_NEEDDESTROY)) {
+		char method_str[30];
 		if (option_debug > 2)
 			ast_log(LOG_DEBUG, "Re-scheduled destruction of SIP call %s\n", p->callid ? p->callid : "<unknown>");
 		append_history(p, "ReliableXmit", "timeout");
-		if (p->method == SIP_CANCEL || p->method == SIP_BYE) {
-			ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+		if (sscanf(p->lastmsg, "Tx: %s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %s", method_str) == 1) {
+			if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str)) {
+				ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+			}
 		}
 		return 10000;
 	}
@@ -3665,7 +3668,10 @@
 		if (needcancel) {	/* Outgoing call, not up */
 			if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
 				/* stop retransmitting an INVITE that has not received a response */
-				__sip_pretend_ack(p);
+				struct sip_pkt *cur;
+				for (cur = p->packets; cur; cur = cur->next) {
+					__sip_semi_ack(p, cur->seqno, ast_test_flag(cur, FLAG_RESPONSE), cur->method ? cur->method : find_sip_method(cur->data));
+				}
 
 				/* if we can't send right now, mark it pending */
 				if (p->invitestate == INV_CALLING) {




More information about the svn-commits mailing list