summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-07-23 15:59:32 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-07-23 15:59:32 +0000
commit83a871ea35e48264f35d4170f08c96d9485097f0 (patch)
tree2b83bc8355f5e6df795ddd8f013c66298cc4fe17 /main
parentbf22391b8d3ab34d8bfea29cf8a8ac66a80c2733 (diff)
Restore chan_dahdi native bridging and PRI tromboned call elimination.
Created a native_dahdi bridging technology for use with the new bridging API. The new bridging technology is part of the chan_dahdi channel driver because it is very specific to that driver. Rather than include the new code directly into chan_dahdi.c the new bridge technology is in its own file and linked into chan_dahdi.so. A large part of this change is the mechanical process of moving declarations around so chan_dahdi.c can be split up into more files later. * Changed the bridging core to pass NULL frames into the channel technologies instead of discarding them. The channel technologies may need the proding to determine if their configuration is still valid. (closes issue ASTERISK-21886) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/2681/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/bridging.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/main/bridging.c b/main/bridging.c
index 0419ab1a3..132b7d4be 100644
--- a/main/bridging.c
+++ b/main/bridging.c
@@ -375,6 +375,10 @@ int ast_bridge_channel_queue_frame(struct ast_bridge_channel *bridge_channel, st
/* Drop non-deferable frames when suspended. */
return 0;
}
+ if (fr->frametype == AST_FRAME_NULL) {
+ /* "Accept" the frame and discard it. */
+ return 0;
+ }
dup = ast_frdup(fr);
if (!dup) {
@@ -427,6 +431,11 @@ int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_
struct ast_bridge_channel *cur;
int not_written = -1;
+ if (frame->frametype == AST_FRAME_NULL) {
+ /* "Accept" the frame and discard it. */
+ return 0;
+ }
+
AST_LIST_TRAVERSE(&bridge->channels, cur, entry) {
if (cur == bridge_channel) {
continue;
@@ -1243,10 +1252,6 @@ static void bridge_handle_trip(struct ast_bridge_channel *bridge_channel)
return;
}
switch (frame->frametype) {
- case AST_FRAME_NULL:
- /* Just discard it. */
- ast_frfree(frame);
- return;
case AST_FRAME_CONTROL:
switch (frame->subclass.integer) {
case AST_CONTROL_HANGUP: