Sample Asterisk config for Hong Kong BroadBand
The following information has been depreciated” On 2006-Mar-09, Subscribers to the old non-“2b” system were re-assigned to the “2b” system.
If you were a subscriber to the old non-“2b” system, then please follow the configuration information found here with the following changes:
- The username and fromuser setting is your phone number with hk suffixed. For example, if your phone number was 35971111, then your username and fromuser will be 35971111hk.
- Your register line should reflect the new username:
register => 35971111:[email protected]/35971111
becomes
register => 35971111hk:[email protected]/35971111
What follows is no longer valid. This is here for historical reasons.
Assumptions:
- Account created before October 2005 (if your account is with HKBN’s “2b” system, then you want to look here)
- Acct num used on Website: 699999997
- Softphone password: abcdef9876
- Phone number: 35129898
sip.conf
[general]
port=5060
bindaddr=0.0.0.0
pedantic=no
autocreatepeer=no
disallow=all
allow=ulaw,alaw,gsm
canreinvite=no
nat=no
context=from-sip
;;; ''Beginning of stuff for NAT support''
externip====my.static.ip.address.or.Fully.Qualified.Dynamic.Domain.Name===
localnet====my.local.internal.ip.address/net.mask===
;;; ''End of stuff for NAT support''
register => ===699999997===:[email protected]:5060/===35129898===
[mcs1.hkbn.net]
type=peer
username====699999997===
secret====abcdef9876===
port=5060
host=mcs1.hkbn.net
fromuser====35129898===
fromdomain=mcs1.hkbn.net
context=from-hkbn
canreinvite=no
insecure=very
disallow=all
allow=alaw,gsm
dtmfmode=inband
nat=yes
extensions.conf
[from-sip]
;;; Default context for all incoming SIP calls without a specific context definition
exten => _X.,1,Congestion
[from-hkbn]
;;; Incoming calls enter into this context
;;; I'll configure it to start the EchoTest
exten => 35129898,1,Answer
exten => 35129898,2,NoOp(==> ${TIMESTAMP}: Starting EchoTest for ${CALLERIDNUM})
exten => 35129898,3,Wait(2)
exten => 35129898,4,Playback(demo-echotest)
exten => 35129898,5,Echo
exten => 35129898,6,Playback(demo-echodone)
exten => 35129898,7,NoOp(==> ${TIMESTAMP}: Ending EchoTest for ${CALLERIDNUM})
exten => 35129898,8,Hangup
[default]
;;; Call out to the HK Observatory using HKBN
exten => 1878200,1,Dial(SIP/[email protected])