[asterisk-commits] jrose: branch group/bridge_construction r388323 - in /team/group/bridge_const...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri May 10 11:00:28 CDT 2013
Author: jrose
Date: Fri May 10 11:00:26 2013
New Revision: 388323
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388323
Log:
Add timer parking bridge swap, clean up some documentation, remove swap inhibit to from the parking bridge.
Modified:
team/group/bridge_construction/main/manager.c
team/group/bridge_construction/res/parking/parking_bridge.c
team/group/bridge_construction/res/parking/parking_bridge_features.c
Modified: team/group/bridge_construction/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/manager.c?view=diff&rev=388323&r1=388322&r2=388323
==============================================================================
--- team/group/bridge_construction/main/manager.c (original)
+++ team/group/bridge_construction/main/manager.c Fri May 10 11:00:26 2013
@@ -971,15 +971,17 @@
<synopsis>
Blind transfer channel(s) to the given destination
</synopsis>
+ <syntax>
+ <parameter name="Channel" required="true">
+ </parameter>
+ <parameter name="Context">
+ </parameter>
+ <parameter name="Exten">
+ </parameter>
+ </syntax>
<description>
<para>Redirect all channels currently bridged to the specified channel to the specified destination.</para>
</description>
- <parameter name="Channel" required="true">
- </parameter>
- <parameter name="Context">
- </parameter>
- <parameter name="Exten">
- </parameter>
<see-also>
<ref type="manager">Redirect</ref>
</see-also>
Modified: team/group/bridge_construction/res/parking/parking_bridge.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/res/parking/parking_bridge.c?view=diff&rev=388323&r1=388322&r2=388323
==============================================================================
--- team/group/bridge_construction/res/parking/parking_bridge.c (original)
+++ team/group/bridge_construction/res/parking/parking_bridge.c Fri May 10 11:00:26 2013
@@ -200,7 +200,6 @@
ast_bridge_base_v_table.push(&self->base, bridge_channel, swap);
- /* Swaps for parking bridges should only occur as a result of local channel optimization */
if (swap) {
ao2_lock(swap);
pu = swap->bridge_pvt;
@@ -217,9 +216,11 @@
bridge_channel->bridge_pvt = pu;
swap->bridge_pvt = NULL;
- /* XXX Add a parked call swap message type to relay information about parked channel swaps */
+ /* TODO Add a parked call swap message type to relay information about parked channel swaps */
ao2_unlock(swap);
+
+ parking_set_duration(bridge_channel->features, pu);
return 0;
}
@@ -406,10 +407,9 @@
void *bridge;
bridge = ast_bridge_alloc(sizeof(struct ast_bridge_parking), &ast_bridge_parking_v_table);
-/* BUGBUG Need to fix swapped channels not inheriting parking timeout so can remove AST_BRIDGE_FLAG_SWAP_INHIBIT_TO flag. */
bridge = ast_bridge_base_init(bridge, AST_BRIDGE_CAPABILITY_HOLDING,
AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
- | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_SWAP_INHIBIT_TO);
+ | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM);
bridge = ast_bridge_parking_init(bridge, bridge_lot);
bridge = ast_bridge_register(bridge);
return bridge;
Modified: team/group/bridge_construction/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/res/parking/parking_bridge_features.c?view=diff&rev=388323&r1=388322&r2=388323
==============================================================================
--- team/group/bridge_construction/res/parking/parking_bridge_features.c (original)
+++ team/group/bridge_construction/res/parking/parking_bridge_features.c Fri May 10 11:00:26 2013
@@ -453,6 +453,12 @@
return;
}
+ /* If the time limit has already been passed, set a really low time limit so we can kick them out immediately. */
+ time_limit = ast_remaining_ms(user->start, time_limit);
+ if (time_limit <= 0) {
+ time_limit = 1;
+ }
+
/* The interval hook is going to need a reference to the parked_user */
ao2_ref(user, +1);
More information about the asterisk-commits
mailing list