本帖最後由 lawleo 於 2012-7-14 17:10 編輯
extension.conf- [macro-phone]
- exten => s,1,Dial(SIP/${MACRO_EXTEN},25)
- exten => s,n,Goto(${DIALSTATUS},1)
- exten => ANSWER,1,Hangup
- exten => CANCEL,1,Hangup
- exten => NOANSWER,1,Voicemail(${MACRO_EXTEN}@default,u)
- exten => BUSY,1,Voicemail(${MACRO_EXTEN}@default,b)
- exten => CONGESTION,1,Voicemail(${MACRO_EXTEN}@default,b)
- exten => CHANUNAVAIL,1,Voicemail(${MACRO_EXTEN}@default,u)
- exten => a,1,VoicemailMain(${MACRO_EXTEN}@default)
- [stations]
- exten => 10,1,Macro(phone)
- exten => 20,1,Macro(phone)
- exten => 4242,1,VoicemailMain(default)
- [long-distance]
- ; long-distance (I do not know how to dial long distance yet)
- [local]
- exten => _[1-9].,1,Dial(SIP/${EXTEN}@VoIPProvider)
- [users]
- include => stations
- include => local
- include => long-distance
- [from_cmphone]
- exten => 8523502XXXX,1,Dial(SIP/10,30)
複製代碼 sip.conf- [general]
- port=5070
- bindaddr=0.0.0.0
- pedantic=yes
- register=8523502XXXX:XXXX@202.0.179.3/8523502XXXX
- [10]
- type=peer
- host=dynamic
- secret=10
- context=users
- mailbox=10@default
- [20]
- type=peer
- host=dynamic
- secret=20
- context=users
- mailbox=20@default
- [VoIPProvider]
- type=peer
- host=202.0.179.3
- port=5060
- username=8523502XXXX
- fromuser=8523502XXXX
- secret=XXXX
- insecure=port,invite
- context=from_cmphone
- dtmfmode=auto
- canreinvite=no
- qualify=no
複製代碼 |