Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------extensions.conf
- [default]
- exten => _[0-9].,1,NoOp(#### [default] ####)
- exten => _[0-9].,n,NoOp(we shouldn't ever be here, drop the call)
- exten => _[0-9].,n,Hangup()
- exten => i,1,Hangup()
- exten => h,1,Hangup()
- exten => t,1,Hangup()
- [from-internal]
- ; internal calls between extensions
- exten => 201,1,Dial(SIP/201)
- exten => 201,n,Hangup()
- exten => 202,1,Dial(SIP/202)
- exten => 202,n,Hangup()
- ; send all other numbers to outbound trunk
- exten => _[0-9].,1,NoOp(#### [from-internal] ####)
- exten => _[0-9].,n,Set(CALLERID(num)=+12225550162)
- exten => _[0-9].,n,Dial(SIP/+${EXTEN:1}@trunk)
- exten => _[0-9].,n,Hangup()
- [from-trunk]
- ; send all incoming calls from trunk DDI numbers to extension 202
- exten => _[0-9].,1,NoOp(#### [from-trunk] ####)
- exten => _[0-9].,n,Dial(SIP/202)
- exten => _[0-9].,n,Hangup()
- ---------------sip.conf
- [general]
- context=default
- allowguest=no
- ;allowoverlap=no
- bindport=5060
- ;bindaddr=0.0.0.0
- dtmfmode=rfc2833
- ;srvlookup=no
- disallow=all
- allow=alaw
- allow=ulaw
- allow=gsm
- allow=g723
- allow=g726
- allow=speex
- ;alwaysauthreject=yes
- ;canreinvite=no
- ;nat=yes
- ;session-timers=refuse
- ;localnet=192.168.0.0/255.255.255.0
- ; replace INBOUND_SIP_USERNAME and INBOUND_SIP_PASSWORD
- ; with your Inbound SIP Registration credentials
- register => *****:"*****?c"@trunk
- [201]
- type=friend
- host=dynamic
- username=201
- secret=########
- context=from-internal
- qualify=yes
- nat=force_rport,comedia
- [202]
- type=friend
- host=dynamic
- username=202
- secret=########
- context=from-internal
- qualify=yes
- nat=force_rport,comedia
- [trunk]
- type=peer
- ;host=eu.st.ssl7.net ; Europe POP
- host=amn.st.ssl7.net ; North America POP
- context=from-trunk
- qualify=yes
- defaultuser=<*****>
- remotesecret=**********
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement