Currently, this is what each section looks like (with brief explanation):
[general]As I said, these are all global options and most are self-explanatory. You can find technical definitions of each option here, along with a bunch of others I didn't include.
format=wav49|gsm|wav
serveremail=asterisk
attach=yes
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes
[zonemessages]These are just time zone settings. Full explanation of zonemessages is midway down the page here.
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/Geneva|'vm-received' a d b 'digits/at' HM
[default]Mailboxes are simple to set up. It's the extension followed by the passcode, Name (it knows that the last name is separated from the first name by a space!), and notification e-mail address. You can also add a pager e-mail address (pagers....hah!) and various overrides to the global options that are specified in [general].
1000 => 9999,Miles K,email.removed.to.stop.spam@gmail.com
1001 => 9999,John M
....
The addition of voicemail necessitates changes to the dialplan (extensions.conf) which happened in a somewhat circular way as I followed the book's example. At first there was the no-brainer approach, taking this:
exten => 1000,1,Dial(${MILES},${DELAYTIME})into this:
exten => 1000,n,Playback(vm-nobodyavail)
exten => 1000,n,Hangup()
exten => 1000,1,Dial(${MILES},${DELAYTIME})The VoiceMail() application takes two arguments: (mailboxNumber@mailboxContext, statusIdentifier). mailboxNumber and mailboxContext are what got entered into voicemail.conf. statusIdentifier can be either "u" (unavailable) or "b" (busy). The above is not very robust as it only has directions for an "unavailable" user and no instructions if the user is busy. The second incarnation is:
exten => 1000,n,VoiceMail(1000@default,u)
exten => 1000,n,Playback(vm-nobodyavail)
exten => 1000,n,Hangup()
exten => 1000,1,Dial(${MILES},${DELAYTIME})This makes use of the DIALSTATUS variable to tell * what message to play in the unavailable/busy scenarios, kind of like a decision tree.
exten => 1000,n,GoToIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)
exten => 1000,n(unavail),VoiceMail(1000@default,u)
exten => 1000,n,Hangup()
exten => 1000,n(busy),VoiceMail(1000@default,b)
exten => 1000,n,Hangup()
No comments:
Post a Comment