Correctly control brige in case of mISDN
authorAndreas Eversberg <jolly@eversberg.eu>
Fri, 20 Jan 2012 07:56:51 +0000 (08:56 +0100)
committerAndreas Eversberg <jolly@eversberg.eu>
Fri, 20 Jan 2012 07:56:51 +0000 (08:56 +0100)
If all ends in a call use mISDN, the bridging is done by mISDN itself.
If one end of a call is not mISDN and there are two parties, the
traffic is bridged via LCR.

joinpbx.cpp

index 2e2fabf..9290657 100644 (file)
@@ -368,10 +368,11 @@ void JoinPBX::bridge(void)
 
                /*
                 * Bridge between port instances if:
+                * - two relations
                 * - one or all are not mISDN
                 */
                message = message_create(j_serial, relation->epoint_id, JOIN_TO_EPOINT, MESSAGE_BRIDGE);
-               message->param.bridge_id = j_serial;
+               message->param.bridge_id = (relations==2 && !allmISDN) ? j_serial : 0;
                PDEBUG(DEBUG_JOIN, "join%u EP%u requests bridge=%u\n", j_serial, relation->epoint_id, message->param.bridge_id);
                message_put(message);