2009年5月22日 星期五

Asterisk相關軟體下載位址

X-Lite Softphone
http://www.counterpath.com/index.php?menu=download

2009年5月5日 星期二

三種signaling protocol

三種signaling protocol

loop start (ls)
ground start (gs)
kewlstart (ks)

2009年4月20日 星期一

利用Inter-Asterisk eXchange連接兩台Asterisk交換機

Toronto(192.168.1.30)

==================================================================================
/etc/asterisk/iax.conf
[general]
autokill=yes

register => toronto:welcome@192.168.1.31

[osaka]
type=friend
host=dynamic
trunk=yes
secret=welcome
context=incoming_osaka
deny=0.0.0.0/0.0.0.0
permit=192.168.1.31/255.255.255.255
==================================================================================
/etc/asterisk/sip.conf
[general]

[1001]
type=friend
host=dynamic
context=phones
==================================================================================
/etc/asterisk/extensions.conf
[globals]

[general]
autofallthrough=yes

[default]

[incoming_calls]

[phones]
include => internal
include => remote

[internal]
exten => _1XXX,1,NoOp()
exten => _1XXX,n,Dial(SIP/${EXTEN},30)
exten => _1XXX,n,Playback(the-party-you-are-calling&is-curntly-unavail)
exten => _1XXX,n,Hangup()

[remote]
exten => _2XXX,1,NoOp()
exten => _2XXX,n,Dial(IAX2/osaka/${EXTEN})
exten => _2XXX,n,Hangup()

[incoming_osaka]
include => internal


==================================================================================


Osaka(192.168.1.31)
==================================================================================
/etc/asterisk/iax.conf
[general]
autokill=yes

register => osaka:welcome@192.168.1.30

[toronto]
type=friend
host=dynamic
trunk=yes
secret=welcome
context=incoming_toronto
deny=0.0.0.0/0.0.0.0
permit=192.168.1.30/255.255.255.255
==================================================================================
/etc/asterisk/sip.conf
[general]

[2001]
type=friend
host=dynamic
context=phones
==================================================================================
/etc/asterisk/extensions.conf
[globals]

[general]
autofallthrough=yes

[default]

[incoming_calls]

[phones]
include => internal
include => remote

[internal]
exten => _2XXX,1,NoOp()
exten => _2XXX,n,Dial(SIP/${EXTEN},30)
exten => _2XXX,n,Playback(the-party-you-are-calling&is-curntly-unavail)
exten => _2XXX,n,Hangup()

[remote]
exten => _1XXX,1,NoOp()
exten => _1XXX,n,Dial(IAX2/toronto/${EXTEN})
exten => _1XXX,n,Hangup()

[incoming_toronto]
include => internal

2009年3月29日 星期日

修理過的光碟機

2009/03/30 TEAC CD-524E
 MANUFACTURED 1997/08

2009年3月11日 星期三

第一次設定Grandstream HandyTone-488

第一次設定Grandstream HandyTone-488

1. 請將網路線接至HandyTone-488之LAN port

2. 網路線的另一頭請接至電腦的網路孔

3. 將該電腦設為「自動取得IP位址」

4. 不久後電腦會取得以下網路資訊
  (1)IP位址為:192.168.2.2
  (2)Default Gateway為:192.168.2.1

5. 請開啟瀏覽器,並在網址列輸入:http://192.168.2.1
6. 接著會要我們輸入密碼,此時請輸入「admin」後按下「login」

7. 設定HandyTone-488的網路相關訊息(請依實際環境設定)

  (1)點選「BASIC SETTINGS」
  (2)點選「statically configured as」
  (3)在「IP Address」中輸入:192.168.1.36
  (4)在「Subnet Mask」中輸入:255.255.255.0
  (5)在「Default Router」中輸入:192.168.1.251
  (6)在「DNS Server 1」中輸入:168.95.1.1
  (7)在「DNS Server 2」中輸入:168.95.192.1
  (8)在「Time Zone」中選擇:「GMT+8:00 (Beijing, Singapore, Taipei, Kuala Lumpur, Irkutsk, Perth)」
  (9)最後請按下「Update」完成設定
  (10)此時HandyTone-488會要求重新開機,請點選「Reboot」。
  
===================================================================================================

觀看Grandstream HandyTone-488的韌體版本

1. 請先進入Grandstream HandyTone-488的網頁管理界面

2. 接著請點選「STATUS」,此時螢幕上會列出關於Grandstream HandyTone-488的一些資訊,
  請留意「Software Version」這行,即得知到目前韌體版本為何。
  例如:
     Program-- 1.0.3.44
     Bootloader-- 1.0.8.11
     HTML-- 1.0.3.44
     VOC-- 1.0.0.10

===================================================================================================

更新Grandstream HandyTone-488韌體

1. 請先登入Grandstream HandyTone-488

2. 登入後請點選「ADVANCED SETTINGS」

3. 看到「Firmware Upgrade and Provisioning」項目

  (1)點選「TFTP」
  (2)在「Firmware Server Path」中輸入:「168.75.215.189」
  (3)在「Config Server Path」中輸入:「168.75.215.180」
  (4)按下「Update」
  (5)點選「Reboot」重新啟動Grandstream HandyTone-488
  (6)重新啟動後,Grandstream HandyTone-488會自動從網路上下載最新韌體並更新,
    請等待五分鐘,在未能登入Grandstream HandyTone-488前代表韌體未更新完成,
    請勿將電源關閉,以免更新失敗造成Grandstream HandyTone-488無法啟動。
  (7)更新完成後,請登入Grandstream HandyTone-488,點選「STATUS」,
    比對「Software Version」這行,即可得知目前韌體版本更新到第幾版。
  例如:
     Program-- 1.0.3.44
     Bootloader-- 1.1.0.1 (更新)
     HTML-- 1.0.3.44
     VOC-- 1.0.0.13 (更新)

4. 若不想讓Grandstream HandyTone-488每次重新啟動就檢查是否有更新檔並更新,
  請到「Firmware Upgrade and Provisioning」項目,依下列步驟設定:

  (1)點選「HTTP」
  (2)清空「Firmware Server Path」內的資料
  (3)清空「Config Server Path」內的資料
  (4)按下「Update」完成設定
  (5)點選「Reboot」重新啟動
  

2009年3月9日 星期一

Asterisk 1.4安裝過程

請先下載並燒錄CentOS 5.2 Disc01 ~ Disc04之光碟影像檔(ISO)

1. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.2/isos/i386/CentOS-5.2-i386-bin-1of6.iso
2. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.2/isos/i386/CentOS-5.2-i386-bin-2of6.iso
3. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.2/isos/i386/CentOS-5.2-i386-bin-3of6.iso
4. http://ftp.cs.pu.edu.tw/Linux/CentOS/5.2/isos/i386/CentOS-5.2-i386-bin-4of6.iso

===================================================================================================

在Package Group Selection視窗中請勾選以下項目:

1. Administration Tools
2. Base
3. Development Libraries
4. Development Tools
5. Dialup Networking Support
6. Editors
7. Engineering and Scientific
8. FTP Server
9. KDE (K Desktop Environment)
10. KDE Software Development
11. MySQL Database
12. PostgreSQL Database
13. Server Configuration Tools
14. System Tools
15. Text-based Internet
16. Web Server
17. Windows File Server
18. X Software Development
19. X Window System

===================================================================================================

更新Linux系統

1. yum check-update
2. yum -y update
3. shutdown -r now

===================================================================================================

安裝必備套件

1. yum -y install gcc*
2. yum -y install kernel-*
3. yum -y install lynx
4. yum -y install speex
5. yum -y install speex-devel
6. yum -y install unixODBC-devel
7. yum -y install libtool-ltdl-devel
8. yum -y install mysql-devel
9. yum -y install php-*

===================================================================================================

基本系統設定

1. vi /etc/odbcinst.ini
  (1)註解掉以下內容:
   # [PostgreSQL]
   # Description = ODBC for PostgreSQL
   # Driver = /usr/lib/libodbcpsql.so
   # Setup = /usr/lib/libodbcpsqlS.so
   # FileUsage = 1
  (2)對以下內容取消註解:
   [MySQL]
   Description = ODBC for MySQL
   Driver = /usr/lib/libmyodbc.so
   Setup = /usr/lib/libodbcmyS.so
   FileUsage = 1
  (3)改Driver = /usr/lib/libmyodbc.so
    為Driver = /usr/llib/libmyodbc3.so

2. service mysqld start
3. chkconfig mysqld on

4. service httpd start
5. chkconfig httpd on

6. 使用yum安裝webmin
  (1)vi /etc/yum.repos.d/webmin.repo
  (2)新增以下內容到webmin.repo檔案中
   [webmin]
   name=webmin Distribution Neutral
   baseurl=http://download.webmin.com/download/yum
   enabled=1
  (3)rpm --import http://www.webmin.com/jcameron-key.asc
  (4)yum -y install webmin

7. 在文字模式下使用VNC
  (1)yum -y install kdelibs*
  (2)yum -y install kde-i18n-Chinese-Big5

  (3)vi /usr/share/config/kdm/kdmrc
   找到[Xdmcp]段,將Enable=false改成Enable=1

  (4)vi /usr/share/config/kdm/Xaccess
   找到「#* #any host can get a login window」這行
   改成「* #any host can get a login window」

  (5)service vncserver start

  (6)設定VNC密碼:
   vncpasswd

  (7)vi /etc/sysconfig/vncservers
   加入以下內容:
    VNCSERVERS="2:root"

  (8)vi /root/.vnc/xstartup
   將以下內容:
    # unset SESSION_MANAGER
    # exec /etc/X11/xinit/xinitrc
   改成如下:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xinitrc

  (9)chkconfig vncserver on

8. 安裝VirtualBox
  (1)http://download.virtualbox.org/virtualbox/2.2.0/VirtualBox-2.2.0_45846_rhel5-1.i386.rpm
  (2)rpm -ivh VirtualBox-2.2.0_45846_rhel5-1.i386.rpm

9. shutdown -r now

===================================================================================================

安裝Asterisk 1.4

1. wget http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz
2. wget http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz
3. wget http://downloads.digium.com/pub/zaptel/zaptel-1.4-current.tar.gz

4. 安裝Zaptel
  (1)tar zxvf zaptel-1.4-current.tar.gz
  (2)cd zaptel-1.4.12.1/
  (3)make clean
  (4)./configure
  (5)make menuselect
  (6)make
  (7)make install
  (8)make config
  (9)chkconfig zaptel on

5. 安裝libpri
  (1)tar zxvf libpri-1.4-current.tar.gz
  (2)cd libpri-1.4.9/
  (3)make clean
  (4)make
  (5)make install

6. 安裝Asterisk
  (1)tar zxvf asterisk-1.4-current.tar.gz
  (2)cd asterisk-1.4.23.1/
  (3)make clean
  (4)./configure
  (5)make menuselect
  (6)make install
  (7)make samples
  (8)make progdocs
  (9)make config
  (10)chkconfig asterisk on

7. shutdown -r now

===================================================================================================

驅動Zaptel硬體

1. cd /etc
2. mv zaptel.conf zaptel.conf.mmkko
3. vi zaptel.conf
4. 加入以下內容
  fxoks=1,2
  fxsks=3,4
  loadzone=tw
  defaultzone=tw
5. 上述配置說明如下:
  我們系統上有一張4 port的TDM400P REV I Board 1的卡片
  1,2 port插上fxs子卡;3,4 port插上fxo子卡
  由於fxs port必需使用fxo信令,所以fxoks=1,2(fxoks代表信令;1,2代表fxs子卡的1,2 port)
  相同地fxo port必需使用fxs信令,所以設定fxsks=3,4
6. 設定完zaptel.conf後,請使用指令:ztcfg -vv載入設定值;
  設定成功後TDM400P的所有燈號將顯示綠燈(所有port皆未接線)。

驅動Zapata硬體

===================================================================================================

1. cd /etc/asterisk
2. vi zapata.conf
  加入以下內容:
  [trunkgroups]
  ; define any tunk groups

  [channels]
  ; hardware channels

  ; default
  usecallerid=yes
  hidecallerid=no
  callwaiting=no
  threewaycalling=yes
  transfer=yes
  echocancel=yes
  echotraining=yes
  immediate=no

  ; define channels

  context=phones
  signalling=fxo_ks
  channel => 1,2

  context=incoming
  signalling=fxs_ks
  channel => 3,4


===================================================================================================

設定Dialplan

1. cd /etc/asterisk
2. mv extensions.conf extensions.conf.mmkko
3. vi extensions.conf
4. 加入以下內容:
  [internal]
  exten => 500,1,Verbose(1|Echo test application)
  exten => 500,n,Echo()
  exten => 500,n,Hangup()

  [phones]
  include => internal