Dial from feature macros

Hello.
Asterisk 1.4.4

I’m tying to build something similar to voip-info.org/wiki/view/Aste … call+HOWTO
(basically a MeetMe conference with ability to temporary leave, dial someone and then add that callee to the conference).

The problem I’m having is: it is not possible to use Goto application in the macros called from feature applicationmap and feature.conf clealy states so. Which mean I just can not Read telephone number and then Goto(default,${DEST},1) and I have to use Dial instead. Exactly like example at the voip-info.org does.

The problem is that I have to specify technology for Dial application. And in the example above the technology is Local. So final Dial looks like:

Dial(Local/1010,g);

The extension 1010 gets actually called Ok but the real technology used is SIP (because ael-default context says that for ext 1010 there should be stdexten macro used: stdexten|1010|SIP/1010)
Which is fine and log shows:

-- Packet2Packet bridging SIP/1011-084c21f0 and SIP/1010-084e1df0

But when I later trying to redirect that thing to meetme using ChannelRedirect I see

-- Executing [s@macro-nway-invite:2] ChannelRedirect("SIP/1011-084c21f0", "Local/1010@ael-default-f12e,1|dynamic-nway|1234|1") in new stack

[May 3 16:41:58] WARNING[31965]: app_channelredirect.c:82 asyncgoto_exec: No such channel: Local/1010@ael-default-f12e,1

Which means ${BRIDGEPEER} is Local/1010 not SIP/1010

Which maks me though that asterisk sets BRIDGEPEER equal to argument of first Dial command and even that command caused another Dial command, BRIDGEPEER keeps the old value.

Is is a bug or what? What can I do?

From which context do you ChannelRedirect()? It helps to post relevant dial plan snippets.

Okay. features.conf:

nway-invite-caller => *8,self/caller,Macro,nway-invite
nway-invite-callee => *8,self/callee,Macro,nway-invite
nway-invite-both => *8,self/both,Macro,nway-invite
nway-accept => **,self/both,Macro,nway-accept
nway-reject => *#,self/both,Macro,nway-reject

extensions.ael:

macro join-nway( conf_room, options ) {
Set(MEETME_EXIT_CONTEXT=nway-exit);
Set(DYNAMIC_FEATURES=);
MeetMe(${conf_room}, ${options});
Hangup;
};

context dynamic-nway {
_XXXX => {
Answer;
Playback(conference);
&join-nway(${EXTEN}, pdMX);
};
};

macro nway-invite() {
conf_room = 1234;

    ChannelRedirect(${BRIDGEPEER},dynamic-nway,${conf_room},1);

    // Announce conference number to creator
    Playback(conference);

// SayDigits(${conf_room});

    Read(dest,dial,,i);
    NoOp(dest=${dest});

    Set(DYNAMIC_FEATURES=nway-invite-caller#nway-accept#nway-reject);

// HERE IS WHERE PROBLEM OCCURS
// I can not jump to ${DEST}@ael-default because goto does not
// work for feature macros. So I have to use Dial
// And I have to specify technology…
Dial(Local/${DEST}@ael-default,g);

NoOp(DIALSTATUS=${DIALSTATUS});

    Set(DYNAMIC_FEATURES=);
    &join-nway(${conf_room}, pdMX);

};

macro nway-reject() {
SoftHangup(${BRIDGEPEER});
};

In addition to that, stdexten macro sets DYNAMIC_FEATURES to nway-invite-both to allow using the feature.