回復 25# ckleea
1. Put the following line to /etc/hosts- 203.80.89.135 s2hkbntel.net s21.hkbntel.net
複製代碼 2. sip.conf- [general]
- srvlookup=yes
- nat=yes
- realm=xxx.yyy.org
- externhost=xxx.yyy.org
- fromdomain=xxx.yyy.org
- localnet=192.168.1.0/255.255.255.0
- externrefresh = 1
- defaultexpirey=120
- bindport=5060
- qualify=yes
- disallow=all
- allow=ulaw,alaw,gsm
- alwaysauthreject=yes
- tos_sip=cs3
- tos_audio=ef
- tos_video=af41
- context=front-desk
- ;HKBN 2b
- register => 36112233hk:2b_password@s2hkbntel.net:5060/36112233
- [hkbn2b]
- type=peer
- username=36112233hk
- secret=2b_password
- port=5060
- host=s2hkbntel.net
- fromuser=36112233hk
- fromdomain=s2hkbntel.net
- canreinvite=no
- canredirect = no
- insecure=port,invite
- dtmfmode=auto
- context=from-hkbn
複製代碼 3. extensions.conf- ;HK PSTN Gateway, with CID
- [trunk-hk-pstn-yh9]
- exten => _9XX.,1,Dial(SIP/${EXTEN:1}@hkbn2b,,r)
- ;HKBN 2b dial-in
- [from-hkbn]
- exten => 36112233,1,GotoIf($[${CALLERID(num)} = 96xxxyyy]?YH-call)
- exten => 36112233,n,GotoIf($[${CALLERID(num)} = 64xxxyyy]?Paul-call)
- exten => 36112233,n,Dial(SIP/2004,,)
- exten => 36112233,n,Hangup()
- exten => 36112233,n(YH-call),GoTo(internal,1130,1)
- exten => 36112233,n(Paul-call),Goto(internal-paul-ivr,1131,1);
- [internal]
- ;TW IVR
- exten => 1130,1,Answer
- exten => 1130,n,Wait(3)
- exten => 1130,n,Background(vm-enter-num-to-call)
- exten => 1130,n,WaitExten
- exten => 1130,n,Playback(vm-goodbye)
- exten => 1130,n,Hangup
- exten => i,1,Playback(pbx-invalid)
- exten => i,2,Goto(1130,1)
- exten => t,1,Playback(vm-goodbye)
- exten => t,2,n,Hangup
- [inter-paul-ivr]
- exten => _1,1,Dial(SIP/21xx,,)
- exten => _2,1,Dial(SIP/21yy,,)
- exten => 1131,1,Answer
- exten => 1131,n,Wait(3)
- exten => 1131,n,Background(vm-enter-num-to-call)
- exten => 1131,n,WaitExten
- exten => 1131,n,Playback(vm-goodbye)
- exten => 1131,n,Hangup
- exten => i,1,Playback(pbx-invalid)
- exten => i,2,Goto(1131,1)
- exten => t,1,Playback(vm-goodbye)
- exten => t,2,n,Hangup
複製代碼 |