Merge branch 'feature/improved-configuration'
This commit is contained in:
commit
425a29a27a
38
asterisk/extensions.conf
Normal file
38
asterisk/extensions.conf
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[+441234567890]
|
||||||
|
; Redirect incoming calls from trunk with context +441234567890 to internal extension 0.
|
||||||
|
exten => _+X.,1,Goto(internal,0,1)
|
||||||
|
|
||||||
|
[outgoing]
|
||||||
|
; Redirect all calls entering this context via SIP trunk "twilio".
|
||||||
|
exten => _X.,1,Dial(SIP/twilio/+${EXTEN})
|
||||||
|
same => n,Hangup
|
||||||
|
|
||||||
|
|
||||||
|
[internal]
|
||||||
|
; Dialplan for extension 1000.
|
||||||
|
; Dial SIP user 1000. Timeout after 10 seconds.
|
||||||
|
exten => 1000,1,Dial(SIP/1000,10)
|
||||||
|
same => n,VoiceMail(${EXTEN})
|
||||||
|
same => n,Hangup
|
||||||
|
|
||||||
|
; Dialplan for extension 1001.
|
||||||
|
exten => 1001,1,Dial(SIP/1001,10)
|
||||||
|
same => n,VoiceMail(${EXTEN})
|
||||||
|
same => n,Hangup
|
||||||
|
|
||||||
|
|
||||||
|
; Dialgroup "everyone" at extension 0 to ring mulitple extensions.
|
||||||
|
exten => 0,1,Set(DIALGROUP(everyone,add)=SIP/1000)
|
||||||
|
same => n,Set(DIALGROUP(everyone,add)=SIP/1001)
|
||||||
|
same => n,Dial(${DIALGROUP(everyone)},10)
|
||||||
|
same => n,VoiceMail(${EXTEN})
|
||||||
|
same => n,Hangup
|
||||||
|
|
||||||
|
|
||||||
|
; Dialplans for redirecting calls to outgoing context.
|
||||||
|
; Redirect international calls in format 00441234567890.
|
||||||
|
exten => _00X.,1,Goto(outgoing,${EXTEN:2},1)
|
||||||
|
; Redirect international calls in format +441234567890.
|
||||||
|
exten => _+X.,1,Goto(outgoing,${EXTEN:1},1)
|
||||||
|
; Redirect outgoing national calls in format 01234567890.
|
||||||
|
exten => _0ZX.,1,Goto(outgoing,44${EXTEN:1},1)
|
2
asterisk/modules.conf
Normal file
2
asterisk/modules.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[modules]
|
||||||
|
autoload=yes
|
35
asterisk/sip.conf
Normal file
35
asterisk/sip.conf
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
[general]
|
||||||
|
; Default context for incoming calls.
|
||||||
|
context=public
|
||||||
|
; Determines whether a phone is available before accepting call.
|
||||||
|
qualify=yes
|
||||||
|
|
||||||
|
; Settings common to all trunks.
|
||||||
|
[trunk](!)
|
||||||
|
type=peer
|
||||||
|
nat=no
|
||||||
|
qualify=yes
|
||||||
|
insecure=port,invite
|
||||||
|
dtmfmode=rfc2833
|
||||||
|
allow=ulaw,alaw,G729
|
||||||
|
|
||||||
|
; Settings common to all internal extensions.
|
||||||
|
[internal](!)
|
||||||
|
context=internal
|
||||||
|
type=friend
|
||||||
|
host=dynamic
|
||||||
|
allow=ulaw,alaw,G729
|
||||||
|
|
||||||
|
|
||||||
|
; Twilio trunk.
|
||||||
|
[twilio](trunk)
|
||||||
|
context=+441234567890
|
||||||
|
fromuser=+441234567890
|
||||||
|
host=example.pstn.ie1.twilio.com
|
||||||
|
|
||||||
|
; Internal extensions.
|
||||||
|
[1000](internal)
|
||||||
|
secret=supersecurepassword
|
||||||
|
|
||||||
|
[1001](internal)
|
||||||
|
secret=supersecurepassword
|
12
asterisk/voicemail.conf
Normal file
12
asterisk/voicemail.conf
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[general]
|
||||||
|
format=wav
|
||||||
|
maxsilence=10
|
||||||
|
maxmessage=180
|
||||||
|
|
||||||
|
[default]
|
||||||
|
; Voicemail inbox for missed dialgroup calls.
|
||||||
|
0 => 0000,0,test@example.com
|
||||||
|
|
||||||
|
; Voicemail inboxes for individual extensions.
|
||||||
|
1000 => 0000,1000,test@example.com
|
||||||
|
1001 => 0000,1001,test@example.com
|
@ -1,12 +0,0 @@
|
|||||||
[general]
|
|
||||||
autofallthrough=yes
|
|
||||||
|
|
||||||
[globals]
|
|
||||||
|
|
||||||
[nexmo-trunk]
|
|
||||||
exten => _X.,1,Dial(SIP/${EXTEN},30)
|
|
||||||
|
|
||||||
[internal]
|
|
||||||
exten => 666,1,Dial(SIP/666)
|
|
||||||
exten => 777,1,Dial(SIP/777)
|
|
||||||
exten => _X.,1,Dial(SIP/${EXTEN}@nexmo-<phone_number>)
|
|
@ -1,2 +0,0 @@
|
|||||||
[modules]
|
|
||||||
autoload=yes
|
|
51
nexmo.conf
51
nexmo.conf
@ -1,51 +0,0 @@
|
|||||||
[general]
|
|
||||||
context=nexmo-trunk
|
|
||||||
register => <username>:<api_key>@sip.nexmo.com
|
|
||||||
nat=yes
|
|
||||||
|
|
||||||
[nexmo]
|
|
||||||
context=nexmo-trunk
|
|
||||||
fromdomain=sip.nexmo.com
|
|
||||||
type=peer
|
|
||||||
insecure=port,invite
|
|
||||||
nat=no
|
|
||||||
dtmfmode=rfc2833
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=G729
|
|
||||||
|
|
||||||
[nexmo-sip-01](nexmo)
|
|
||||||
host=5.10.112.121
|
|
||||||
|
|
||||||
[nexmo-sip-02](nexmo)
|
|
||||||
host=5.10.112.122
|
|
||||||
|
|
||||||
[nexmo-sip-03](nexmo)
|
|
||||||
host=119.81.44.6
|
|
||||||
|
|
||||||
[nexmo-sip-04](nexmo)
|
|
||||||
host=119.81.44.7
|
|
||||||
|
|
||||||
[nexmo-sip-05](nexmo)
|
|
||||||
host=169.60.141.29
|
|
||||||
|
|
||||||
[nexmo-sip-06](nexmo)
|
|
||||||
host=169.60.141.30
|
|
||||||
|
|
||||||
|
|
||||||
[nexmo-<phone_number>]
|
|
||||||
context=nexmo-trunk
|
|
||||||
username=<username>
|
|
||||||
defaultuser=<username>
|
|
||||||
secret=<api_key>
|
|
||||||
fromuser=<phone_number>
|
|
||||||
fromdomain=sip.nexmo.com
|
|
||||||
host=sip.nexmo.com
|
|
||||||
type=peer
|
|
||||||
insecure=very
|
|
||||||
qualify=yes
|
|
||||||
nat=no
|
|
||||||
dtmfmode=rfc2833
|
|
||||||
allow=ulaw
|
|
||||||
allow=alaw
|
|
||||||
allow=G729
|
|
Loading…
x
Reference in New Issue
Block a user