本帖最後由 角色 於 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 |