国外的memsource 下载怎样用

更多内容如下:
Powered by
& 2013 &&&Sign up for Memsource Cloud
Sign up for Memsource Cloud
1+ Freelancers
Team Start
BIZ Ultimate
English (US)
English (UK)
Russian (Community Translation)
Japanese (Community Translation)
German (Community Translation)
Spanish (Community Translation)
Portuguese (Community Translation)
Czech (Community Translation)
Greek (Community Translation)
Slovak (Community Translation)
Chinese (Community Translation)
Turkish (Community Translation)
Korean (Community Translation)
Finnish (Community Translation)
French (Community Translation)
Dutch (Community Translation)
First name
Afghanistan
American Samoa
Antarctica
Antigua and Barbuda
Azerbaijan
Bangladesh
Bonaire, Sint Eustatius and Saba
Bosnia and Herzegovina
Bouvet Island
British Indian Ocean Territory
British Virgin Islands
Brunei Darussalam
Burkina Faso
Cape Verde
Cayman Islands
Central African
Christmas Island
Cocos (Keeling) Islands
Cook Islands
Costa Rica
Czech Republic
C?te d'Ivoire
Democratic People's Republic of Korea
Dominican Republic
El Salvador
Equatorial Guinea
Falkland Islands
Faroe Islands
Federated States of Micronesia
French Guiana
French Polynesia
French Southern Territories
Guadeloupe
Guinea-Bissau
Heard Island and McDonald Islands
Islamic Republic of Iran
Isle of Man
Kazakhstan
Kyrgyzstan
Lao People's Democratic Republic
Libyan Arab Jamahiriya
Liechtenstein
Luxembourg
Madagascar
Marshall Islands
Martinique
Mauritania
Montenegro
Montserrat
Mozambique
Netherlands
New Caledonia
New Zealand
Norfolk Island
Northern Mariana Islands
Occupied Palestinian Territory
Papua New Guinea
Philippines
Puerto Rico
Republic of Korea
Republic of Moldova
Republic of the Congo
Russian Federation
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Vincent and the Grenadines
Saint-Pierre and Miquelon
San Marino
Sao Tome and Principe
Saudi Arabia
Seychelles
Sierra Leone
Sint Maarten (Dutch part)
Solomon Islands
South Africa
South Georgia and the South Sandwich Islands
Svalbard and Jan Mayen
Switzerland
Syrian Arab Republic
Tajikistan
The Democratic Republic Of The Congo
The Former Yugoslav Republic of Macedonia
Timor-Leste
Trinidad and Tobago
Turkmenistan
Turks and Caicos Islands
U.S. Virgin Islands
United Arab Emirates
United Kingdom
United Republic Of Tanzania
United States
United States Minor Outlying Islands
Uzbekistan
Vatican City State
Wallis and Futuna
Western Sahara
?land Islands
Repeat password
I have read and agreed to the這個應用需要啟動Javascript支援。
Logged in as:
Page last modified
Was this page helpful?
IP PBX In ASUS WL-520GU DD-WRT
內容表格1. 2. 3. 3.1.1. 3.1.2. 3.1.3. 3.1.4. 3.1.5. 3.1.6. 3.1.7. 4. 4.1.1. 4.1.2. 4.1.3. 4.1.4. 5. 5.1.1. 5.1.2. 6. &原作:Alang
本頁瀏覽人數&#0
本文參考
硬體介紹
- Vendor:ASUS WL-520GU
- CPU:BCM MHz
- RAM:16MB SDR 16bit
- FLASH:4MB
- USB&# x1
- Official Firmware: 3.0.0.8
- 超迷你 USB Flash Drive 4GB 一個
軟體介紹
軔體版本:DD-WRT V24-sp2 (10/10/09) mini-usb-ftp
IP PBX:&&& Asterisk v1.4 and v1.6
GUI&&&&&&&& Asterisk-GUI 2.0 (svn-44045)
安裝 DD-WRT
&安裝前準備
下載官方
的 Firmware
下載路徑:Path: Downloads & stable & dd-wrt.v24 SP1 & Consumer & Asus & WL520GU & dd-wrt.v24_mini_asus.trx
下載 tft2.exe 工具
下載 ASUS 舊版&#2.0.8 firmware
&Downgrade firmware
注意!
由於這次使用的機器是比較後期買的,原廠的 firmware 版本也較新,版號&#2.0.8,然而在這版本一直無法刷 DD-WRT 的 firmware,所以必須先將機器上的 ASUS firmware &#2.0.8 降&#2.0.8,之後才能刷 third-party firmware。
變更原廠 firmware 直接使用 Web UI 的軔體更新即可。
&Upload DD-WRT firmware
確認 firmware 版本降&#3.0.8 後,繼續以下步驟。
1. 使機器進入 Firmware Restoration Mode
機器拔掉電源 & 按住背後的 reset 鈕 & 接上電源 & 約 3 秒鐘,電源燈號出現慢-閃狀態,放掉 reset 鈕 & 電源燈號持續出現慢-閃
2. 使用一部電腦,並將有線網路接上機器的任一個 LAN port,設定網卡 IP 位址&#28.1.10,網路遮&#35.255.0
注意!
不要使用無線網路連接機器作以下的操作。
3. 執行 tftp2.exe,Server 輸&#28.1.1,Password 空白,File 選擇 dd-wrt.v24_mini_asus.trx 檔案位置,按下 Upgrade
若一切順利,約幾秒鐘後就完成軔體更新,
4. 機器的電源重開,電腦的網卡 IP 改為 DHCP,若一切順利,IP 會&#28.1.xx,開啟瀏覽器輸入 http:/&#8.1.1,預設登入帳號 密碼 admin。
注意!
若機器電源重開後,系統完全無法運作,且電源指示燈出現慢-閃狀態,請重複刷軔體的步驟。
參考連結:
&DD-WRT 初始設定
第一次登入 Web 管理頁面 & 變更管理帳號及密碼 Services & Secure Shell & SSHd &Enable& Administration & JFFS2 Support &Enable&, Clean JFFS2 &Disable&
&使 DD-WRT 支援 USB drive
1. DD-WRT stable 版本並不支援 USB,所以為了要能掛上 USB drive,必須作軔體升級。
從可支援 USB 的升級軔體
下載路徑:downloads & others & eko & BrainSlayer-V24-preSP2 & 10-10-09-r13064 (選擇最新版) & broadcom & dd-wrt.v24_usb_generic.bin
升級方式很簡單,登入管理網頁,Administration & Firmware Upgrade & 選擇檔案 dd-wrt.v24_usb_generic.bin & Upgrade
注意!
升級軔體後,原來所作的設定及管理帳號密碼都會保留。
2. 在機器重新開機後,開啟 USB 支援功能
登入管理網頁 & Services & USB &
Core USB Support&&&&& &Enable&
USB 2.0 Support&&&&&&& &Enable&
USB Storage Support& &Enable&
ext2/ext3 File System Support &Enable&
儲存並套用設定。
3. 格式化 USB drive
由於 DD-WRT 預設是不支援格式化指令 fdisk,所以必須用另一部 Linux 電腦來對 USB drive 作格式化。如果你沒有現成的 Linux 系統可用,可以下載 Ubuntu, Knoppix 等 Linux Live-CD 來用。
USB drive(4GB) 磁區規劃:
磁區一 /dev/sd1 - 格式 ext3, 掛載點 /opt, 2048MB 磁區二 /dev/sd2 - 格式 SWAP,無 , 128 MB 磁區三 /dev/sd3 - 格式 ext3, 掛載點 /jffs/usb-disk, 512MB 磁區四 /dev/sd4 - 格式 ext3, 掛載點 /mnt, 剩餘的空間
格式化指令用法:
#&mke2fs -j -m 1 -L Optware /dev/sd1
#&mke2fs -j -m 1 -L Shared /dev/sd3
#&mke2fs -j -m 1 -L Data /dev/sd4
#&mkswap /dev/sd2
格式化都完成後,就可以將 USB drive 從電腦上拔出,然後接在 ASUS 的機器後面的 USB port,接著繼續下面步驟。
4. 設定 DD-WRT 自動掛載 USB drive
再一次確認機器上得 USB Support 功能有開啟(第 2 項),當 USB drive 接入後,系統應該會自動偵測到,但不會自動掛載那些磁區。
如何檢查機器是否有偵測到 USB drive,登入機器的 SSH,然後執行指令
ip_nat_pptp version 1.5 loaded
hub.c: new USB device 00:03.1-1, assigned address 3
Vendor: Ut165
Model: USB2FlashStorage
Direct-Access
ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0SCSI device sda: -byte hdwr sectors (4043 MB)sda: Write Protect is off /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4USB device connected to the SCSI subsystem
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3
ip_nat_pptp version 1.5 unloaded
ip_conntrack_pptp version 1.9 unloaded
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
註:黃底文字就是 USB drive 硬體訊息。
再一次確認 DD-WRT 的 USB drive 的各磁區
root@DD-WRT:~# ls -l /dev/scsi/host0/bus0/target0/lun0
brw-------
brw-------
1970 part1
brw-------
1970 part2
brw-------
1970 part3
brw-------
1970 part4
註:part 1-4 就是對應 USB drive 的 4 個磁區。
手動掛載 USB drive 的磁&#2,4,第二個 SWAP 磁區暫不用掛載,後續會有啟用程序,執行
# mkdir /jffs/usb-disk# mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt # mount /dev/scsi/host0/bus0/target0/lun0/part3 /jffs/usb-disk # mount /dev/scsi/host0/bus0/target0/lun0/part4 /mnt/ # mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
devpts on /proc/bus/usb type usbfs (rw)
/dev/mtdblock/4 on /jffs type jffs2 (rw)
/dev/scsi/host0/bus0/target0/lun0/part1 on /opt type ext3 (rw)
/dev/scsi/host0/bus0/target0/lun0/part3 on /jffs/usb-disk type ext3 (rw)
/dev/scsi/host0/bus0/target0/lun0/part4 on /mnt type ext3 (rw)
設定以上磁區在機器重開機後會自動掛載,步驟是
登入管理網頁 & Administration & Commands,在文字框填入以下內容
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part3 /jffs/usb-disk
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part4 /mnt
按 Save Startup 儲存設定檔,然後重開機器,在以 SSH 登入,以 mount 指令檢查自動掛載 USB drive 是否正常。
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
devpts on /proc/bus/usb type usbfs (rw)
/dev/mtdblock/4 on /jffs type jffs2 (rw)
/dev/scsi/host0/bus0/target0/lun0/part1 on /opt type ext3 (rw)
/dev/scsi/host0/bus0/target0/lun0/part3 on /jffs/usb-disk type ext3 (rw)
/dev/scsi/host0/bus0/target0/lun0/part4 on /mnt type ext3 (rw)
&安裝 Optware 在 DD-WRT
這裡是線上安裝一些必要的指令集和函式庫
關於 Optware 更多資訊,參考
1. 更新 ipkg 的套件庫資訊
#& ipkg update
Downloading http://downloads.openwrt.org/whiterussian/packages/Packages ...
Connecting to downloads.openwrt.org (78.24.191.177:80)
100% |*********************************************************|
143k 00:00:00 ETA
Updated list of available packages in /jffs/usr/lib/ipkg/lists/whiterussian
Downloading http://downloads.openwrt.org/whiterussian/packages/non-free/Packages ...
Connecting to downloads.openwrt.org (78.24.191.177:80)
100% |*********************************************************|
--:--:-- ETA
Updated list of available packages in /jffs/usr/lib/ipkg/lists/non-free
Downloading http://downloads.openwrt.org/backports/rc5/Packages ...
Connecting to downloads.openwrt.org (78.24.191.177:80)
100% |*********************************************************| 9:00 ETA
Updated list of available packages in /jffs/usr/lib/ipkg/lists/backports
2. 安裝 optware
# cd /tmp # wget http://www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O - | tr -d '\r' & /tmp/optware-install.sh # sh optware-install.sh
Checking system config ...
Using 10.1.1.254 as default gateway.
Using the following nameserver(s):
nameserver 192.168.1.1
Installing package uclibc-opt_0.9.28-13_mipsel.ipk ...
Some newer versions of DD-WRT does not show download progress bar,
so just be patient - or check STATUS -& BANDWIDTH tab for download
activity in your routers Web-GUI, and then still wait a minute or two.
Connecting to ipkg.nslu2-linux.org (140.211.169.169:80)
uclibc-opt_0.9.28-13 100% |*********************************************************|
832k 00:00:00 ETA
Updating /opt/etc/ld.so.cache
Installing package ipkg-opt_0.99.163-10_mipsel.ipk ...
註:完成後,可以檢查 /opt 目錄多了一些目錄和指令集。
3. 安裝 busybox
# /opt/bin/ipkg-opt install busybox-base # /opt/bin/ipkg-opt install busybox # /opt/bin/ipkg-opt install busybox-links
&啟用 SWAP 磁區
確認 SWAP 磁區已經格式化正確格式,如果不確定,可以用這指令再做一次
# /opt/bin/busybox mkswap /dev/scsi/host0/bus0/target0/lun0/part2
啟用 SWAP 磁區,並用指令 free 檢查
# /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2 # free
設定 DD-WRT 重開機後會自動啟用 SWAP,步驟
登入管理網頁 & Administration & Commands & Startup 編輯,接著內容的下方填入
sleep 10 && /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
按 Save Startup 儲存,機器會自動重新開機,然後在以 SSH 登入,執行指令 free 驗證是否自動啟用了 SWAP。
Notes: 到這裡 DD-WRT 的系統環境算是已經完成了所有初始化的設定,接著以下步驟才是本篇的重點章節 - 安裝 Asterisk,看倌們!繼續再看下去。&
參考連結:
Install Asterisk
安裝 Asterisk 主程&#2
# /opt/bin/ipkg-opt --tmp-dir /tmp install asterisk14
安裝 ulaw 語音檔
# /opt/bin/ipkg-opt --tmp-dir /tmp install asterisk14-moh-freeplay-ulaw# /opt/bin/ipkg-opt --tmp-dir /tmp install asterisk14-core-sounds-en-ulaw# /opt/bin/ipkg-opt --tmp-dir /tmp install asterisk14-extra-sounds-en-ulaw
注意!
在安裝 asterisk14-extra-sounds-en-ulaw 時,因為這個檔案比較大(&#MB),系統的暫存區 /tmp 可能不夠用,因此一直無法成功安裝,並且在 /tmp 被填滿後還會使機器自動重開機,這時可以將安裝的暫存目錄改到 USB drive 目錄可以用 /jffs/usb-disk/tmp。
# mkdir /jffs/usb-disk/tmp# /opt/bin/ipkg-opt --tmp-dir /jffs/usb-disk/tmp install asterisk14-extra-sounds-en-ulaw
安裝完成。
註:若要安裝 Asterisk 1.6,請參考以下說明,否則跳過此。
// 若已經安裝 Asterisk-GUI,請先行移除
# /opt/bin/ipkg-opt remove asterisk-gui
// 若已經安裝 Asterisk 1.4,請先執行移除
# /opt/etc/init.d/S50asterisk stop
# /opt/bin/ipkg-opt remove -recursive asterisk14-extra-sounds-en-ulaw
# /opt/bin/ipkg-opt remove -recursive asterisk14-core-sounds-en-ulaw
# /opt/bin/ipkg-opt remove -recursive asterisk14-moh-freeplay-ulaw
# /opt/bin/ipkg-opt remove -recursive asterisk14
# cd /opt/etc
# rm -rf asterisk
# cd /opt/var/lib
# rm -rf asterisk
# cd /opt/var/log
# rm -rf asterisk
# /opt/bin/ipkg-opt install asterisk16
# /opt/bin/ipkg-opt install asterisk-addons
&初始化設定/調校 Asterisk
由於 Asterisk 可以用哪些功能取決於載入的模組,預設環境會啟用所有模組,然而,機器的硬體資源有限,必須載入部份的基礎模組,而其餘都將它們關閉。
啟動或關閉模組,只要編輯 modules.conf 設定檔即可。
# vi /opt/etc/asterisk/modules.conf
; Asterisk configuration file
; Module Loader configuration file By Leif Madsen of
; Descriptions and some modules added by Bill Weidman
autoload=no
; Resources &
;load =& res_adsi. ADSI Resource
;load =& res_agi. Asterisk Gateway Interface (AGI)
;load =& res_config_mysql. MySQL Configuration
;load =& res_config_odbc. ODBC Configuration
;load =& res_crypto. Cryptographic Digital Signatures
load =& res_features. Call Parking Resource
;load =& res_indications. Indications Configuration
;load =& res_monitor. Call Monitoring Resource
load =& res_musiconhold. Music On Hold Resource
;load =& res_odbc. ODBC Resource
;load =& pbx_ael. Asterisk Extension Language Compiler - Requires ?
load =& pbx_config. Text Extension Configuration Requires N/A
;load =& pbx_dundi. Do a DUNDi lookup of a phone number. - Requires res_crypto.so
;load =& pbx_functions. Builtin dialplan functions - Requires N/A
;load =& pbx_loopback. Loopback Dialplan Switch - Requires N/A
;load =& pbx_realtime. Realtime Dialplan Switch - Requires N/A
;load =& pbx_spool. Outgoing Spool Support Requires - N/A
; Functions &
load =& func_callerid. Gets or sets Caller*ID data on the channel. - Requires ?
;load =& func_enum. ENUMLOOKUP and TXTCIDNAME functions - Requres ?
;load =& func_uri. URI encode/decode functions - Requires ?
load =& func_logic. Logical dialplan functions
; Database Call Detail Records &
;load =& cdr_addon_mysql. Mysql CDR Backend - Requires ?
;load =& cdr_csv. Comma Separated Values CDR Backend - Requires N/A
;load =& cdr_custom. Customizable Comma Separated Values CDR Backend - Requires N/A
;load =& cdr_manager. Asterisk Call Manager CDR Backend - Requires N/A
;load =& cdr_odbc. ODBC CDR Backend - Requires N/A
;load =& cdr_pgsql. PostgreSQL CDR Backend - Requires N/A
;load =& cdr_sqlite. SQLite CDR Backend - Requires N/A
; Channels &
;load =& chan_agent. Agent Proxy Channel - Requires res_features.so, res_monitor.so, res_musiconhold.so
;load =& chan_features. Provides summary information on feature channels- Requires N/A
load =& chan_iax2. Inter Asterisk eXchange (Ver 2) - Requires res_crypto.so, res_features.so
;load =& chan_local. Show status of local channels- Requires N/A
;load =& chan_mgcp. Media Gateway Control Protocol (MGCP) - Requires res_features.so
;load =& chan_modem. Generic Voice Modem Driver - Requires N/A
;load =& chan_modem_aopen. A/Open (Rockwell Chipset) ITU-2 VoiceMod- Requires chan_modem.so
;load =& chan_modem_bestdata. BestData (Conexant V.90 Chipset) VoiceModem - Requires chan_modem.so
;load =& chan_modem_i4l. ISDN4Linux Emulated Modem Driver - Requires chan_modem.so
;load =& chan_oss. OSS Console Channel Driver - Requires N/A
;load =& chan_phone. Linux Telephony API Support - Requires N/A
load =& chan_sip. Session Initiation Protocol (SIP) - Requires res_features.so
;load =& chan_skinny. Skinny Client Control Protocol (Skinny) - Requires res_features.so
;load =& chan_zap. Zapata Telephony w/PRI - Requires ?
; Codecs &
;load =& codec_adpcm. Adaptive Differential PCM Coder/Decoder - Requires N/A
load =& codec_alaw. A-law Coder/Decoder - Requires N/A
;load =& codec_a_mu. A-law and Mulaw direct Coder/Decoder - Requires N/A
;load =& codec_g723. G.723 Codect Translator - Requires N/A
;load =& codec_g726. ITU G.726-32kbps G726 Transcoder - Requires N/A
;load =& codec_g729. G729/PCM16 (signed linear) Codec Translator - Requires N/A
;load =& codec_gsm. GSM/PCM16 (signed linear) Codec Translat - Requires N/A
;load =& codec_ilbc. iLBC/PCM16 (signed linear) Codec Translat - Requires N/A
;load =& codec_lpc10. LPC10 2.4kbps (signed linear) Voice Codec Translat - Requires N/A
;load =& codec_speex. Speex/PCM16 (signed linear) Codec Translat - Requires N/A
;load =& codec_ulaw. Mu-law Coder/Decoder - Requires N/A
; Formats &
;load =& format_au. Sun Microsystems AU format (signed linear) - Requires N/A
;load =& format_g723. Raw G.723 data - Requires N/A
;load =& format_g726. Raw G.726 (16/24/32/40kbps) data - Requires N/A
;load =& format_g729. Raw G729 data - Requires N/A
;load =& format_gsm. Raw GSM data - Requires N/A
;load =& format_h263. Raw h263 data - Requires N/A
;load =& format_ilbc. Raw iLBC data - Requires N/A
;load =& format_jpeg. JPEG (Joint Picture Experts Group) Image - Requires N/A
;load =& format_mp3. MP3 - Requires N/A
;load =& format_pcm_alaw. Raw aLaw 8khz PCM Audio support - Requires N/A
load =& format_pcm. Raw uLaw 8khz Audio support (PCM) - Requires N/A
;load =& format_sln. Raw Signed Linear Audio support (SLN) - Requires N/A
;load =& format_vox. Dialogic VOX (ADPCM) File Format - Requires N/A
;load =& format_wav_gsm. Microsoft WAV format (Proprietary GSM) - Requires N/A
load =& format_wav. Microsoft WAV format (8000hz Signed Linear) - Requires N/A
; Applications &
;load =& app_addon_sql_mysql. Do several mySQLy things - Requires ?
;load =& app_adsiprog. Asterisk ADSI Programming Application - Requires res_adsi.so
;load =& app_alarmreceiver. Alarm Receiver for Asterisk - Requires N/A
;load =& app_authenticate. Authentication Application - Requires N/A
;load =& app_cdr. Tell Asterisk to not maintain a CDR for the current call - Requires N/A
;load =& app_chanisavail. Check if channel is available - Requires N/A
;load =& app_chanspy. Listen to the audio of an active channel - Requires N/A
;load =& app_controlplayback. Play a file with fast forward and rewind - Requires N/A
;load =& app_curl. ? - Requires N/A
;load =& app_cut. The application Cut is deprecated. - Requires N/A
;load =& app_db. Database access functions for Asterisk - Requires N/A
load =& app_dial. Dialing Application - Requires res_features.so, res_musiconhold.so
;load =& app_dictate. Virtual Dictation Machine - Requires N/A
;load =& app_directed_pickup. Directed Call Pickup Application - Requres ?
;load =& app_directory. Provide directory of voicemail extensions - Requires N/A
;load =& app_disa. Allows someone from outside an &internal& system dialtone - Requires N/A
;load =& app_dumpchan. Dump Info About The Calling Channel - Requires N/A
load =& app_echo. Echo audio read from channel back to the channel - Requires N/A
;load =& app_enumlookup. EnumLookup is deprecated. Use ENUMLOOKUP() function - Requires N/A
;load =& app_eval. Reevaluates strings - Requires N/A
;load =& app_exec. Allows an arbitrary application to be invoked even when not hardcoded into the dialplan. - Requires N/A
;load =& app_externalivr. External IVR Interface Application - Requires ?
;load =& app_festival. Simple Festival Interface - Requires N/A
;load =& app_flash. Flashes a Zap Trunk - Requires ?
;load =& app_forkcdr. Fork The CDR into 2 separate entities. - Requires N/A
;load =& app_getcpeid. Obtains and displays ADSI CPE ID and other info in order to properly setup zapata.conf for on-hook operations.
;load =& app_groupcount. Deprecated, please use the function GroupCount - Requires N/A
;load =& app_hasnewvoicemail. Indicator whether a voice mailbox has messages in a given folder. - Requires N/A
;load =& app_ices. Encode and Stream via icecast and ices - Requires N/A
;load =& app_image. Sends an image on a channel. - Requires N/A
;load =& app_intercom. Obsolete - does not load
;load =& app_lookupblacklist. Look up Caller*ID name/number from blacklist database - Requires N/A
;load =& app_lookupcidname. Look up CallerID Name from local database - Requires N/A
load =& app_macro. Macro Handling Application - Requires N/A
;load =& app_math. Basic Math Functions - Requires N/A
;load =& app_md5. MD5 checksum applications - Requires N/A
;load =& app_meetme. MeetMe conference bridge - Requires ?
;load =& app_milliwatt. Generate a Constant 1000Hz tone at 0dbm (mu-law) - Requires N/A
load =& app_mixmonitor. Records the audio on the current channel to the specified file. - Requires ?
;load =& app_mp3. Play an MP3 file or stream - Requires N/A
;load =& app_nbscat. Play an NBS local stream - Requires N/A
;load =& app_page. Places outbound calls and dumps them into a conference bridge, muted - Requires ?
;load =& app_parkandannounce. Call Parking and Announce Application - Requires res_features.so
load =& app_playback. Sound File Playback Application - Requires N/A
;load =& app_privacy. Require phone number to be entered, if no CallerID sent - Requires N/A
;load =& app_queue. Queue handling applications - Requires res_features.so, res_monitor.so, res_musiconhold.so
;load =& app_random. Conditionally branches, based upon a probability - Requires N/A
;load =& app_read. Reads a #-terminated string of digits - Requires N/A
;load =& app_readfile. Stores output of file into a variable - Requires N/A
;load =& app_realtime. Use RealTime config handler to read data into channel variables. - Requires N/A
;load =& app_record. Record to a file - Requires N/A
;load =& app_rxfax. Receive a FAX to a file - Requires ?
;load =& app_saycountpl. Polish counting grammar - Requires ?
;load =& app_sayunixtime. Says a specified time in a custom format - Requires N/A
;load =& app_senddtmf. Sends arbitrary DTMF digits - Requires N/A
;load =& app_sendtext. Sends text to current channel (callee). - Requires N/A
load =& app_setcallerid. Set Caller*ID on a call to a new value. - Requires N/A
;load =& app_setcdruserfield. Append to the CDR user field - Requires N/A
;load =& app_setcidname. SetCIDName deprecated in favor of the function CALLERID(name) - Requires N/A
;load =& app_setcidnum. SetCIDNum deprecated in favor of the function CALLERID(number) - Requires N/A
;load =& app_setrdnis. SetRDNIS deprecated in favor of the function CALLERID(rdnis) - Requires N/A
;load =& app_settransfercapability. Set ISDN Transfer Capability - Requires N/A
;load =& app_sms. SMS/PSTN handler - Requires N/A
;load =& app_softhangup. Hangs up the requested channel - Requires N/A
;load =& app_stack. Stack routines - Requires ?
;load =& app_striplsd. Deprecated - Requires N/A
;load =& app_substring. Deprecated - Requires N/A
;load =& app_system. Execute a system command - Requires N/A
;load =& app_talkdetect. Playback with Talk Detection - Requires N/A
;load =& app_test. Interface Test Application - Requires N/A
;load =& app_transfer. Transfer caller to remote extension - Requires N/A
;load =& app_txfax. Trivial FAX Transmit Application - Requires ?
;load =& app_txtcidname. The TXTCIDName deprecated in favor of the TXTCIDNAME dialplan function - Requires N/A
;load =& app_url. Send URL Applications - Requires N/A
;load =& app_userevent. Send an arbitrary event to the manager interface - Requires N/A
;load =& app_verbose. Send arbitrary text to verbose output - Requires N/A
;load =& app_voicemail. Comedian Mail (Voicemail System) - Requires res_adsi.so
;load =& app_waitforring. Waits until first ring after specified time - Requires N/A
;load =& app_waitforsilence. Waits for silence of specified time - Requires N/A
;load =& app_while. While Loops and Conditional Execution - Requires N/A
;load =& app_zapateller. Block Telemarketers with Special Information Tone - Requires N/A
;load =& app_zapbarge. Barges in on a specified zap channel - Requires ?
;load =& app_zapras. Executes a RAS server using pppd on the given channel - Requires ?
;load =& app_zapscan. Scan Zap channels to monitor calls - Requires ?
chan_modem.so=yes
&註:autoload 必須是 no,要關閉模組項,就在前方加上 ; 分號。
啟動 Asterisk
# asterisk 背景執行
# asterisk -vvvc 前景執行,且自動進入 CLI 模式
檢查載入的模組
CLI&module show
Description
res_features.so
Call Features Resource
res_musiconhold.so
Music On Hold Resource
pbx_config.so
Text Extension Configuration
func_callerid.so
Caller ID related dialplan function
func_logic.so
Logical dialplan functions
chan_iax2.so
Inter Asterisk eXchange (Ver 2)
chan_sip.so
Session Initiation Protocol (SIP)
codec_alaw.so
A-law Coder/Decoder
format_pcm.so
Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G. 0
format_wav.so
Microsoft WAV format (8000Hz Signed Line 0
app_dial.so
Dialing Application
app_echo.so
Simple Echo Application
app_macro.so
Extension Macros
app_mixmonitor.so
Mixed Audio Monitoring Application
app_playback.so
Sound File Playback Application
app_setcallerid.so
Set CallerID Application
16 modules loaded
檢查機器的記憶體使用狀況
雖然已經停用了許多模組,看來這款機器內建的 16MB RAM 在運行 Asterisk 後會很吃力。
另外,眼尖的朋友應該會看到 total 好像少了幾 MB 的記憶體,這是因為 DD-WRT 會利用些許記憶體用在 ramdisk,系統在運行中所需要的暫存檔都會使用這個 ramdisk。
設定自動啟動 Asterisk 程序
# mkdir /opt/etc/init.d
# vi /opt/etc/init.d/S50asterisk
case $1 in
if [ -f /opt/var/lib/asterisk/astdb ]; then
cp /opt/var/lib/asterisk/astdb /opt/var/lib/asterisk/astdata
if [ ! -f /var/lib/asterisk/astdb ]; then
mkdir -p /var/lib/asterisk/
if [ -f /opt/var/lib/asterisk/astdata ]; then
cp /opt/var/lib/asterisk/astdata /var/lib/asterisk/astdb
touch /var/lib/asterisk/astdb
if [ -f /opt/var/lib/asterisk/astdb ]; then
rm /opt/var/lib/asterisk/astdb
ln -s /var/lib/asterisk/astdb /opt/var/lib/asterisk/astdb
/opt/sbin/asterisk -q
if [ -f /var/lib/asterisk/astdb ]; then
chmod 755 /var/lib/
chmod 755 /var/lib/asterisk/
if [ -n &`pidof asterisk`& ]; then
/opt/sbin/asterisk -r -x 'stop now'
if [ -f /var/lib/asterisk/astdb ]; then
cp /var/lib/asterisk/astdb /opt/var/lib/asterisk/astdata
echo &usage: $0 (start|stop)&
# chmod 755 /opt/etc/init.d/S50asterisk
# vi /opt/etc/optware.startup
export PATH=/opt/bin:/opt/sbin:$PATH
# Insert whatever it takes to mount the USB drive here
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
for i in /opt/etc/init.d/S??* ; do
# Ignore dangling symlinks (if any).
[ ! -f &$i& ] && continue
case &$i& in
# Source shell script for speed.
trap - INT QUIT TSTP
# No sh extension, so fork subprocess.
) & /tmp/optware_startup.log 2&&1
#chmod 755 /opt/etc/optware.startup
設定 DD-WRT 重開機後會自動啟動 Asterisk,步驟
登入管理網頁 & Administration & Commands & Startup 編輯,接著內容的下方填入
/opt/etc/config/optware.startup
設定 Asterisk 自動關閉程序
# cp /opt/etc/init.d/S50asterisk /opt/etc/init.d/K50asterisk
# vi /opt/etc/config/optware.shutdown
# Insert whatever it takes to mount the USB drive here
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
for i in /opt/etc/init.d/K??* ; do
# Ignore dangling symlinks (if any).
&&&& [ ! -f &$i& ] && continue
&&&& case &$i& in
&&&&&&& *.sh)
&&&&&&&&&&& # Source shell script for speed.
&&&&&&&&&&& (
&&&&&&&&&&&&& trap - INT QUIT TSTP
&&&&&&&&&&&&& set stop
&&&&&&&&&&&&& . $i
&&&&&&&&&&& )
# No sh extension, so fork subprocess.
#chmod 755 /opt/etc/optware.shutdown
設定 DD-WRT 在執行關機程序時會自動停止 Asterisk,步驟
登入管理網頁 & Administration & Commands&,接著內容的下方填入
/opt/etc/config/optware.shutdown
按 Save Shutdown 存檔,重啟機器。
&新增分機
# vi /opt/etc/asterisk/sip.conf
context=defa Default context for incoming calls
;allowguest= Allow or reject guest calls (default is yes)
allowoverlap= Disable overlap dialing support. (Default is yes)
;allowtransfer= Disable all transfers (unless enabled in peers or users)
Default is enabled
;realm=mydomain. Realm for digest authentication
defaults to &asterisk&. If you set a system name in
asterisk.conf, it defaults to that system name
Realms MUST be globally unique according to RFC 3261
Set this to your host name or domain name
bindport=5060 UDP Port to bind to (SIP standard port is 5060)
bindport is the local UDP port that Asterisk will listen on
bindaddr=0.0.0.0 IP address to bind to (0.0.0.0 binds to all)
srvlookup=ye Enable DNS SRV lookups on outbound calls
Note: Asterisk only uses the first host
in SRV records
Disabling DNS SRV lookups disables the
ability to place SIP calls based on domain
names to some other SIP users on the Internet
#include &/opt/etc/asterisk/sip_custom.conf&
;pedantic=ye Enable checking of tags in headers,
# vi /opt/etc/asterisk/sip_custom.conf
; SIP accounts
type=friend
context=internal
callerid=&Softphone& &1000&
qualify=yes
secret=1111
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw
type=friend
context=internal
callerid=&Home& &1001&
qualify=yes
secret=1111
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw
# vi /opt/etc/asterisk/extensions.conf
;priorityjumping=yes
; User context is where entries from users.conf are registered.
; default value is 'default'
;userscontext=default
; You can include other config files, use the #include command
; (without the ';'). Note that this is different from the &include& command
; that includes contexts within other contexts. The #include command works
; in all asterisk configuration files.
;#include &filename.conf&
#include &/opt/etc/asterisk/extensions_custom.conf&
; The &Globals& category contains global variables that can be referenced
; in the dialplan with the GLOBAL dialplan function:
; ${GLOBAL(VARIABLE)}
; ${${GLOBAL(VARIABLE)}} or ${text${GLOBAL(VARIABLE)}} or any hybrid
; Unix/Linux environmental variables can be reached with the ENV dialplan
; function: ${ENV(VARIABLE)}
# vi /opt/etc/asterisk/extensions_custom.conf
;;; apps context
exten =& 444,1,Answer()
exten =& 444,n,Wait(1)
exten =& 444,n,Echo
;;; incoming calls context
[incoming]
;exten =& ,1,Dial(SIP/1001,30)
;exten =& ,n,Dial(SIP/1002,30)
;exten =& ,n,Dial(SIP/1000,30)
;;; outgoing calls context
; local calls only
include =& apps
exten =& _1XXX,1,Dial(SIP/${EXTEN})
exten =& _1XXX,n,NoOp(===== DIAL STATUS --& ${DIALSTATUS} =====)
exten =& _1XXX,n,Hangup()
; national (Belgium, code 32) calls only
[national]
include =& local
include =& apps
;exten =& _0N.,1,Dial(SIP/0032${EXTEN:1}@itsp_ipness)
;exten =& _0N.,n,NoOp(===== DIAL STATUS --& ${DIALSTATUS} =====)
;exten =& _0N.,n,Hangup()
; international calls
[international]
;include =& national
;include =& local
;include =& apps
;exten =& _00.,1,Dial(SIP/${EXTEN}@itsp_ipness)
;exten =& _00.,n,NoOp(===== DIAL STATUS --& ${DIALSTATUS} =====)
;exten =& _00.,n,Hangup()
存檔後,重啟 Asterisk 服務
# /opt/etc/init.d/S50asterisk stop
# /opt/etc/init.d/S50asterisk start
參考連結:
&在 LAN 網路作通話測試
使用 SJphone 註冊分&#2,&#2 Echo Test -& OK
使用 PAP2 註冊分&#2,撥分&#2 -& OK
在保持兩個 Channels 持續通話,系統的資源使用狀態:
DD-WRT 網頁的資訊
使用 top 指令觀察 CPU 使用
使用 free 指令觀察記憶體使用
CPU 資訊
Memory 資訊
&在 WAN 網路作通話測試
如果分機是在外部網路的 Internet 上,在DD-WRT預設的環境下外部分機是無法向 Asterisk 註冊的,解決方法也很簡單,只要在防火牆規則開啟需要的通訊埠即可。
執行步驟如下:
登入管理網頁 & Administration & Commands 文字框填入
iptables -I INPUT 1 -p udp --dport 5060 -j ACCEPT
iptables -I INPUT 1 -p udp --dport
iptables -I INPUT 1 -p udp --dport 4569 -j ACCEPT
或者,改成比較安全的規則如下(僅適用外部分機使用固定IP時):
iptables -I INPUT 1 -p udp --dport 5060 -s outbound_ip_of_outside_extension -j ACCEPT
iptables -I INPUT 1 -p udp --dport
-s outbound_ip_of_outside_extension -j ACCEPT
iptables -I INPUT 1 -p udp --dport 4569 -s outbound_ip_of_outside_extension -j ACCEPT
按 Save Firewall 存檔,重啟機器。
提示!
第二行的 port 範圍,必須與 Asterisk 的 rtp.conf 的設定相同。 如果沒有分機使用外部網路,這個防火牆變更可以不用執行,此時的網路相對也會比較安全。 outbound_ip_of_outside_extension 以外部分機的真實 IP 位址代替。
重點總結
DD-WRT 會用到的各種指令
登入管理頁 & Administration & Commands
Startup (開機指令)
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part3 /jffs/usb-disk
sleep 10 && mount /dev/scsi/host0/bus0/target0/lun0/part4 /mnt
sleep 10 && /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2
/opt/etc/config/optware.startup
Shutdown (關機指令)
/opt/etc/config/optware.shutdown
Firewall (防火牆指令)
iptables -I INPUT 1 -p udp --dport 5060 -j ACCEPT
iptables -I INPUT 1 -p udp --dport
iptables -I INPUT 1 -p udp --dport 4569 -j ACCEPT
重建 Profile (選用)
#& vi /opt/etc/profile
export PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin
export PS1='\u@\h:\w\$ '
[ -x /opt/bin/less ] || alias less=more
[ -x /opt/bin/vim ] || alias vim=vi
arp() { cat /proc/net/ }
ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
reboot() {
echo &$(nvram get rc_shutdown)& & /tmp/.rc_shutdown
if [ -f /tmp/.rc_shutdown ]; then
chmod +x /tmp/.rc_shutdown
/tmp/.rc_shutdown
/opt/sbin/asterisk -rx &stop now& & /dev/null 2&&1 &--- 這行作用是在關機前再一次關閉 Asterisk, 可不加。
& /sbin/reboot
#& vi /opt/etc/config/optware.startup
增加藍字的部份
export PATH=/opt/bin:/opt/sbin:$PATH
[ -e /opt/etc/profile ] && mount -o bind /opt/etc/profile /etc/profile
# Insert whatever it takes to mount the USB drive here
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
for i in /opt/etc/init.d/S??* ; do
# Ignore dangling symlinks (if any).
[ ! -f &$i& ] && continue
case &$i& in
# Source shell script for speed.
trap - INT QUIT TSTP
# No sh extension, so fork subprocess.
) & /tmp/optware_startup.log 2&&1
延伸閱讀
什麼連接到這裡
文件大小日期附件上傳者&&USB_Flash_Drive24.71 KB18:54, 16 Oct 2009&ASUS WL-520GU2.96 KB17:23, 14 Oct 2009&DD-WRT CPU & Memory36.77 KB00:07, 19 Oct 2009DD-WRT free7.85 KB00:07, 19 Oct 2009&DD-WRT top36.04 KB00:11, 19 Oct 2009&DD-WRT with SSH13.66 KB23:59, 18 Oct 2009&DD-WRT Status49.17 KB00:00, 19 Oct 2009&DD-WRT CPU12.05 KB10:19, 17 Dec 2009&DD-WRT Memory9.63 KB10:19, 17 Dec 2009
Powered by
訊息在秒內將關閉
訊息計時器已經停止
查看詳細資訊:

我要回帖

更多关于 memsource 的文章

 

随机推荐