To continue my original post (and leave this behind for posterity since it was hard to find info online about it) I’m posting what I had to do in order to get the enter/leave sounds working AND provide a workaround for recording confbridge conferences. This is using Asterisk 1.8. I’m really excited about the changes to Confbridge in 1.10 but am not ready to make the jump just as yet.
Basically I built my conference in freepbx then copied the [ext-meetme] into extensions_override_freepbx.conf and made changes.
[ext-meetme]
include => ext-meetme-custom
exten => STARTMEETME,1,ExecIf($["${MEETME_MUSIC}" != ""]?Set(CHANNEL(musicclass)=${MEETME_MUSIC}))
exten => STARTMEETME,n,Set(GROUP(meetme)=${MEETME_ROOMNUM})
exten => STARTMEETME,n,GotoIf($[${MAX_PARTICIPANTS} > 0 && ${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}>${MAX_PARTICIPANTS}]?MEETMEFULL,1)
exten => STARTMEETME,n,ConfBridge(${MEETME_ROOMNUM},${MEETME_OPTS},${PIN})
exten => STARTMEETME,n,Hangup
exten => MEETMEFULL,1,Playback(im-sorry&conf-full&goodbye)
exten => MEETMEFULL,n,Hangup
exten => h,1,Hangup
exten => 99,1,Macro(user-callerid,)
exten => 99,n,Set(MEETME_ROOMNUM=99)
exten => 99,n,Set(MAX_PARTICIPANTS=0)
exten => 99,n,Set(MEETME_MUSIC=default)
exten => 99,n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?READPIN)
exten => 99,n,Set(CONFBRIDGE_JOIN_SOUND=beep)
exten => 99,n,Set(CONFBRIDGE_LEAVE_SOUND=beeperr)
exten => 99,n,Answer
exten => 99,n,Wait(1)
exten => 99,n,Set(PINCOUNT=0)
exten => 99,n(READPIN),Read(PIN,enter-conf-pin-number,,,,)
exten => 99,n,GotoIf($[x${PIN} = x113]?USER)
exten => 99,n,GotoIf($[x${PIN} = x1114]?ADMIN)
exten => 99,n,Set(PINCOUNT=$[${PINCOUNT}+1])
exten => 99,n,GotoIf($[${PINCOUNT}>3]?h)
exten => 99,n,Playback(conf-invalidpin)
exten => 99,n,Goto(READPIN)
exten => 99,n(ADMIN),Set(MEETME_OPTS=aAcM)
exten => 99,n,Goto(STARTMEETME,1)
exten => 99,n(USER),Set(MEETME_OPTS=cM)
exten => 99,n,GotoIf($[${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}=1]?REDBUTTON)
exten => 99,n,Goto(STARTMEETME,1)
exten => 99,n(REDBUTTON) ,MixMonitor(/var/www/html/conferences/conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.wav,,/myscripts/mp3process.sh conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.wav conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.mp3)
exten => 99,n,Goto(STARTMEETME,1)
exten => 99,hint,MeetMe:99
; end of [ext-meetme]
Really the following lines of code were added. . . .
Setting the join/leave sounds.
exten => 99,n,Set(CONFBRIDGE_JOIN_SOUND=beep)
exten => 99,n,Set(CONFBRIDGE_LEAVE_SOUND=beeperr)
I guess this is due to the way confbridge works with audio (and perhaps my ignorance) but mixmonitor should only instantiate on the joining of the second caller and start recording then. We don’t use leaders so this code works fine (we could add the same code while checks the leader as well if we wanted)
exten => 99,n,GotoIf($[${GROUP_COUNT(${MEETME_ROOMNUM}@meetme)}=1]?REDBUTTON)
exten => 99,n,Goto(STARTMEETME,1)
exten => 99,n(REDBUTTON) ,MixMonitor(/var/www/html/confcalls/conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.wav,,/myscripts/mp3process.sh conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.wav conference-${STRFTIME(${EPOCH},,%m_%d_%y)}.mp3)
exten => 99,n,Goto(STARTMEETME,1)
I’m passing the command at the end of the MixMonitor off to a script that converts the files to mp3 and sends them off to a google group email address.
#!/bin/bash
/usr/bin/lame --silent -s 8 -V 3 -B 96 -c /var/www/html/confcalls/$1 /var/www/html/confcalls/$2
wait
rm -f /var/www/html/confcalls/$1
echo "Company Conference" | mutt -a /var/www/html/confcalls/$2 -s "Company Conference Recorded $(date)" [email protected]
wait
rm -f /var/www/html/confcalls/$2