[asterisk-commits] jpeeler: branch 1.6.0 r175299 - in /branches/1.6.0: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 12 14:50:30 CST 2009


Author: jpeeler
Date: Thu Feb 12 14:50:30 2009
New Revision: 175299

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

................
  r175298 | jpeeler | 2009-02-12 14:48:56 -0600 (Thu, 12 Feb 2009) | 15 lines
  
  Merged revisions 175294 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r175294 | jpeeler | 2009-02-12 14:34:36 -0600 (Thu, 12 Feb 2009) | 9 lines
    
    Fix ParkedCall event information for From field in the case of a blind transfer
    
    If the parker information can not be obtained from the peer, try and see if
    the BLINDTRANSFER channel variable has been set. Previously, a blind transfer
    to the ParkAndAnnounce app would return nothing for the From.
    
    Closes AST-189
  ........
................

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=175299&r1=175298&r2=175299
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Thu Feb 12 14:50:30 2009
@@ -489,6 +489,7 @@
 static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, int timeout, int *extout, const char *orig_chan_name, struct parkeduser *pu)
 {	
 	struct ast_context *con;
+	const char *event_from;
 
 	/* Get a valid space if not already done */
 	if (pu == NULL)
@@ -555,6 +556,12 @@
 	pthread_kill(parking_thread, SIGURG);
 	ast_verb(2, "Parked %s on %d@%s. Will timeout back to extension [%s] %s, %d in %d seconds\n", pu->chan->name, pu->parkingnum, parking_con, pu->context, pu->exten, pu->priority, (pu->parkingtime/1000));
 
+	if (peer) {
+		event_from = peer->name;
+	} else {
+		event_from = pbx_builtin_getvar_helper(chan, "BLINDTRANSFER");
+	}
+
 	manager_event(EVENT_FLAG_CALL, "ParkedCall",
 		"Exten: %s\r\n"
 		"Channel: %s\r\n"
@@ -563,7 +570,7 @@
 		"CallerIDNum: %s\r\n"
 		"CallerIDName: %s\r\n"
 		"Uniqueid: %s\r\n",
-		pu->parkingexten, pu->chan->name, peer ? peer->name : "",
+		pu->parkingexten, pu->chan->name, pu->parkinglot->name, event_from ? event_from : "",
 		(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL),
 		S_OR(pu->chan->cid.cid_num, "<unknown>"),
 		S_OR(pu->chan->cid.cid_name, "<unknown>"),




More information about the asterisk-commits mailing list