返回列表 發帖

HKBN 2b Asterisk两种注册参数可能

本帖最後由 角色 於 2010-8-10 05:47 編輯

在HKBN 2b,给你电话中,会出现两组注册参数,不能从电话里面猜测出来,要具体测试。如果第一组不成功,改用第二组设定。

假如HKBN 2b给你的电话号码和密码是

2b Telephone Number:36123456
2b Telephone Password :your_2b_password

Outbound Calls
打出的prefix是 9,那么拨打香港电话为:9 + <HK Telephone numbers>
<HK Telephone numbers> : 3 or more digits HK Telephone numbers

Inbound Calls
打入用extension 6001接。


第一组 Asterisk 2b settings

1) Edit /etc/hosts, add the following line:
203.80.89.135   s2hkbntel.net s21.hkbntel.net

2) Edit /etc/asterisk/sip.conf and add the following lines:

register => 36123456hk:your_2b_password@s2hkbntel.net:5060/36123456

[hkbn2b]
type=peer
nat=yes
username=3123456hk
secret=your_2b_password
port=5060
host=s2hkbntel.net
fromuser=36123456hk
fromdomain=s2hkbntel.net
canreinvite=no
insecure=very
disallow=all
;allow=ulaw
allow=alaw
dtmfmode=auto
context=from-hkbn

3) Edit/etc/asterisk/extensions.conf by adding the following lines

;HKBN 2b outbound calls
exten => _9XX.,1,Dial(SIP/${EXTEN:1}@hkbn2b,,r)
exten => _9XX.,n,Hangup()

;HKBN 2b inbound calls
[from-hkbn]
exten => 36123456,1,Dial(SIP/6001,,r)
exten => 36123456,n,Hangup()


第二组 Asterisk 2b settings

1) Edit /etc/hosts, replace the old one in the first settings "203.80.89.135   s2hkbntel.net s21.hkbntel.net" by the following line. Others remain unchanged.

203.80.89.139   s2hkbntel.net s22.hkbntel.net

For details, please refer to http://www.voip-info.org/wiki/view/asterisk+settings+HKBN+2b

YH

謝謝角色兄,會否合力做一本中港台的VOIP 手冊,總結大家的心德。

TOP

先感谢你有这样的热情,你这个想法非常好,在网上根本没有这个的中文材料,都是我们一点一滴积累下来的成果。

你的想法非常赞同,其实在的电脑里有【香港一人一VoIP电话】和【香港一人一Asterisk Server】。有时间我把资料整理好,然后大家可以参与修改或者增补都可以。

角色

TOP

還有是一個簡單資料庫放files 如我們的 codecs

TOP

已经放在固顶里的link里。

角色

TOP

另外在 Asterisk 1.6.2.X 發生的問題,切勿加入outbound CID in the user extensions. ,因為會今HKBN2b 錯誤而得出 Got SIP response 500 "Server Internal Error" back from 203.80.89.139

現在出入正常,謝謝角色兄的協助。

TOP

那么你可以享受多线“同时”打出和打入的SIP Trunk乐趣。这个跟FXO port完全不同概念。如果跟它比,可能是E1 Trunk吧!

角色

TOP

還有,遲些和大家分享,將2b放入 自己 favorite's Desktop PC sip client, In & Out 都冇問題。

我用Zoiper paid up 版,可以使用不同的 SIP & IAX connections

TOP

可否再協助,現在打出冇問號,不過打入全接留言。

TOP

你是都有多过一个2b号码呢?

角色

TOP

Very disappointed.  For unknown reason, inbound for my HKBN 2b account is ok. But now outbound still have problems.
Either 500 error or 603 error

My sip.conf
[general]
context = default
allowoverlap = no
bindport = 5060
bindaddr = 0.0.0.0
srvlookup = yes
autodomain = no
callevents = no
defaultexpiry = 90
dtmfmode = rfc2833
externrefresh = 10
localnet = 192.168.118.0/255.255.255.128
nat = yes
notifyringing = yes
qualify = 3000
domain =

register = 35635612hk:secret@s2hkbntel.net:5060/35635612

[hkbn2b]
type = peer
nat = yes
username = 355635612hk
secret = secret
port = 5060
host = s2hkbntel.net
fromuser = 35635612hk
fromdomain = s2hkbntel.net
canreinvite = no
insecure = no
disallow = all
allow = alaw
dtmfmode = auto
context = from-hkbn2b

Any suggestion?

TOP

What is the error message when you are trying to make outbound calls via 2b trunk?

YH

TOP

either 500 internal server error or 603 call declined. If you search for 603 error, no definitive error description.
For out going, I think the context [hkbn2b] should be the my focus. However, I have no idea why. I have put similar string into IP01 which is asterisk 1.4 but no luck

TOP

Please let me see the settings for 2b outbound call in your extensions.conf.

YH

TOP

;dial-out via HKBN 2b
[CallingRule_hkbn-out_nocid]
exten => _9XXXXXXXX,1,Dial(SIP/133${EXTEN:1}@hkbn2b)
exten => _9XXXXXXXX,n,Hangup()

TOP

返回列表