Fix supervised transfer (bug #2813)
authorMark Spencer <markster@digium.com>
Mon, 8 Nov 2004 18:23:01 +0000 (18:23 +0000)
committerMark Spencer <markster@digium.com>
Mon, 8 Nov 2004 18:23:01 +0000 (18:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4189 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6f1829e..ec20596 100755 (executable)
@@ -6994,7 +6994,8 @@ static int attempt_transfer(struct sip_pvt *p1, struct sip_pvt *p2)
                *bridgeb = NULL,
                *peera = NULL,
                *peerb = NULL,
-               *peerc = NULL;
+               *peerc = NULL,
+               *peerd = NULL;
 
        if (!p1->owner || !p2->owner) {
                ast_log(LOG_WARNING, "Transfer attempted without dual ownership?\n");
@@ -7009,16 +7010,19 @@ static int attempt_transfer(struct sip_pvt *p1, struct sip_pvt *p2)
                peera = chana;
                peerb = chanb;
                peerc = bridgea;
+               peerd = bridgeb;
        } else if (bridgeb) {
                peera = chanb;
                peerb = chana;
                peerc = bridgeb;
+               peerd = bridgea;
        }
        
        if (peera && peerb && peerc) {
                ast_quiet_chan(peera);
                ast_quiet_chan(peerb);
                ast_quiet_chan(peerc);
+               ast_quiet_chan(peerd);
 
                if (peera->cdr && peerb->cdr) {
                        peerb->cdr = ast_cdr_append(peerb->cdr, peera->cdr);