Handling Transfers With ARI

Home » Uncategorized » Handling Transfers With ARI
Uncategorized 2 Comments

Hello,

I’m struggling to find a way to properly handle blind transfers with ARI.

This is my use case :

– Alice calls Bob through Asterisk

– dialing and bridging is done with ARI

– when Bob blind-transfers to Charlie, I would like to use the
“redirect” ARI operation, or the Transfer application

But here is the issue : since the channels are stasis-managed, transferring is done with Local channels which remain in the path, so Transfer and redirect have no effect on them. And Alice’s channel is not aware that it is being transferred.

Has somebody already dealt with this ?

Regards,

Jean

2 thoughts on - Handling Transfers With ARI

  • Thanks for the answer.

    Not sure I get the idea : when a SIP phone performs a blind-transfer, I
    have no control over what Asterisk does with the channels. During my tests, Bob’s channel was automatically pulled out of the bridge, and replaced with a Local channel whose peer goes through the dialplan to the transfer destination.

    How can you link the newly created Local channel with Alice’s one ?

    For the moment, I have a piece of solution with the BridgeBlindTransfer event, but I still have troubles with these Local channel issues.

    Le 22/12/2020 à 20:13, Phil Mickelson a écrit :

  • Thank you all for the hints.

    I ended up using a mix of dialplan to deal with the Local channels, and ARI to detect the transfer and redirect. It doesn’t look like a “clean”
    solution but I have nothing better for the moment :

    Dialplan :

    exten  100,1,GotoIf($[$[“${SIPTRANSFER}”=”yes”]&$[“${CHANNEL(channeltype)}”=”Local”]]?waittransfer:)
    ; deal with channel being transfered same  = n,Transfer(100)
    same  = n,Hangup()

    ; deal with Asterisk-managed Local channel same = n(waittransfer),Wait(2)
    same  = n,Hangup()

    NodeJS :

    bridge.once(‘BridgeAttendedTransfer’, event => {
        var transferee = new ari.Channel(event.transferee.id);
        transferee.continueInDialplan({
              context: event.context,
              extension: event.exten,
              priority: 1
        });
    });

    Le 23/12/2020 à 19:46, Phil Mickelson a écrit :