[asterisk-commits] twilson: branch 1.6.0 r168980 - in /branches/1.6.0: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 16 16:52:03 CST 2009


Author: twilson
Date: Fri Jan 16 16:52:03 2009
New Revision: 168980

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

................
  r168941 | twilson | 2009-01-16 16:16:23 -0600 (Fri, 16 Jan 2009) | 19 lines
  
  Merged revisions 168716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
    
    Convert call to park_call_full to masq_park_call_announce
    
    Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
    parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
    do_parking_thread() and then promptly crash.
    (closes issue #14215)
    	Reported by: waverly360	
    	Tested by: otherwiseguy
    (closes issue #14228)
    	Reported by: kobaz
    	Tested by: otherwiseguy
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/features.c

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

Modified: branches/1.6.0/main/features.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/features.c?view=diff&rev=168980&r1=168979&r2=168980
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Fri Jan 16 16:52:03 2009
@@ -547,6 +547,10 @@
 	/* Make the masq execute */
 	if ((f = ast_read(chan)))
 		ast_frfree(f);
+
+	if (peer == rchan) {
+		peer = chan;
+	}
 
 	if (!play_announcement) {
 		orig_chan_name = ast_strdupa(chan->name);
@@ -2415,6 +2419,10 @@
 
 						ast_channel_unlock(chan);
 
+						if (!strncmp(peername, "Parked/", 7)) {
+							peername += 7;
+						}
+
 						if (dialfeatures)
 							snprintf(returnexten, sizeof(returnexten), "%s,,%s", peername, dialfeatures->options);
 						else /* Existing default */
@@ -2536,10 +2544,6 @@
 /*! \brief Park a call */
 static int park_call_exec(struct ast_channel *chan, void *data)
 {
-	/* Cache the original channel name in case we get masqueraded in the middle
-	 * of a park--it is still theoretically possible for a transfer to happen before
-	 * we get here, but it is _really_ unlikely */
-	char *orig_chan_name = ast_strdupa(chan->name);
 	char orig_exten[AST_MAX_EXTENSION];
 	int orig_priority = chan->priority;
 
@@ -2561,7 +2565,7 @@
 		res = ast_safe_sleep(chan, 1000);
 	/* Park the call */
 	if (!res) {
-		res = park_call_full(chan, chan, 0, NULL, orig_chan_name);
+ 		res = masq_park_call_announce(chan, chan, 0, NULL);
 		/* Continue on in the dialplan */
 		if (res == 1) {
 			ast_copy_string(chan->exten, orig_exten, sizeof(chan->exten));




More information about the asterisk-commits mailing list