[asterisk-commits] mmichelson: branch 1.6.0 r193960 - in /branches/1.6.0: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 12 15:50:36 CDT 2009


Author: mmichelson
Date: Tue May 12 15:50:30 2009
New Revision: 193960

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

........
  r193954 | mmichelson | 2009-05-12 15:28:13 -0500 (Tue, 12 May 2009) | 18 lines
  
  Update spiral support in trunk and 1.6.X to match what is in 1.4.
  
  In 1.4, a SIP spiral is treated the same way as a call forward. This
  works much better than what is currently in trunk and 1.6.X. The code
  in trunk and 1.6.X did not create a new call to the recipient of the spiral,
  instead trying to continue the same call. In addition to just being plain
  wrong, this also had the side effect of only being able to spiral calls
  to other SIP channels.
  
  With this in place, as long as call forwards are honored, SIP spirals
  will work properly. This means that it will work for outbound calls
  made  by the Queue, Dial, and Page applications. For originated calls and
  spool calls, however, the spiral will not work properly until a generic
  call forward mechanism is introduced into Asterisk.
  
  (relates to issue #13630)
........

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

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=193960&r1=193959&r2=193960
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue May 12 15:50:30 2009
@@ -17038,10 +17038,7 @@
 			char *uri = ast_strdupa(req->rlPart2);
 			char *at = strchr(uri, '@');
 			char *peerorhost;
-			struct sip_pkt *pkt = NULL;
-			if (option_debug > 2) {
-				ast_log(LOG_DEBUG, "Potential spiral detected. Original RURI was %s, new RURI is %s\n", p->initreq.rlPart2, req->rlPart2);
-			}
+			ast_debug(3, "Potential spiral detected. Original RURI was %s, new RURI is %s\n", p->initreq.rlPart2, req->rlPart2);
 			if (at) {
 				*at = '\0';
 			}
@@ -17049,14 +17046,12 @@
 			if ((peerorhost = strchr(uri, ':'))) {
 				*peerorhost++ = '\0';
 			}
-			create_addr(p, peerorhost, 0);
 			ast_string_field_set(p, theirtag, NULL);
-			for (pkt = p->packets; pkt; pkt = pkt->next) {
-				if (pkt->seqno == p->icseq && pkt->method == SIP_INVITE) {
-					AST_SCHED_DEL(sched, pkt->retransid);
-				}
-			}
-			return transmit_invite(p, SIP_INVITE, 1, 3);
+			/* Treat this as if there were a call forward instead...
+			 */
+			ast_string_field_set(p->owner, call_forward, peerorhost);
+			ast_queue_control(p->owner, AST_CONTROL_BUSY);
+			return 0;
 		}
 	}
 




More information about the asterisk-commits mailing list