[svn-commits] jrose: trunk r381068 - in /trunk: ./ configs/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Feb 8 11:36:27 CST 2013


Author: jrose
Date: Fri Feb  8 11:36:23 2013
New Revision: 381068

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381068
Log:
Call Parking: Set PARKINGLOT and PARKINGSLOT variables on all parked calls

These two variables were previously not being set when comebacktoorigin=yes
and the example configs seemed to imply that they should be. Since there
is no harm in this and since calls that are sent back to origin are capable
of continuing in the dialplan, this seemed like a no-brainer. Also it
supports some bridging tests I've been working on.

Modified:
    trunk/CHANGES
    trunk/configs/features.conf.sample
    trunk/main/features.c

Modified: trunk/CHANGES
URL: http://svnview.digium.com/svn/asterisk/trunk/CHANGES?view=diff&rev=381068&r1=381067&r2=381068
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Fri Feb  8 11:36:23 2013
@@ -60,6 +60,9 @@
    letter will apply that feature to the called party.
 
  * Add support for automixmonitor to the BRIDGE_FEATURES channel variable.
+
+ * PARKINGSLOT and PARKEDLOT channel variables will now be set for a parked
+   channel even when comebactoorigin=yes
 
 Logging
 -------------------

Modified: trunk/configs/features.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/features.conf.sample?view=diff&rev=381068&r1=381067&r2=381068
==============================================================================
--- trunk/configs/features.conf.sample (original)
+++ trunk/configs/features.conf.sample Fri Feb  8 11:36:23 2013
@@ -27,7 +27,10 @@
                                 ;         an extension created based on the name of the channel that originally parked
                                 ;         the call.  This extension will be created automatically to do a Dial() to the
                                 ;         device that originally parked the call for comebacktodialtime seconds. If the
-                                ;         call is not answered, the call will proceed to 'park-dial,t,1'.
+                                ;         call is not answered, the call will proceed to the next priority (usually none
+                                ;         unless you deliberately set up a catch-all second priority in the park-call
+                                ;         context) in the dialplan for extension matching the peer name (same as how
+                                ;         peer names are flattened into extensions when comebacktoorigin is 'no').
                                 ;
                                 ; 'no'  - This option is useful for performing custom dialplan functionality prior to
                                 ;         sending the call back to the extension that initially parked the call, or to

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=381068&r1=381067&r2=381068
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Fri Feb  8 11:36:23 2013
@@ -5075,6 +5075,7 @@
 			char *peername;
 			char *dash;
 			char *peername_flat; /* using something like DAHDI/52 for an extension name is NOT a good idea */
+			char parkingslot[AST_MAX_EXTENSION]; /* buffer for parkinglot slot number */
 			int i;
 
 			peername = ast_strdupa(pu->peername);
@@ -5135,6 +5136,11 @@
 						peername_flat, parking_con_dial);
 				}
 			}
+
+			snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
+			pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
+			pbx_builtin_setvar_helper(chan, "PARKEDLOT", pu->parkinglot->name);
+
 			if (pu->options_specified) {
 				/*
 				 * Park() was called with overriding return arguments, respect
@@ -5144,12 +5150,6 @@
 			} else if (pu->parkinglot->cfg.comebacktoorigin) {
 				set_c_e_p(chan, parking_con_dial, peername_flat, 1);
 			} else {
-				char parkingslot[AST_MAX_EXTENSION];
-
-				snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
-				pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
-				pbx_builtin_setvar_helper(chan, "PARKEDLOT", pu->parkinglot->name);
-
 				/* Handle fallback when extensions don't exist here since that logic was removed from pbx */
 				if (ast_exists_extension(chan, pu->parkinglot->cfg.comebackcontext, peername_flat, 1, NULL)) {
 					set_c_e_p(chan, pu->parkinglot->cfg.comebackcontext, peername_flat, 1);




More information about the svn-commits mailing list