aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-02 16:09:27 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-02 16:09:27 +0000
commit7b7ffe166cfb619f03c823b0a633128e5cc7cbf4 (patch)
treeeba4ddf2167971bd42b21be8fcabbd6cbb0f295e /channels/chan_zap.c
parent174a62b22d0e296b1355c1fb5b4ba1212a2a0eb3 (diff)
Commiting chan_zap.c patch for 2bct
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5119 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-xchannels/chan_zap.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index d1729eac7..a23562647 100755
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -2626,6 +2626,11 @@ static int zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
int oi1, oi2, i1 = -1, i2 = -1, t1, t2;
int os1 = -1, os2 = -1;
struct ast_channel *oc1, *oc2;
+#ifdef PRI_2BCT
+ int triedtopribridge = 0;
+ q931_call *q931c0 = NULL, *q931c1 = NULL;
+#endif
+
/* if need DTMF, cant native bridge */
if (flags & (AST_BRIDGE_DTMF_CHANNEL_0 | AST_BRIDGE_DTMF_CHANNEL_1))
@@ -2793,6 +2798,15 @@ static int zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags,
ast_mutex_lock(&c1->lock);
p0 = c0->pvt->pvt;
p1 = c1->pvt->pvt;
+
+#ifdef PRI_2BCT
+ q931c0 = p0->call;
+ q931c1 = p1->call;
+ if (q931c0 && q931c1 && !triedtopribridge) {
+ pri_channel_bridge(q931c0, q931c1);
+ triedtopribridge = 1;
+ }
+#endif
if (op0 == p0)
i1 = zt_get_index(c0, p0, 1);
if (op1 == p1)