Asterisk 接駁香港的電信供應商的一些經驗
用 Asterisk 的 TDM400 Analog board 來接駁香港各大電信供應商基本上沒有問題。最少,我們用Zaptel 的基本設定時,tone set frequency 完全不用修改便可用到。效果滿意。
相反,Asterisk 的T1 Digital board (小弟窮,所以只用 T110 為例)便不同了。因為香港是用香港自己的 HKPRI(IDA-P),因此Asterisk 的 digital interface
未必可以順利接駁香港的電信供應商。以下是我自己親自試用的結果:
配置:
Asus PIII Mother Board
Digium T110 T1/E1 board
Redhat Linux 9
Asterisk 1.2.13
Libpri 1.2.7
zaptel 1.2.10
1, 電訊盈科 PCCW
Switchtype 用 4ESS,測試效果:OK。
2, 和記環球電訊 HGC
Switchtype 用 4ESS,測試效果:OK。
3, 城市電訊 (HKBN)
測試效果:Fail。技術人員也不清楚他們的 digital line 是用什麼的 Switchtype。只知道 NSF (Network Specific Facility) IE 需要設定為 megacom。
可能 HKBN 在這市場還新吧。
如果在香港用 Asterisk 的 IDA-P 的話,有兩點需要注意:
1, Zapata.conf 內 signalling 設定為 pri_cpe
2, Dialplan 內需要經 IDA-P trunk 撥電話出外的話,必須在 Dial() 前加多一句指令:
exten => _X.,n,SetTransferCapability(SPEECH)
如果沒有這一句的話,例如我現在用 HGC,我的Asterisk 只會成功撥號到 HGC 自己的電話,但需要撥出到其他網例如 Smartone,PCCW,etc….便撥號失敗。
不知道大家在香港的朋友有沒有用過 Asterisk 接駁其他香港的固網的經驗呢?
各方友好的測試結果:
作者 zK WarfTT Switchtype [ 回覆 ]
11/06/2008, 03:49
Hi there,
Tried Warftt a year before (testing only in their facility) and
switchtype = ni1
signalling=pri_cpe
works.
I can’t remember if I tested outgoing calls or if outgoing calls has problem reaching non-local networks. So I am not sure if SetTransferCapability you mentioned is required or not.
按: 我自己測試過 Whalf T&T 的 T1時發現有點兒有趣的地方。因為他們的機樓是分別用 Nortel 或中興。如果用 Nortel 的話,Asterisk 便需要配置為 ni1,如果用中興的話,配置便要改為 4ess。
作者 admin
11/06/2008, 12:09This result is tested with HGC engineers together. Thanks.
作者 voipbeer [ 回覆 ]
28/06/2008, 00:32您好:
你的Blog 非常的不錯!
我玩 Asterisk 前後也有好幾年了
但都僅限於IP部分(因為捨不得買T1/E1 card)
最近想花錢買Digium TE110P 來測試 asterisk + isup
弄一個 isup gateway, 順便買個G.729 licence
不知道 TE110P 這塊板子,你覺得用起來quality 如何呢?
另外我一直都是用free的 G.729 codec, 很明顯的
與其他SIP proxy 比較下,語音品質真的差很多,尤其是當asterisk Background() 按下DTMF時,會有 “破音” 出現,不知道您在這方面有無經驗呢??
thank you! ^_^ voipbeer
作者 admin
29/06/2008, 13:24Hello voipbeer,
Digium TE110P 好像已經停產了。現在出的是 TE120P。
我現在用 TE110P,質素OK。我覺得它和其他大廠出品的版卡沒有分別呢。
我未用過free的 G.729 codec。但我自己也感受到G.729的語音質素(E.g. Avaya)。技術上 G.729 的確真正 bandwidth consumption 很少少,雖然它的語音質素OK,而DTMF不會有破音的情況出現。但是,我會感覺到通話時感覺怪怪的。尤其是說話和說話中間的 silence 因為要減低
bandwidth consumption,所以如果不說話時會感覺到 dead air 出現,好像斷了線一樣。因此,我現在公司的工程人員如果幫客戶設定 codec 的時候,G.729並不是首選。但是如果 call centre是很大,或需要經 Internet 傳輸的話又另作別論。
請問你現在是用那一 free 的 G.729 呢?
Comment from xonie
Time 2008 年 11 月 14 日 at 10:54:37
想問一下…我們公司有一部Digium Asterisk Switchvox AA60, 我地是否需要用電話公司提供的Busy Forward來redirect phone number? AA60可否做到Hunting的作用呢? (for incoming call)
Comment from admin
Time 2008 年 11 月 21 日 at 10:21:55
Digium Asterisk Switchvox AA60我未曾用過,但要做 busy call forward 和 incoming hunting 是 Telco 所提供的服務, AA60 應該不需要做 setting
11/06/2008, 03:49Hi there,
Tried Warftt a year before (testing only in their facility) and
switchtype = ni1
signalling=pri_cpe
works.
I can’t remember if I tested outgoing calls or if outgoing calls has problem reaching non-local networks. So I am not sure if SetTransferCapability you mentioned is required or not.
11/06/2008, 12:09This result is tested with HGC engineers together. Thanks.
28/06/2008, 00:32您好:
你的Blog 非常的不錯!
我玩 Asterisk 前後也有好幾年了
但都僅限於IP部分(因為捨不得買T1/E1 card)
最近想花錢買Digium TE110P 來測試 asterisk + isup
弄一個 isup gateway, 順便買個G.729 licence
不知道 TE110P 這塊板子,你覺得用起來quality 如何呢?
另外我一直都是用free的 G.729 codec, 很明顯的
與其他SIP proxy 比較下,語音品質真的差很多,尤其是當asterisk Background() 按下DTMF時,會有 “破音” 出現,不知道您在這方面有無經驗呢??
thank you! ^_^ voipbeer
29/06/2008, 13:24Hello voipbeer,
Digium TE110P 好像已經停產了。現在出的是 TE120P。
我現在用 TE110P,質素OK。我覺得它和其他大廠出品的版卡沒有分別呢。
我未用過free的 G.729 codec。但我自己也感受到G.729的語音質素(E.g. Avaya)。技術上 G.729 的確真正 bandwidth consumption 很少少,雖然它的語音質素OK,而DTMF不會有破音的情況出現。但是,我會感覺到通話時感覺怪怪的。尤其是說話和說話中間的 silence 因為要減低
bandwidth consumption,所以如果不說話時會感覺到 dead air 出現,好像斷了線一樣。因此,我現在公司的工程人員如果幫客戶設定 codec 的時候,G.729並不是首選。但是如果 call centre是很大,或需要經 Internet 傳輸的話又另作別論。
請問你現在是用那一 free 的 G.729 呢?




本人有一些 T1 問題想請教一下, 如我想用 TE122P/B + Asterisk 1.4 電訊公司是 Wharf T&T, 請問有無問題 ? 需要什麼 Setting (本人是新手只接觸過 TDM Card) ? T1 的 DDI/DID 和 CALLERID Setting ? MANY THANKS.
WT&T 的 switch type 是行 4ess 或 NI1 是但一種。這需要問問 WT&T 的師傅。Hints: 如果你的 IDAP 是接駁他們的中興 switch,很大機會是用 4ess ,如果是 nortel,這便是 NI1。雖然 switch type 設定為 national 理論上沒有問題。
/etc/dahdi/system.conf 的設定
span=1,1,0,esf,b8zs
bchan=1-23
dchan=24
loadzone = us
defaultzone=us
echocanceller=mg2,1-23
/etc/asterisk/chan_dahdi.conf 的設定
switchtype=4ess
allow=ulaw
signalling=pri_cpe
usecallerid=yes
channel => 1-23
還有,在香港你需要設定 Asterisk 用 IDAP 是比較冒險的,這需要一點兒運氣。始終 Digium 的設備是未經 OFTA 正式批准使用。祝好運。
好多謝你的回覆, 冒險方面最壞會什麼情況? 另外 T1 的 DDI/DID (INCOMING) & CALLERID (OUTGOING) 怎樣設定 ?
電信設備能夠係香港便用,嚴格來說是需要經OFTA審批。另外香港的IDA-P有一定規格,即是萬一有什麼技術上有什麼問題,Telco可以不負責。這便要Take your own risk。詳情可以看OFTA 網頁參考。
—般DID或DNIS可以在dialplan 控制。這很難在這裡三言兩語說清楚。司以在internet 找相關的資料。
好多謝你的資料, 本人已到Telco機樓測試, 全部都通過, 起初都不能成功連接T1, 但經過多翻嘗試所有問題都解決, Many Thanks.
客氣客氣
請問你有沒有試過用FreeSWITCH接駁IDAP,我試緊,但有小小問題,o吾知係o吾係関香港IDAP o即signalling 問題。謝謝。
另外,初學的朋友可以試試Elastix http://www.elastix.org/ ,裝完就用得。
你現在是用那一間 Telco 呢?
我用緊PCCW,問題已經解決,似乎係我用黎打入條電話綫o即問題。
其實兩只software我都係第一次用,唔撿Asterisk係因爲覺得佢做dynamic dial plan o即方法(AGI)唔係o甘好。伊家試緊FreeSWITCH個mod_xml_cur module,雖然都係唔係o甘理想,不果就好似整齊D。
關於dynamic dial plan,希望你可以俾D意見,謝謝囘覆。
我自己用緊 AGI 加 Java Script Engine (Rhino on Java or Spidermonkey on C++) 來實作 dynamic dialplan. 雖然唔係好”靚仔”,但仍然可以使用。
我想請教一下, 我已安裝了 TE122 Card 和 T1 line, 但發現回音好勁, 我是用 Hardware Echo Cancellation, 我也調校過 chan_dahdi.conf 的 echocancel 設定, 但都是無法解決回音問題, 請指教.
echocancel=yes
echocancelwhenbridged=no
faxdetect=incoming
echotraining=800
rxgain=5.0
txgain=-7.0
Tks
試一試把 rxgain 和 txgain 數值減少看看。
Very good with your blog and document.
Could I ask a question there, I’m use asterisk dial T1 to PSTN. When I dial HK local number all is ok. When dial China mobile is OK too. But cannot dial chian fixed number. I dial 0080860755*****, I have changed the switchtype, pridialplan and no help with this. Could you have such problem too or any advice. The hangup code is 1, the detail info as below:
————————————————-
— Executing Dial(“SIP/5800-b7b21158″, “Zap/g1/00808607553889988|30|tTo”) in new stack
— Requested transfer capability: 0×00 – SPEECH
— Called g1/00808607553889988
— Zap/1-1 is proceeding passing it to SIP/5800-b7b21158
— Channel 0/1, span 1 got hangup request, cause 1
— Hungup ‘Zap/1-1′
————————————————–
I’m use HGC IDAP. Asterisk 1.2.30.2 , TE122 T1 card.
zaptel config:
—————————————————-
loadzone=uk
defaultzone=us
# Span 1: WCT1/0 “Wildcard TE122 Card 0″
span=1,1,0,esf,b8zs
# termtype: te
bchan=1-23
dchan=24
—————————————————-
zapata.conf
—————————————————-
[trunkgroups]
[channels]
context=trunkinbound
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=7.0
txgain=7.0
group=1
callgroup=1
pickupgroup=1
immediate=no
switchtype=euroisdn
#pridialplan=unknown
#prilocaldialplan=unknow
context=trunkinbound
group=1
signalling=pri_cpe
channel =>1-23
—————————————————-
Thanks.
First, HGC IDA-P is using 4ess as switch type. Try to change the switch type as 4ess in the zapata.conf
Also, try to add SetTransferCapability(SPEECH) before Dial() in the dialplan.
We also have 0080 IDD and it is working fine.
BTW, the result code of the hangup (hangup cause) is 1 (unallocated number).
Asterisk 新人,打算係NAS上裝 Asterisk,請問怎樣可以像文中所提一樣3連接上香港電話線?
需要買哪些硬件?哪裏買便宜些?謝謝!
我估計你是用 QNAP 吧。因為他們沒有配備 PCI 或 PCI-e,所以不可能直接轉駁 PSTN 。必須有 VoIP Gateway 把 PSTN 的信號轉接到你的 NAS 上。可以上 Taobao 一看。價格由幾百至幾千不等。
你指的 VOIP Gateway 是不是好像 SPA3000 這樣的設備,這樣 NAS 就可以在內網中連到 Gateway? 有甚麼便宜又好用的 Gateway 介紹?多謝!
大家好,有朋友試過駁香港 telco 的 analog DDI/DID 線嗎?是否用 wink start 駁 FXO 就可以了?用哪張咭的?謝!
Asterisk 不支持 analog DDI/DID 線
I wanna to use 24-port AEX2406EF analog card in HK with telco WTT. Any settings I need to know for asterisk 1.6? thx
應該沒有問題. 如果你用 Elastix 更易設定呢!
申請WT&T的IDAP(T1),有幾點不太明白.
我只有Asterisk Analog line的經驗.
我除了申請DDI及CND(來電顯示外),還要申請DNIS嗎?
一般DDI都是SENT 3個digits嗎?
以下是申請表中不太明白的地方:
CLI Delivery for originating calls (From PBX, Y/N)
CLI Delivery for terminating calls (To PBX, Y/N)
謝謝大家
最近想同 WTT 申請 IDAP + Digium T110 T1/E1 board
佢地 provide 到 100 個 number
但是我想唔通 IDAP + asterisk 點運作
因為我以前只玩 sip
1) IDAP call in 時就收到對方 call 邊個 number 再 ring extension ?
請指教
Yes, 同 sip 的 concept 一樣。你可以在 ${EXTEN} 中獲得 IDA-P 送進來的 DNIS。
通常填這份 form 的相關技術資料上,如要申請 IDA-P ,DNIS,DNIS 的長度和來電顯示是必定要的。DID 應該無須填寫。其他的技術資料例如 protocol 相關 (4ess, DMS100 等可以在安裝測試和電信公司 join test 時電話溝通即可。
記住:來電顯示是需要付費的。所以首次申請時記得問消楚有沒有來電顯示功能。
Thanks for your kindly help!
Thanks admin
即係我向 telco 申請時
要 Caller ID 同 DNIS, 仲有一般用 DNIS 要 8 個位就可以了
是不是正確 ?
如果是wt&t,一般只有3及4個dnis的選擇