Asterisk 電話會議模組,功用與 Meetme 相同
特色:
官方下載:http://sourceforge.net/projects/appkonference/files/
系統環境:Elastix 1.6-12 (Asterisk 1.4.26.1 + FreePBX 2.5.22)
cd /usr/src wget http://downloads.sourceforge.net/project/appkonference/appkonference/1.5/appkonference-1.5.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fappkonference%2Ffiles%2F&ts=1284727946&use_mirror=nchc tar -xzf appkonference-1.5.tar.gz cd appkonference cd konference/ make make install asterisk -r CLI> module load app_konference.so CLI> konference version app_konference release 1.5
vi /etc/asterisk/manager_custom.conf 最下方加入這幾行 [asterikast] secret = asterikast deny=0.0.0.0/0.0.0.0 permit=127.0.0.1 read = system,call,log,verbose,command,agent,user,config write = system,call,log,verbose,command,agent,user,config
Elastix UI > PBX > PBX Configuration > Unembedded freePBX > Tools > Custom Destination
Custom Destination = konference,s,1
Description = konference-dynamic
Elastix UI > PBX > PBX Configuration > Misc Application
Description = konference
Feature Code = 9991
Feature Status = Enabled
Destination = Custom Destination:konference-dynamic
Elastix UI > PBX > Tools > File Editor > File: extensions_custom.conf
最底下加上這幾行
[konference] exten => s,1,answer() exten => s,n,Set(FLAGS=RiaM) exten => s,n,Set(uid1=${CUT(UNIQUEID,.,1)}) exten => s,n,Set(uid2=${CUT(UNIQUEID,.,2)}) exten => s,n,Set(uid=${uid1}${uid2}) exten => s,n,noop(${FLAGS:0:1}) exten => s,n,noop(${FLAGS:1:1}) exten => s,n,noop(${FLAGS:2:1}) exten => s,n,noop(${FLAGS:3:1}) exten => s,n,wait(2) exten => s,n(getconfno),read(conference,enter-conf-call-number) ;*******************We don't care what they enter we will just create it on the fly******************* exten => s,n,GotoIf($["foo${conference}"="foo"]?getconfno) exten => s,n,Set(i=0) exten => s,n,While($[${i} < ${LEN(${FLAGS})}]) exten => s,n,ExecIF($["${FLAGS:${i}:1}" = "i"]|Set|monitor=1) exten => s,n,Set(i=${MATH(${i}+1,int)}) exten => s,n,EndWhile() exten => s,n,GotoIF($["${monitor}" = "1"]?recorder,1) exten => s,n(enterconf),konference(${conference},${FLAGS}) exten => recorder,1,answer() exten => recorder,n,Set(recordingfile=${conference}-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}) exten => recorder,n,playback(conference) exten => recorder,n,saydigits(${conference}) exten => recorder,n,playback(is-now-being-recorded) exten => recorder,n,Monitor(wav,${recordingfile},m) exten => recorder,n,goto(enterconf,1) exten => enterconf,1,answer(); exten => enterconf,2,konference(${conference},q)
重新載入設定
# asterisk -rx "dialplan reload"
// 操作流程
Notes:
* 啟動會議室功能的簡碼 9991,可以修改成其他號碼。
* 會議室編號不須事先做設定,第一位成員進入會議室後即完成會議室的開設。
* 同個會議室的所有成員必須輸入相同的會議室編號。
* 啟動/關閉會議錄音,可以修改 FLAGS 變數,將 i 刪除表示關閉錄音功能。
* 錄音檔儲存位置,在 /var/spool/asterisk/monitor,檔名為 conferenceNO.-Timestamp。
// 安裝 Perl 模組
perl -MCPAN -e shell capn> install Math::Round capn> install File::Touch cpan> reload cpan> quit
// Create DB and importing the data
mysql -u root -p mysql> CREATE DATABASE conference; mysql> GRANT ALL PRIVILEGES ON conference.* TO asteriskuser@localhost; mysql> exit cd /usr/src/appkonference/asterikast/ cd sql/ mysql -u root -p conference < asterikastConferenceManager.db
修正 Table 的錯誤
mysql -u root -p conference mysql> ALTER TABLE conference ADD uniqueid VARCHAR(32);
// 網頁檔案
cd /usr/src/appkonference/asterikast/ cp -r www/ /var/www/html/konference chown -R asterisk:asterisk /var/www/html/konference/ cp listener.pl /usr/local/bin/ dos2unix /usr/local/bin/listener.pl vi /usr/local/bin/listener.pl
my $user = "asterikast"; my $secret = "asterikast"; my $mysql_password = "" ;密碼可以從檔案 /etc/amportal.conf 查到
cd /var/www/html/konference/ vi config.php.inc
$db_engine="mysql"; $mysql_username="asteriskuser"; $mysql_password="password" ;密碼可以從檔案 /etc/amportal.conf 查到 $mysql_db="conference";
// 複製音效檔案
cd /usr/src/appkonference cd asterikast/audio/ cp join.wav leave.wav /var/lib/asterisk/sounds cd /var/lib/asterisk/sounds chown asterisk:asterisk join.wav leave.wav
// 啟動監聽器
# listener.pl Application is not running, now starting # ps -ef | grep listener.pl root 23243 1 0 10:36 pts/2 00:00:00 /usr/bin/perl /usr/local/bin/listener.pl
// 關閉監聽器
# killall listener.pl # rm /var/run/listener.pid
Images 1 | ||
---|---|---|
Asterikastasterikast.png |
當把“[konference-new]”修改成“[konference]”后,就能撥通了。
可能在 1.8 需要作一些調整。
歡迎你將問題張貼到我們的郵件論壇 asterisk-tw@googlegroups.com
237 fputs($fp,"Command: konference mutechannel $channel\r\n\r\n");
238 fputs($fp,"action: logoff\r\n");
239 fputs($fp,"\r\n");
240 sleep(2);
241 fclose($fp);
每个command我都需要在后面加上sleep(2) 和 fclose 才可以执行成功,否则不成功且报错 ERROR[21266] utils.c: fwrite() returned error: Broken pipe