OpenVox A400P 是一個完全相容 Asterisk 平台的 PSTN 電話介面卡,可用來連結 Asterisk 與傳統市話線及傳統電話交換機。
A400P 包含有 4 個應用模組,可用於 FXS 及 FXO,且相容於 Asterisk/Trixbox/Elastix/PIAF 等各種電話交換平台。
產品規格
官方網站連結
文章列表
#lspci ... 00:0a.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface ... #lspci -vvv ... 00:0a.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface Subsystem: Unknown device b100:0003 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 32 (250ns min, 32000ns max) Interrupt: pin A routed to IRQ 11 Region 0: I/O ports at b000 [size=256] Region 1: Memory at f5000000 (32-bit, non-prefetchable) [size=4K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=55mA PME(D0+,D1-,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME+ ...
Tips:
一般來說,綠色模組是 FXS, 紅色模組是 FXO。
由於 Elastix/PIAF 已經內建的 Dahdi 的驅動程式,所以只要執行指令,系統可以偵測卡片並自動做好基本設定:
# vi /etc/dahdi/genconf_parameters lc_country tw
# dahdi_genconf
這個指令會依照卡片的類型,自動產生兩個主要的設定檔:
PIAF 預設在開機時會啟動不同類型卡片的驅動模組,如果想關閉其他沒用到的,編輯 /etc/dahdi/modules
... # Digium TDM400P: up to 4 analog ports wctdm ...
其他的就用註解方式關閉。
編輯 /etc/modprobe.d/dahdi.conf
options wctdm opermode=TAIWAN
機器作一次重新開機。
執行 dahdi_cfg
$ dahdi_cfg -vvv DAHDI Tools Version - 2.4.1 DAHDI Version: 2.4.1 Echo Canceller(s): MG2 Configuration ====================== Channel map: Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02) Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03) Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04) 4 channels to configure. Setting echocan for channel 1 to mg2 Setting echocan for channel 2 to mg2 Setting echocan for channel 3 to mg2 Setting echocan for channel 4 to mg2
Tips:
如果 channel 顯示 FXO kewlstart, 這是 FXS port, 所以這張卡片是 01-02 FXS, 03-04 FXO。
如何檢查 dahdi 版本
root@pbx:~ $ dmesg | grep dahdi dahdi: Telephony Interface Registered on major 196 dahdi: Version: 2.4.1 dahdi: Registered tone zone 0 (United States / North America) dahdi_echocan_mg2: Registered echo canceler 'MG2' dahdi: Registered tone zone 14 (Taiwan)
dahdi_cfg
root@pbx:~ $ dahdi_cfg -vvvv DAHDI Tools Version - 2.4.1 DAHDI Version: 2.4.1 Echo Canceller(s): MG2 Configuration ====================== Channel map: Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02) Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03) Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04) 4 channels to configure. Setting echocan for channel 1 to mg2 Setting echocan for channel 2 to mg2 Setting echocan for channel 3 to mg2 Setting echocan for channel 4 to mg2
dahdi_genconf
用來產生 system.conf 及 /etc/asterisk/dahdi-channels.conf
dahdi_hardware
root@pbx:~ $ dahdi_hardware pci:0000:00:08.0 wctdm+ e159:0001 Wildcard TDM400P REV E/F
dahdi_scan
root@pbx:~ $ dahdi_scan [1] active=yes alarms=OK description=Wildcard TDM400P REV E/F Board 5 name=WCTDM/4 manufacturer=Digium devicetype=Wildcard TDM400P REV E/F location=PCI Bus 00 Slot 09 basechan=1 totchans=4 irq=10 type=analog port=1,FXS port=2,FXS port=3,FXO port=4,FXO
dahdi_monitor
dahdi_monitor 3 -v -r rx.raw
請確定 /etc/asterisk/chan_dahdi.conf 內有包含以下內容:
[trunkgroups] [channels] usecallerid=yes callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes group=1 callgroup=1 pickupgroup=1 #include dahdi-channels.conf #include chan_dahdi_additional.conf
注意:
- 如果沒使用 FreePBX,可刪除最後兩行。
- 有使用 FreePBX 者,最後兩行的順序必須同上。
重啟 Asterisk 服務
顯示 dahdi 可用的 channel 狀態
pbx*CLI> dahdi show channels Chan Extension Context Language MOH Interpret Blocked State pseudo default default In Service 1 from-internal default In Service 2 from-internal default In Service 3 from-pstn default In Service 4 from-pstn default In Service
Tips:
一般來說,FXS port 應該要用 from-internal, FXO port 用 from-pstn 或 from-zaptel。
要作通話測試前,必須將卡片上的 FXS/FXO port 順序找出來,並且將電話桌機接上 FXS, 以及市話外線接入 FXO。
要辨識 port 的位置,可以透過系統上的硬體資訊再加上卡片的外觀顏色來確認,以下示意圖可說明:
Ans:
Ans: 編輯 /etc/asterisk/chan_dahdi.conf,加上
;Uncomment these lines if you have problems with the disconection of your analog lines ; for FXO Hangup Detection Issue busydetect=yes busycount=3 busypattern=250,250
如果以上設定無效,可能是電信公司傳送的忙線音太過小聲,導致系統無法偵測,可以將 rxgain=4.0 這樣來驗證,不過這設定會可能會造成分機端出現回音。
Ans: 修改 callprogress=yes, progzone=us ,參閱 Asterisk 的 DSP 模組優化。
Ans:
# cat /proc/dahdi/1 Span 1: WCTDM/4 "Wildcard TDM400P REV E/F Board 5" (MASTER) 1 WCTDM/4/0 FXOKS (In use) (EC: MG2 - INACTIVE) 2 WCTDM/4/1 FXOKS (In use) (EC: MG2 - INACTIVE) 3 WCTDM/4/2 FXSKS (In use) RED (EC: MG2 - INACTIVE) 4 WCTDM/4/3 FXSKS (In use) RED (EC: MG2 - INACTIVE) # dahdi_hardware pci:0000:00:08.0 wctdm+ e159:0001 Wildcard TDM400P REV E/F # dahdi_cfg -vvvv DAHDI Tools Version - 2.6.0-rc1 DAHDI Version: 2.6.0-rc1 Echo Canceller(s): HWEC, MG2 Configuration ====================== Channel map: Channel 01: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 01) Channel 02: FXO Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 02) Channel 03: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 03) Channel 04: FXS Kewlstart (Default) (Echo Canceler: mg2) (Slaves: 04) 4 channels to configure. Setting echocan for channel 1 to mg2 Setting echocan for channel 2 to mg2 Setting echocan for channel 3 to mg2 Setting echocan for channel 4 to mg2
Images 2 | ||
---|---|---|
A400P - FXO & FXSa400p-modules.png | OpenVox A400PA400P.jpg |