A modified version of the above.
This allows setting more of the Confbridge options available in 10.x and sets the first (creating) user as admin.
From extensions.conf
[External-Conf]
exten=s,1,NoOP(External Conference Caller Coming In)
exten=s,n,Read(CONFnum,custom/6004,4,,2,5)
exten=s,n,Goto(CONFERENCE,${CONFnum},1)
[CONFERENCE]
exten=_19XX,1,NoOp(Dynamic Conferences)
same=n,Set(CONFnum=${EXTEN})
same=n,Set(CONFnum=${FILTER(0-9,${CONFnum})})
same=n,GotoIf($["${CONFnum}" = ""]?CONFERENCE,${EXTEN},hangup)
same=n,Playback(custom/6000)
same=n,SayDigits(${CONFnum})
same=n,NoOP(Type Conference PIN)
same=n,Read(CONFpin,custom/6002,4,,2,5)
same=n,Set(CONFpin=${FILTER(0-9,${CONFpin})})
same=n,GotoIf($["${CONFpin}" = ""]?CONFERENCE,${EXTEN},hangup)
same=n,Playback(custom/6001)
same=n,SayDigits(${CONFpin})
same=n,MacroExclusive(emptyconference,${CONFnum},TMP_EMPTY)
same=n,GotoIf($["${TMP_EMPTY}" = "1"]?CONFERENCE,${EXTEN},uconf)
same=n,NoOP(Type Conference Max Users)
same=n,Read(CONFusers,custom/6003,2,,2,5)
same=n,Set(CONFusers=${FILTER(0-9,${CONFusers})})
same=n,GotoIf($["${CONFusers}" = ""]?CONFERENCE,${EXTEN},hangup)
same=n(aconf),MacroExclusive(makeconference,${CONFnum},${CONFpin},${CONFusers},${CONFrec},TMP_CONFOK,TMP_ADMIN)
same=n(uconf),MacroExclusive(makeconference,${CONFnum},${CONFpin},${CONFusers},${CONFrec},TMP_CONFOK,TMP_ADMIN)
same=n,GotoIf($["${TMP_CONFOK}" != "1"]?hangup)
same=n,GotoIf($["${TMP_ADMIN}" = "1"]?CONFERENCE,${EXTEN},admin:CONFERENCE,${EXTEN},user)
same=n(admin),Read(PASS,custom/6005,5,,2,5)
same=n,GotoIf($["${PASS}" = "12345"]?:CONFERENCE,${EXTEN},hangup)
same=n,Set(CONFBRIDGE(user,admin)=yes)
same=n,Set(CONFBRIDGE(user,marked)=yes)
same=n,Set(CONFBRIDGE(user,announce_join_leave)=yes)
same=n,Set(CONFBRIDGE(user,music_on_hold_when_empty)=yes)
same=n,Set(CONFBRIDGE(user,music_on_hold_class)=default)
same=n,Set(CONFBRIDGE(user,end_marked)=yes)
same=n,Set(CONFBRIDGE(user,announce_only_user)=yes)
same=n,Set(CONFBRIDGE(user,announce_user_count)=yes)
same=n,Set(CONFBRIDGE(bridge,max_members)=${CONFusers})
same=n,ConfBridge(${CONFnum},conferences,USER,admin_menu)
same=n,Hangup()
same=n(user),Set(CONFBRIDGE(user,admin)=no)
same=n,Set(CONFBRIDGE(user,marked)=no)
same=n,Set(CONFBRIDGE(user,announce_join_leave)=yes)
same=n,Set(CONFBRIDGE(user,music_on_hold_when_empty)=yes)
same=n,Set(CONFBRIDGE(user,music_on_hold_class)=default)
same=n,Set(CONFBRIDGE(user,end_marked)=yes)
same=n,ConfBridge(${CONFnum},conferences,foo-user,user_menu)
same=n,Hangup()
same=n(hangup),Hangup()
[macro-emptyconference]
exten=s,1,NoOp(Checking to see if conference is empty and needs extra admin prompts)
same=n,Verbose(${GROUP_COUNT(${ARG1}@conference)})
same=n,GotoIf($[${GROUP_COUNT(${ARG1}@conference)} > 0]?user)
same=n,Set(${ARG2}=0)
same=n,NoOp(${DB_DELETE(conf/${MACRO_EXTEN})})
same=n,MacroExit
same=n(user),Set(${ARG2}=1)
same=n,MacroExit
[macro-makeconference]
exten=s,1,NoOp(Validating Conference)
same=n,GotoIf($[${LEN(${ARG1})} < ${CONFnum_MINLEN}]?exiterr)
same=n,GotoIf($[${LEN(${ARG1})} > ${CONFnum_MAXLEN}]?exiterr)
same=n,GotoIf($[${LEN(${ARG2})} < ${CONFpin_MINLEN}]?exiterr)
same=n,GotoIf($[${LEN(${ARG2})} > ${CONFpin_MAXLEN}]?exiterr)
same=n,Verbose(${GROUP_COUNT(${ARG1}@conference)})
same=n,GotoIf($[${GROUP_COUNT(${ARG1}@conference)} > 0]?checkpin)
same=n,Set(DB(conf/${ARG1}/pin)=${ARG2})
same=n,Set(DB(conf/${ARG1}/max_users)=${ARG3})
same=n,Set(${ARG5}=1)
same=n,Set(${ARG6}=1)
same=n,Set(GROUP(conference)=${ARG1})
same=n,MacroExit()
same=n(checkpin),NoOp(Checking PIN)
same=n,GotoIf($["${DB(conf/${ARG1}/pin)}" != "${ARG2}"]?exiterr)
same=n,Set(${ARG5}=1)
same=n,Set(GROUP(conference)=${ARG1})
same=n,MacroExit()
same=n(exiterr),NoOp(Exiting - Something Wasn't Liked)
same=n,Set(${ARG5}=0)
same=n,MacroExit()
From confbridge.conf
[USER]
type=user
music_on_hold_when_empty=yes
music_on_hold_
end_marked=yes
announce_only_user=yes
announce_join_leave=yes
dtmf_passthrough=yes
[conferences]
type=bridge
Some of the differences:
The example above gives ability to set all options usually in the confbridge.conf file from within the dialplan.
It also does a pssword check to keep just any Joe Random employee from creating conference rooms.
Since [CONFERENCE] is included in my users contexts, anybody can just dial any extension 1900 through 1999 to create/enter a conference.
I also have an external DID pointing to External-Conf which prompts for the conference room number and then places that call into [CONFERENCES] with that extension.
There are a few other changes, but I forget them all.
Technical Details (for developers)
ConfBridge() uses Asterisk's bridging framework which was introduced in Asterisk 1.6.2. There is a common bridging framework in main/bridging.c. The bridging implemenations itself are modules located in bridges/bridge_*.c. There are several implementations with different kind of features. When an application requests a new bridge (e.g. ConfBridge), it has to specify the needed features and the bridging framework will choose the best fitting bridging implementation.
Bugs
ConfBridge crashes in Asterisk 1.8 when users leave at the same time. See bug 16640. The ConfBridge implementation in Asterisk 10 is much improved to the 1.8 version and probably (?!) does not have have this bug.