[asterisk-commits] jrose: branch jrose/bridge_projects r385550 - /team/jrose/bridge_projects/res...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 12 17:12:50 CDT 2013
Author: jrose
Date: Fri Apr 12 17:12:47 2013
New Revision: 385550
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385550
Log:
changing accessibility of flatten_peername, timeout now sets PBX variable parker with flatten_peername.
Modified:
team/jrose/bridge_projects/res/parking/parking_bridge_features.c
team/jrose/bridge_projects/res/parking/parking_controller.c
team/jrose/bridge_projects/res/parking/res_parking.h
Modified: team/jrose/bridge_projects/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/res/parking/parking_bridge_features.c?view=diff&rev=385550&r1=385549&r2=385550
==============================================================================
--- team/jrose/bridge_projects/res/parking/parking_bridge_features.c (original)
+++ team/jrose/bridge_projects/res/parking/parking_bridge_features.c Fri Apr 12 17:12:47 2013
@@ -1,3 +1,28 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2013, Digium, Inc.
+ *
+ * Jonathan Rose <jrose at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ *
+ * \brief Parking Bridge DTMF and Interval features
+ *
+ * \author Jonathan Rose <jrose at digium.com>
+ */
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -71,7 +96,6 @@
struct parked_user *user = hook_pvt;
struct ast_channel *chan = user->chan;
char *peername;
- char *dash;
char parking_space[AST_MAX_EXTENSION];
/* We are still in the bridge, so it's possible for other stuff to mess with the parked call before we leave the bridge
@@ -95,10 +119,7 @@
pbx_builtin_setvar_helper(chan, "PARKEDLOT", user->lot_state->name);
peername = ast_strdupa(user->parker->name);
- dash = strrchr(peername, '-');
- if (dash) {
- *dash = '\0';
- }
+ flatten_peername(peername);
pbx_builtin_setvar_helper(chan, "PARKER", peername);
Modified: team/jrose/bridge_projects/res/parking/parking_controller.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/res/parking/parking_controller.c?view=diff&rev=385550&r1=385549&r2=385550
==============================================================================
--- team/jrose/bridge_projects/res/parking/parking_controller.c (original)
+++ team/jrose/bridge_projects/res/parking/parking_controller.c Fri Apr 12 17:12:47 2013
@@ -238,12 +238,7 @@
pu->parker = NULL;
}
-/*! \internal
- * \brief Flattens a peer name so that it can be written to/found from PBX extensions
- *
- * \param peername unflattened peer name. This will be flattened in place, so expect it to change.
- */
-static void flatten_peername(char *peername)
+void flatten_peername(char *peername)
{
int i;
char *dash;
Modified: team/jrose/bridge_projects/res/parking/res_parking.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/res/parking/res_parking.h?view=diff&rev=385550&r1=385549&r2=385550
==============================================================================
--- team/jrose/bridge_projects/res/parking/res_parking.h (original)
+++ team/jrose/bridge_projects/res/parking/res_parking.h Fri Apr 12 17:12:47 2013
@@ -69,7 +69,7 @@
struct ast_bridge *parking_bridge; /*!< Bridged where parked calls will rest until they are answered or otherwise leave */
struct ao2_container *parked_user_list; /*!< List of parked users rigidly ordered by their parking space */
- int has_owner; /*!< Used for reloading, marks a parking lot to be removed from the list of parking lots when
+ int has_owner; /*!< Used for reloading, marks a parking lot to be removed from the list of parking lots when
* its last parked call has departed the parking_brige.
*/
@@ -308,6 +308,14 @@
/*!
* \since 12
+ * \brief Flattens a peer name so that it can be written to/found from PBX extensions
+ *
+ * \param peername unflattened peer name. This will be flattened in place, so expect it to change.
+ */
+void flatten_peername(char *peername);
+
+/*!
+ * \since 12
* \brief Set a channel's position in the PBX after timeout using the parking lot settings
*
* \param pu Parked user who is entering/reentering the PBX
More information about the asterisk-commits
mailing list