While you speak with another party you can press *0, and the macro nway-start is executed. The current party is immediately transferred to a free conference, whereas you get a dialtone to enter the number of the other party you also would like to invite. After the call has been established and you talk to third user, you can press ** to direct him to the conference, or *# to hangup the current call and return to the conference yourself.
Dialplan
Here is dialplan example:
[default]
exten => _XXX,1,Set(DYNAMIC_FEATURES=nway-start)
exten => _XXX,n,Dial(SIP/${EXTEN})
[dynamic-nway]
exten => _XXX,1,Answer
exten => _XXX,n,Set(CONFNO=${EXTEN})
exten => _XXX,n,Set(MEETME_EXIT_CONTEXT=dynamic-nway-invite)
exten => _XXX,n,Set(DYNAMIC_FEATURES=)
exten => _XXX,n,Confbridge(${CONFNO})
exten => _XXX,n,Hangup
[dynamic-nway-invite]
exten => 0,1,Read(DEST,dial,i)
exten => 0,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => 0,n,Dial(Local/${DEST}@dynamic-nway-dest,g)
exten => 0,n,Set(DYNAMIC_FEATURES=)
exten => 0,n,Goto(dynamic-nway,${CONFNO},1)
exten => i,1,Goto(dynamic-nway,${CONFNO},1)
[dynamic-nway-dest]
exten => _XXX,1,Dial(SIP/${EXTEN})
[macro-nway-start]
exten => s,1,Set(CONFNO=${FindFreeConf()})
exten => s,n,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)
exten => s,n,Read(DEST,dial,i)
exten => s,n,Set(DYNAMIC_FEATURES=nway-inv#nway-noinv)
exten => s,n,Dial(Local/${DEST}@dynamic-nway-dest,g)
exten => s,n,Set(DYNAMIC_FEATURES=)
exten => s,n,Goto(dynamic-nway,${CONFNO},1)
[macro-nway-ok]
exten => s,1,ChannelRedirect(${BRIDGEPEER},dynamic-nway,${CONFNO},1)
[macro-nway-notok]
exten => s,1,SoftHangup(${BRIDGEPEER})
Note, You need to provide FindFreeConf() function (or any other way) to get free Conference number.
And, to make all this work, here is features.conf:
[applicationmap]
nway-start => *0,caller,Macro,nway-start
nway-inv => **,caller,Macro,nway-ok
nway-noinv => *#,caller,Macro,nway-notok