1
0

Initial demo attempt at improved configuration. No SIP trunk currently.

This commit is contained in:
Jack Hadrill 2020-02-14 19:03:20 +00:00
parent dd81269e04
commit 7e3ff8074f
4 changed files with 69 additions and 20 deletions

View File

@ -1,12 +1,36 @@
[general] [incoming]
autofallthrough=yes ; Redirect incoming calls to extension 441452221649 to internal extension 0.
exten => 441234567890,1,Goto(internal,0,1)
[globals]
[nexmo-trunk] [outgoing]
exten => _X.,1,Dial(SIP/${EXTEN},30) ; Redirect outgoing calls via SIP provider.
exten => _X.,1,Dial(SIP/441234567890)
[internal] [internal]
exten => 666,1,Dial(SIP/666) ; Dialplan for extension 1000.
exten => 777,1,Dial(SIP/777) ; Dial SIP user 1000. Timeout after 10 seconds.
exten => _X.,1,Dial(SIP/${EXTEN}@nexmo-<phone_number>) 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 outgoing national calls in format 01234567890.
exten => _0ZX.,1,Goto(outgoing,0044${EXTEN:1},1)
; Redirect international calls in format 00441234567890.
exten => _00X.,1,Goto(outgoing,${EXTEN},1)

View File

@ -1,13 +1,26 @@
#include nexmo.conf [general]
; Default context for incoming calls.
context=public
; Determines whether a phone is available before accepting call.
qualify=yes
[666]
; Settings common to all internal extensions.
[internal-extension](!)
context=internal
type=friend type=friend
host=dynamic host=dynamic
secret=123 allow=ulaw,alaw
context=internal
[777] [1000](internal-extension)
secret=supersecurepassword
[1001](internal-extension)
secret=supersecurepassword
[441234567890]
context=incoming
secret=supersecurepassword
type=friend type=friend
host=dynamic host=dynamic
secret=456 allow=ulaw,alaw
context=internal

12
voicemail.conf Normal file
View 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