[SOLVED] Dynamic ConfBridge

Hello,

I’ve seen questions similar to this asked before on this forum, but with no satisfactory answer. Consider this simple scenario:

features.conf

[applicationmap]
ondemandconference => **,self/both,Gosub,"on-demand-conference,s,1"

extensions.ael

context join-conference {
    _X. => {
        ConfBridge(${EXTEN});
        Hangup();
        return;
    }
}

context on-demand-conference {
    s => {
        ChannelRedirect(${BRIDGEPEER},join-conference,600,1);
        ConfBridge(600);
        return;
    }
}

Basically, we are trying to turn existing bridge into ConfBridge. But, while BRIDGEPEER can be redirected to a conference, current channel cannot (ConfBridge application fails). As per explanation in this bug report, we cannot enter ConfBridge because we are already in a bridge. But, as BRIDGEPEER was previously redirected out of the bridge, current channel is not in a bridge any more, so this explanation does not seem complete/correct.

In the same bug report, using ChannelRedirect on current channel was offered as a workaround. However, that fails with a message “An async goto just messed up our execution location”. This is not surprising, as documentation clearly states that applications that affect dialplan flow are not allowed.

My question is: is there any way to allow an user to dial a code while in-call and redirect both call parties to ConfBridge? My Asterisk version is 15.1.5.

I did something similar using applicationmap and channel redirect with a local channel

I did something similar using applicationmap and channel redirect with a local channel

Yeah, but on what Asterisk version? Both of the methods I mentioned in my post probably worked on some previous version, but they don’t work on v15.

I used Asterisk 13, and I think it should works on version 15 also

For future readers, it does not seem possible to redirect current channel with dynamic feature directly. However, I’ve thought up a following solution. Use F and g options in Dial application, so both caller and callee will continue into the dialplan after they leave the bridge. Inside the context which handles the dynamic feature, use some variable to mark the channel and check for that variable after Dial application finishes.

context on-demand-conference {
    s => {
        ChannelRedirect(${BRIDGEPEER},join-conference,600,1);
        JOIN_CONFERENCE=yes;
        return;
    }
}

context default {
    ...

    Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})},30,Fg);
    if (${LEN(${JOIN_CONFERENCE})}) {
        ConfBridge(600);
    }

    ...
}

Did you try local channel option, Im pretty sure it is

I’ve tried many things, including redirecting to local channel. Maybe I don’t understand your point, do you have an example?

I made this for a customer, I would need to re-write the dial plan again, because I dont have access to the server where the code is hosted, once I do it I post the example of this :