Was this page helpful?

IP PBX-ASUS WL-520GU GUI

Solution #1) Asterisk GUI (by Digium, Inc.)
Solution #2) Asterisk Management Script (by fivn) 由於新版的 DD-WRT 做了部份的網頁安全性修正,致使這工具無法正常運作。

Asterisk GUI

官方網址:http://www.asterisk.org/asterisknow/...pers/gui-guide

安裝 Asterisk-GUI

以 SSH 連線登入機器,用 root 帳號

#> /opt/bin/ipkg-opt install asterisk-gui

 

設定 Asterisk-GUI

#> vi /opt/etc/asterisk/manager.conf

[general]
displaysystemname = yes
enabled = yes 
webenabled =
yes
port = 5038 httptimeout = 60 ... ... ; for Asterisk-GUI [admin]
secret = HereisYouPassword
deny = 0.0.0.0/0.0.0.0
permit = 192.168.1.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

註:192.168.1.1 是機器的內部 IP 位址

#> vi /opt/etc/asterisk/http.conf

[general]
enabled = yes
enablestatic = yes
prefix = gui
bindaddr = 0.0.0.0
bindport = 8088

註:bindaddr 設定要瀏覽管理管理網頁的電腦 IP 位址,0.0.0.0 表示所有電腦。
 

Asterisk模組設定

Notes: autoload 必須設為 yes,否則 Asterisk-GUI 無法正常運作。

# vi /opt/etc/asterisk/modules.conf

;
; Asterisk configuration file
;
; Module Loader configuration file By Leif Madsen of www.leifmadsen.com
; Descriptions and some modules added by Bill Weidman

[modules]
autoload=yes

;Unload modules
noload => cdr_odbc.so
noload => cdr_radius.so
noload => cdr_sqlite.so
noload => chan_gtalk.so
noload => codec_speex.so
noload => format_ogg_vorbis.so
noload => func_odbc.so
noload => res_config_odbc.so
noload => res_odbc.so
noload => res_snmp.so
noload => res_jabber.so


; Resources —
;load => res_adsi.so ; ADSI Resource
;load => res_agi.so ; Asterisk Gateway Interface (AGI)
;load => res_config_mysql.so ; MySQL Configuration
;load => res_config_odbc.so ; ODBC Configuration
;load => res_crypto.so ; Cryptographic Digital Signatures
load => res_features.so ; Call Parking Resource
;load => res_indications.so ; Indications Configuration
;load => res_monitor.so ; Call Monitoring Resource
load => res_musiconhold.so ; Music On Hold Resource
;load => res_odbc.so ; ODBC Resource

; PBX —
;load => pbx_ael.so ; Asterisk Extension Language Compiler - Requires ?
load => pbx_config.so ; Text Extension Configuration Requires N/A
;load => pbx_dundi.so ; Do a DUNDi lookup of a phone number. - Requires res_crypto.so
;load => pbx_functions.so ; Builtin dialplan functions - Requires N/A
;load => pbx_loopback.so ; Loopback Dialplan Switch - Requires N/A
;load => pbx_realtime.so ; Realtime Dialplan Switch - Requires N/A
;load => pbx_spool.so ; Outgoing Spool Support Requires - N/A

; Functions —
load => func_callerid.so ; Gets or sets Caller*ID data on the channel. - Requires ?
;load => func_enum.s ; ENUMLOOKUP and TXTCIDNAME functions - Requres ?
;load => func_uri.so ; URI encode/decode functions - Requires ?
load => func_logic.so ; Logical dialplan functions

; Database Call Detail Records —
;load => cdr_addon_mysql.so ; Mysql CDR Backend - Requires ?
;load => cdr_csv.so ; Comma Separated Values CDR Backend - Requires N/A
;load => cdr_custom.so ; Customizable Comma Separated Values CDR Backend - Requires N/A
;load => cdr_manager.so ; Asterisk Call Manager CDR Backend - Requires N/A
;load => cdr_odbc.so ; ODBC CDR Backend - Requires N/A
;load => cdr_pgsql.so ; PostgreSQL CDR Backend - Requires N/A
;load => cdr_sqlite.so ; SQLite CDR Backend - Requires N/A

; Channels —
;load => chan_agent.so ; Agent Proxy Channel - Requires res_features.so, res_monitor.so, res_musiconhold.so
;load => chan_features.so ; Provides summary information on feature channels- Requires N/A
load => chan_iax2.so ; Inter Asterisk eXchange (Ver 2) - Requires res_crypto.so, res_features.so
;load => chan_local.so ; Show status of local channels- Requires N/A
;load => chan_mgcp.so ; Media Gateway Control Protocol (MGCP) - Requires res_features.so
;load => chan_modem.so ; Generic Voice Modem Driver - Requires N/A
;load => chan_modem_aopen.so ; A/Open (Rockwell Chipset) ITU-2 VoiceMod- Requires chan_modem.so
;load => chan_modem_bestdata.so ; BestData (Conexant V.90 Chipset) VoiceModem - Requires chan_modem.so
;load => chan_modem_i4l.so ; ISDN4Linux Emulated Modem Driver - Requires chan_modem.so
;load => chan_oss.so ; OSS Console Channel Driver - Requires N/A
;load => chan_phone.so ; Linux Telephony API Support - Requires N/A
load => chan_sip.so ; Session Initiation Protocol (SIP) - Requires res_features.so
;load => chan_skinny.so ; Skinny Client Control Protocol (Skinny) - Requires res_features.so
;load => chan_zap.so ; Zapata Telephony w/PRI - Requires ?

; Codecs —
;load => codec_adpcm.so ; Adaptive Differential PCM Coder/Decoder - Requires N/A
load => codec_alaw.so ; A-law Coder/Decoder - Requires N/A
;load => codec_a_mu.so ; A-law and Mulaw direct Coder/Decoder - Requires N/A
;load => codec_g723.so ; G.723 Codect Translator - Requires N/A
;load => codec_g726.so ; ITU G.726-32kbps G726 Transcoder - Requires N/A
;load => codec_g729.so ; G729/PCM16 (signed linear) Codec Translator - Requires N/A
;load => codec_gsm.so ; GSM/PCM16 (signed linear) Codec Translat - Requires N/A
;load => codec_ilbc.so ; iLBC/PCM16 (signed linear) Codec Translat - Requires N/A
;load => codec_lpc10.so ; LPC10 2.4kbps (signed linear) Voice Codec Translat - Requires N/A
;load => codec_speex.so ; Speex/PCM16 (signed linear) Codec Translat - Requires N/A
;load => codec_ulaw.so ; Mu-law Coder/Decoder - Requires N/A

; Formats —
;load => format_au.so ; Sun Microsystems AU format (signed linear) - Requires N/A
;load => format_g723.so ; Raw G.723 data - Requires N/A
;load => format_g726.so ; Raw G.726 (16/24/32/40kbps) data - Requires N/A
;load => format_g729.so ; Raw G729 data - Requires N/A
;load => format_gsm.so ; Raw GSM data - Requires N/A
;load => format_h263.so ; Raw h263 data - Requires N/A
;load => format_ilbc.so ; Raw iLBC data - Requires N/A
;load => format_jpeg.so ; JPEG (Joint Picture Experts Group) Image - Requires N/A
;load => format_mp3.so ; MP3 - Requires N/A
;load => format_pcm_alaw.so ; Raw aLaw 8khz PCM Audio support - Requires N/A
load => format_pcm.so ; Raw uLaw 8khz Audio support (PCM) - Requires N/A
;load => format_sln.so ; Raw Signed Linear Audio support (SLN) - Requires N/A
;load => format_vox.so ; Dialogic VOX (ADPCM) File Format - Requires N/A
;load => format_wav_gsm.so ; Microsoft WAV format (Proprietary GSM) - Requires N/A
load => format_wav.so ; Microsoft WAV format (8000hz Signed Linear) - Requires N/A

; Applications —
;load => app_addon_sql_mysql.so ; Do several mySQLy things - Requires ?
;load => app_adsiprog.so ; Asterisk ADSI Programming Application - Requires res_adsi.so
;load => app_alarmreceiver.so ; Alarm Receiver for Asterisk - Requires N/A
;load => app_authenticate.so ; Authentication Application - Requires N/A
;load => app_cdr.so ; Tell Asterisk to not maintain a CDR for the current call - Requires N/A
;load => app_chanisavail.so ; Check if channel is available - Requires N/A
;load => app_chanspy.so ; Listen to the audio of an active channel - Requires N/A
;load => app_controlplayback.so ; Play a file with fast forward and rewind - Requires N/A
;load => app_curl.so ; ? - Requires N/A
;load => app_cut.so ; The application Cut is deprecated. - Requires N/A
;load => app_db.so ; Database access functions for Asterisk - Requires N/A
load => app_dial.so ; Dialing Application - Requires res_features.so, res_musiconhold.so
;load => app_dictate.so ; Virtual Dictation Machine - Requires N/A
;load => app_directed_pickup.so ; Directed Call Pickup Application - Requres ?
;load => app_directory.so ; Provide directory of voicemail extensions - Requires N/A
;load => app_disa.so ; Allows someone from outside an "internal" system dialtone - Requires N/A
;load => app_dumpchan.so ; Dump Info About The Calling Channel - Requires N/A
load => app_echo.so ; Echo audio read from channel back to the channel - Requires N/A
;load => app_enumlookup.so ; EnumLookup is deprecated. Use ENUMLOOKUP() function - Requires N/A
;load => app_eval.so ; Reevaluates strings - Requires N/A
;load => app_exec.so ; Allows an arbitrary application to be invoked even when not hardcoded into the dialplan. - Requires N/A
;load => app_externalivr.so ; External IVR Interface Application - Requires ?
;load => app_festival.so ; Simple Festival Interface - Requires N/A
;load => app_flash.so ; Flashes a Zap Trunk - Requires ?
;load => app_forkcdr.so ; Fork The CDR into 2 separate entities. - Requires N/A
;load => app_getcpeid.so ; Obtains and displays ADSI CPE ID and other info in order to properly setup zapata.conf for on-hook operations.
;load => app_groupcount.so ; Deprecated, please use the function GroupCount - Requires N/A
;load => app_hasnewvoicemail.so ; Indicator whether a voice mailbox has messages in a given folder. - Requires N/A
;load => app_ices.so ; Encode and Stream via icecast and ices - Requires N/A
;load => app_image.so ; Sends an image on a channel. - Requires N/A
;load => app_intercom.so ; Obsolete - does not load
;load => app_lookupblacklist.so ; Look up Caller*ID name/number from blacklist database - Requires N/A
;load => app_lookupcidname.so ; Look up CallerID Name from local database - Requires N/A
load => app_macro.so ; Macro Handling Application - Requires N/A
;load => app_math.so ; Basic Math Functions - Requires N/A
;load => app_md5.so ; MD5 checksum applications - Requires N/A
;load => app_meetme.so ; MeetMe conference bridge - Requires ?
;load => app_milliwatt.so ; Generate a Constant 1000Hz tone at 0dbm (mu-law) - Requires N/A
load => app_mixmonitor.so ; Records the audio on the current channel to the specified file. - Requires ?
;load => app_mp3.so ; Play an MP3 file or stream - Requires N/A
;load => app_nbscat.so ; Play an NBS local stream - Requires N/A
;load => app_page.so ; Places outbound calls and dumps them into a conference bridge, muted - Requires ?
;load => app_parkandannounce.so ; Call Parking and Announce Application - Requires res_features.so
load => app_playback.so ; Sound File Playback Application - Requires N/A
;load => app_privacy.so ; Require phone number to be entered, if no CallerID sent - Requires N/A
;load => app_queue.so ; Queue handling applications - Requires res_features.so, res_monitor.so, res_musiconhold.so
;load => app_random.so ; Conditionally branches, based upon a probability - Requires N/A
;load => app_read.so ; Reads a #-terminated string of digits - Requires N/A
;load => app_readfile.so ; Stores output of file into a variable - Requires N/A
;load => app_realtime.so ; Use RealTime config handler to read data into channel variables. - Requires N/A
;load => app_record.so ; Record to a file - Requires N/A
;load => app_rxfax.so ; Receive a FAX to a file - Requires ?
;load => app_saycountpl.so ; Polish counting grammar - Requires ?
;load => app_sayunixtime.so ; Says a specified time in a custom format - Requires N/A
;load => app_senddtmf.so ; Sends arbitrary DTMF digits - Requires N/A
;load => app_sendtext.so ; Sends text to current channel (callee). - Requires N/A
load => app_setcallerid.so ; Set Caller*ID on a call to a new value. - Requires N/A
;load => app_setcdruserfield.so ; Append to the CDR user field - Requires N/A
;load => app_setcidname.so ; SetCIDName deprecated in favor of the function CALLERID(name) - Requires N/A
;load => app_setcidnum.so ; SetCIDNum deprecated in favor of the function CALLERID(number) - Requires N/A
;load => app_setrdnis.so ; SetRDNIS deprecated in favor of the function CALLERID(rdnis) - Requires N/A
;load => app_settransfercapability.so ; Set ISDN Transfer Capability - Requires N/A
;load => app_sms.so ; SMS/PSTN handler - Requires N/A
;load => app_softhangup.so ; Hangs up the requested channel - Requires N/A
;load => app_stack.so ; Stack routines - Requires ?
;load => app_striplsd.so ; Deprecated - Requires N/A
;load => app_substring.so ; Deprecated - Requires N/A
;load => app_system.so ; Execute a system command - Requires N/A
;load => app_talkdetect.so ; Playback with Talk Detection - Requires N/A
;load => app_test.so ; Interface Test Application - Requires N/A
;load => app_transfer.so ; Transfer caller to remote extension - Requires N/A
;load => app_txfax.so ; Trivial FAX Transmit Application - Requires ?
;load => app_txtcidname.so ; The TXTCIDName deprecated in favor of the TXTCIDNAME dialplan function - Requires N/A
;load => app_url.so ; Send URL Applications - Requires N/A
;load => app_userevent.so ; Send an arbitrary event to the manager interface - Requires N/A
;load => app_verbose.so ; Send arbitrary text to verbose output - Requires N/A
;load => app_voicemail.so ; Comedian Mail (Voicemail System) - Requires res_adsi.so
;load => app_waitforring.so ; Waits until first ring after specified time - Requires N/A
;load => app_waitforsilence.so ; Waits for silence of specified time - Requires N/A
;load => app_while.so ; While Loops and Conditional Execution - Requires N/A
;load => app_zapateller.so ; Block Telemarketers with Special Information Tone - Requires N/A
;load => app_zapbarge.so ; Barges in on a specified zap channel - Requires ?
;load => app_zapras.so ; Executes a RAS server using pppd on the given channel - Requires ?
;load => app_zapscan.so ; Scan Zap channels to monitor calls - Requires ?

[global]
chan_modem.so=yes

開啟瀏覽器輸入 http://192.168.1.1:8088/gui/static/config/index.html,登入帳號 admin,密碼 HereisYourPassword。

操作畫面預覽

管理介面首頁

GUI_Status.png

Dial Plans

GUI_DialPlan.png 

Asterisk Log Messages

GUI_Log.png

Outgoing Calling Rules

GUI_Outgoing_Call.png

 System Information

GUI_SystemInfo.png

Trunks

GUI_Trunk.png

Users

GUI_Users.png

F.A.Q

Q> [Asterisk-GUI] 透過管理網頁作任何的設定變更,相應的設定檔內文,第一行處會一再重複寫入提示訊息如下

;!
;! Automatically generated configuration file
;! Filename: http.conf (/opt/etc/asterisk/http.conf)
;! Generator: Manager
;! Creation Date: Wed Oct 21 11:13:28 2009
;!

A> 初步判斷原因可能是 embedded system 的系統環境相較完整版 Linux 有部份不足,以致產生這樣的問題。目前尚無解決方法,不過提供一個 script 可以手動快速的清除這些字元。

trim.sh

#!/bin/sh

if [ -z $1 ];then
  echo "Usage: $0 <filename>"
  exit 1
fi
if [ ! -f $1 ];then
  echo "file <$1> not found !!"
  exit 1
fi
sed '/^;!/d' $1 > $1.tmp
mv $1.tmp $1
echo "$1->Done"

使用方法:./trim.sh <config.conf>

Was this page helpful?
標籤 (Edit tags)
  • No tags
查看第5個(總5個)評論: 查看所有
ALang您好,我按照您的方法安装asterisk在WL-500GP V2成功了,但是安装了GUI管理页面之后启动asterisk失败,初步估计是httpd启动不了,我输入httpd之后提示bind: Address already in use,请问该如何解决?
發佈時間 04:47, 30 Nov 2009 ()
請詳細說明:
asterisk 啟動失敗 --> 錯誤訊息為何?
我輸入 httpd ---> 具體指令為何?
發佈時間 05:23, 30 Nov 2009 ()
不好意思,刚发现原来是前面的启动Command写错了,目前已经可以打开GUI界面:)
發佈時間 06:13, 30 Nov 2009 ()
ALang大大,又是我来请教您了,我的机器(WL-500GP)安装asterisk1.4可以正常运行,我将这台机还原之后安装asterisk1.6,安装和启动正常,但是安装了asterisk-GUI之后启动asterisk服务就失效了,系统提示信息如下:
------------------------------------------------------------
----------------------前面忽略一大段---------------------
SIP channel loading...
== Parsing '/opt/etc/asterisk/sip.conf': == Found
== Parsing '/opt/etc/asterisk/users.conf': == Found
== SIP Listening on 0.0.0.0:5060
== Using SIP CoS mark 4
== Parsing '/opt/etc/asterisk/sip_notify.conf': == Found
== Registered channel type 'SIP' (Session Initiation Protocol (SIP))
== Registered application 'SIPDtmfMode'
== Registered application 'SIPAddHeader'
== Registered custom function 'SIP_HEADER'
== Registered custom function 'SIPPEER'
== Registered custom function 'SIPCHANINFO'
== Registered custom function 'CHECKSIPDOMAIN'
== Manager registered action SIPpeers
== Manager registered action SIPshowpeer
== Manager registered action SIPqualifypeer
== Manager registered action SIPshowregistry
== Manager registered action SIPnotify
chan_sip.so => (Session Initiation Protocol (SIP))
== Registered custom function 'IAXPEER'
== Registered custom function 'IAXVAR'
== Registered application 'IAX2Provision'
== Manager registered action IAXpeers
== Manager registered action IAXpeerlist
== Manager registered action IAXnetstats
DD-WRT*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
------------------------------------------------------------

每次都是到这一步就停止了,请问ALang有遇到过这种情况吗?
發佈時間 03:09, 17 Dec 2009 ()
按照這篇安裝我所修改的版本試試
http://www.osslab.org.tw/index.php?title=%E5%AF%A6%E9%A9%97%E5%B0%88%E6%A1%88/Asterisk/Addons/Asterisk_GUI
發佈時間 01:34, 18 Dec 2009 ()
查看第5個(總5個)評論: 查看所有
您必須 登入 才能發佈評論。
Powered by MindTouch Core