ast: mobile - add voicemail, call return
This commit is contained in:
parent
08db1f73ee
commit
a13de38413
|
@ -62,7 +62,8 @@ exten => 3,1,Goto(outbound-one,${number},1)
|
||||||
exten => nonum,1,Playback(unidentified-no-callback)
|
exten => nonum,1,Playback(unidentified-no-callback)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
exten => timeout,1,Hangup()
|
exten => timeout,1,Playback(vm-goodbye)
|
||||||
|
same => Hangup()
|
||||||
|
|
||||||
[app-vm]
|
[app-vm]
|
||||||
exten = 1571,1,Verbose(1, "${CALLERID(num)} dialed the voicemail feature.")
|
exten = 1571,1,Verbose(1, "${CALLERID(num)} dialed the voicemail feature.")
|
||||||
|
|
|
@ -2,22 +2,68 @@
|
||||||
|
|
||||||
; Remember, context names for each SIP account are specified in pjsip_wizard.conf.
|
; Remember, context names for each SIP account are specified in pjsip_wizard.conf.
|
||||||
;
|
;
|
||||||
|
[globals]
|
||||||
|
; first queue.
|
||||||
|
QUEUE_ONE = queue-one
|
||||||
|
|
||||||
|
; Voicemail address (configured in voicemail.conf)
|
||||||
|
VOICEMAIL_BOX = 1000@default
|
||||||
|
|
||||||
; First, some safeguards against abuse of the built-in contexts.
|
; First, some safeguards against abuse of the built-in contexts.
|
||||||
[default]
|
[default]
|
||||||
exten => s,1,Verbose(1, "info ${CALLERID(num)} was passed to default")
|
exten => s,1,Verbose(1, "info: ${CALLERID(num)} was passed to default")
|
||||||
same => n,Hangup(3)
|
same => n,Hangup(3)
|
||||||
|
|
||||||
[presence]
|
[presence]
|
||||||
exten => _X.,hint,PJSIP/${EXTEN}
|
exten => _X.,hint,PJSIP/${EXTEN}
|
||||||
|
|
||||||
[from-ext]
|
[app-lastcallreturn]
|
||||||
|
exten => 1471,1,Verbose(1, "info: ${CALLERID(num)} dialed app-lastcallreturn.")
|
||||||
|
same => n,Set(number=${DB(lastcaller/${CALLERID(num)})})
|
||||||
|
same => n,Answer(2)
|
||||||
|
same => n,GotoIf($["${number}" = ""]?nonum,1)
|
||||||
|
same => n,Playback(info-about-last-call&telephone-number)
|
||||||
|
same => n,Wait(1)
|
||||||
|
same => n,SayDigits(${number})
|
||||||
|
same => n,Wait(1)
|
||||||
|
same => n,Playback(to-call-num-press)
|
||||||
|
same => n,Playback(digits/3)
|
||||||
|
same => n,WaitExten(10)
|
||||||
|
same => n,Goto(timeout,1)
|
||||||
|
|
||||||
|
exten => 3,1,Goto(outbound-one,${number},1)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
||||||
|
exten => nonum,1,Playback(unidentified-no-callback)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
||||||
|
exten => timeout,1,Playback(vm-goodbye)
|
||||||
|
same => Hangup()
|
||||||
|
|
||||||
|
[app-vm]
|
||||||
|
exten = 1571,1,Verbose(1, "info: ${CALLERID(num)} dialed voicemail")
|
||||||
|
same = n,VoiceMailMain(${CALLERID(num)}@default,s)
|
||||||
|
same = n,Hangup()
|
||||||
|
|
||||||
|
[from-quectel0]
|
||||||
|
exten => s,1,Queue(${QUEUE_ONE},nr,,,50)
|
||||||
|
same => n,Answer(500)
|
||||||
|
same => n,Voicemail(${VOICEMAIL_BOX},su)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
||||||
|
[from-ext]
|
||||||
exten => 123,1,Goto(i,1)
|
exten => 123,1,Goto(i,1)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
exten => _XX.,1,Dial(Quectel/quectel0/${EXTEN},,r)
|
exten => _XX.,1,Dial(Quectel/quectel0/${EXTEN},,r)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
|
exten => 1471,1,Goto(app-lastcallreturn,${EXTEN},1)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
||||||
|
exten => 1571,1,Goto(app-vm,${EXTEN},1)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
||||||
exten => i,1,Answer(1)
|
exten => i,1,Answer(1)
|
||||||
same => n,PlayTones(info)
|
same => n,PlayTones(info)
|
||||||
same => n,Wait(2)
|
same => n,Wait(2)
|
||||||
|
@ -27,3 +73,8 @@ exten => i,1,Answer(1)
|
||||||
same => n,Playback(cannot-complete-as-dialed&check-number-dial-again)
|
same => n,Playback(cannot-complete-as-dialed&check-number-dial-again)
|
||||||
same => n,PlayTones(info)
|
same => n,PlayTones(info)
|
||||||
same => n,Hangup()
|
same => n,Hangup()
|
||||||
|
|
||||||
|
[to-ext]
|
||||||
|
exten => s,1,Set(DB(lastcaller/${EXTEN})=${CALLERID(num)})
|
||||||
|
same => n,Dial(PJSIP/${EXTEN},,r)
|
||||||
|
same => n,Hangup()
|
||||||
|
|
|
@ -78,7 +78,7 @@ dtmf = relax ; control of incoming DTMF detection, possible values:
|
||||||
|
|
||||||
; quectel required settings
|
; quectel required settings
|
||||||
[quectel0]
|
[quectel0]
|
||||||
context = quectel0
|
context = from-quectel0
|
||||||
exten = +447123456789
|
exten = +447123456789
|
||||||
|
|
||||||
audio = /dev/ttyUSB1 ; tty port for audio connection; no default value
|
audio = /dev/ttyUSB1 ; tty port for audio connection; no default value
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
; /etc/asterisk/queues.conf
|
||||||
|
;
|
||||||
|
; Global queue settings go in this section.
|
||||||
|
;
|
||||||
|
; Modifed and "borrowed" (read: stolen) https://www.sacredheartsc.com/blog/building-a-personal-voip-system/
|
||||||
|
;
|
||||||
|
[general]
|
||||||
|
; Persist dynamic member lists in the astdb.
|
||||||
|
persistentmembers = yes
|
||||||
|
|
||||||
|
; Some options for more intuitive queue behavior.
|
||||||
|
autofill = yes
|
||||||
|
monitor-type = MixMonitor
|
||||||
|
shared_lastcall = yes
|
||||||
|
log_membername_as_agent = yes
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;
|
||||||
|
; Queue Definitions
|
||||||
|
;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
; The first queue is for incoming calls to our lines.
|
||||||
|
[queue-one]
|
||||||
|
; For each incoming call, ring all members of the queue.
|
||||||
|
strategy = ringall
|
||||||
|
|
||||||
|
; Max number of seconds a caller waits in the queue.
|
||||||
|
timeout = 90
|
||||||
|
|
||||||
|
; Don't announce estimated hold time, etc.
|
||||||
|
announce-frequency = 0
|
||||||
|
announce-holdtime = no
|
||||||
|
announce-position = no
|
||||||
|
periodic-announce-frequency = 0
|
||||||
|
|
||||||
|
; Allow ringing even when no queue members are present.
|
||||||
|
joinempty = yes
|
||||||
|
leavewhenempty = no
|
||||||
|
|
||||||
|
; Ring member phones even when they are on another call.
|
||||||
|
ringinuse = yes
|
||||||
|
|
||||||
|
; Queue Members
|
||||||
|
;
|
||||||
|
; Each member is specified with the following format:
|
||||||
|
; member => INTERFACE,PENALTY,FRIENDLY_NAME,PRESENCE_INTERFACE
|
||||||
|
;
|
||||||
|
; The "penalty" value is not interesting for our use case.
|
||||||
|
; With PJSIP, the BLF/Presence interface is identical to the standard interface name.
|
||||||
|
member => Local/1000@to-ext,0,1000,PJSIP/1000
|
|
@ -0,0 +1,47 @@
|
||||||
|
[general]
|
||||||
|
format = wav49|gsm|wav
|
||||||
|
|
||||||
|
[zonemessages]
|
||||||
|
; Users may be located in different timezones, or may have different
|
||||||
|
; message announcements for their introductory message when they enter
|
||||||
|
; the voicemail system. Set the message and the timezone each user
|
||||||
|
; hears here. Set the user into one of these zones with the tz= attribute
|
||||||
|
; in the options field of the mailbox. Of course, language substitution
|
||||||
|
; still applies here so you may have several directory trees that have
|
||||||
|
; alternate language choices.
|
||||||
|
;
|
||||||
|
; Look in /usr/share/zoneinfo/ for names of timezones.
|
||||||
|
; Look at the manual page for strftime for a quick tutorial on how the
|
||||||
|
; variable substitution is done on the values below.
|
||||||
|
;
|
||||||
|
; Supported values:
|
||||||
|
; 'filename' filename of a soundfile (single ticks around the filename
|
||||||
|
; required)
|
||||||
|
; ${VAR} variable substitution
|
||||||
|
; A or a Day of week (Saturday, Sunday, ...)
|
||||||
|
; B or b or h Month name (January, February, ...)
|
||||||
|
; d or e numeric day of month (first, second, ..., thirty-first)
|
||||||
|
; Y Year
|
||||||
|
; I or l Hour, 12 hour clock
|
||||||
|
; H Hour, 24 hour clock (single digit hours preceded by "oh")
|
||||||
|
; k Hour, 24 hour clock (single digit hours NOT preceded by "oh")
|
||||||
|
; M Minute, with 00 pronounced as "o'clock"
|
||||||
|
; N Minute, with 00 pronounced as "hundred" (US military time)
|
||||||
|
; P or p AM or PM
|
||||||
|
; Q "today", "yesterday" or ABdY
|
||||||
|
; (*note: not standard strftime value)
|
||||||
|
; q "" (for today), "yesterday", weekday, or ABdY
|
||||||
|
; (*note: not standard strftime value)
|
||||||
|
; R 24 hour time, including minute
|
||||||
|
;
|
||||||
|
eastern = America/New_York|'vm-received' Q 'digits/at' IMp
|
||||||
|
central = America/Chicago|'vm-received' Q 'digits/at' IMp
|
||||||
|
central24 = America/Chicago|'vm-received' q 'digits/at' H N 'hours'
|
||||||
|
military = Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'
|
||||||
|
european = Europe/Copenhagen|'vm-received' a d b 'digits/at' HM
|
||||||
|
uk = Europe/London|'vm-received' q 'digits/at' HM
|
||||||
|
|
||||||
|
[default]
|
||||||
|
; Note: The rest of the system must reference mailboxes defined here as mailbox@default.
|
||||||
|
|
||||||
|
1000 => 1000,Default Mailbox,,,,Tz=uk
|
Loading…
Reference in New Issue