Voicemail: Remove mailbox identifier format (box@context) assumptions in the system.

This change is in preparation for external MWI support.

Removed code from the system for normal mailbox handling that appends
@default to the mailbox identifier if it does not have a context.  The
only exception is the legacy hasvoicemail users.conf option.  The legacy
option will only work for app_voicemail mailboxes.  The system cannot make
any assumptions about the format of the mailbox identifer used by
app_voicemail.

chan_sip and chan_dahdi/sig_pri had the most changes because they both
tried to interpret the mailbox identifier.  chan_sip just stored and
compared the two components.  chan_dahdi actually used the box
information.

The ISDN MWI support configuration options had to be reworked because
chan_dahdi was parsing the box@context format to get the box number.  As a
result the mwi_vm_boxes chan_dahdi.conf option was added and is documented
in the chan_dahdi.conf.sample file.

Review: https://reviewboard.asterisk.org/r/3072/
........

Merged revisions 404348 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2013-12-19 16:52:43 +00:00
parent 2882c5f9f1
commit e4803bbd9e
25 changed files with 401 additions and 366 deletions

View File

@@ -617,8 +617,11 @@ usecallerid=yes
;
; This option is used in conjunction with mwimonitor. This will get executed
; when incoming MWI state changes. The script is passed 2 arguments. The
; first is the corresponding mailbox, and the second is 1 or 0, indicating if
; there are messages waiting or not.
; first is the corresponding configured mailbox, and the second is 1 or 0,
; indicating if there are messages waiting or not.
; Note: app_voicemail mailboxes are in the form of mailbox@context.
;
; /usr/local/bin/dahdinotify.sh 501@mailboxes 1
;
;mwimonitornotify=/usr/local/bin/dahdinotify.sh
;
@@ -654,11 +657,24 @@ callwaiting=yes
; Configure the ISDN span to indicate MWI for the list of mailboxes.
; You can give a comma separated list of up to 8 mailboxes per span.
; An empty list disables MWI.
; The default is an empty list.
;mwi_mailboxes=mailbox_number[@context]{,mailbox_number[@context]}
;
; Configure the ISDN span voicemail numbers for MWI mailboxes. What number
; to call for a user to retrieve voicemail messages.
; The default is an empty list.
;mwi_mailboxes=vm-mailbox{,vm-mailbox}
; vm-mailbox = Internal voicemail mailbox identifier.
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
;mwi_mailboxes=501@mailboxes,502@mailboxes
; Configure the ISDN mailbox number sent over the span for MWI mailboxes.
; The position of the number in the list corresponds to the position in
; mwi_mailboxes. If either position in mwi_mailboxes or mwi_vm_boxes is
; empty then that position is disabled.
;
; The default is an empty list.
;mwi_vm_boxes=mailbox_number{,mailbox_number}
;mwi_vm_boxes=501,502
; Configure the ISDN span voicemail controlling numbers for MWI mailboxes.
; What number to call for a user to retrieve voicemail messages.
;
; You can give a comma separated list of numbers. The position of the number
; corresponds to the position in mwi_mailboxes. If a position is empty then
@@ -667,7 +683,7 @@ callwaiting=yes
; For example:
; mwi_vm_numbers=700,,800,,900
; is equivalent to:
; mwi_vm_numbers=700,700,800,800,900
; mwi_vm_numbers=700,700,800,800,900,900,900,900
;
; The default is no number.
;mwi_vm_numbers=
@@ -737,19 +753,11 @@ cancallforward=yes
;
callreturn=yes
;
; Stutter dialtone support: If a mailbox is specified without a voicemail
; context, then when voicemail is received in a mailbox in the default
; voicemail context in voicemail.conf, taking the phone off hook will cause a
; stutter dialtone instead of a normal one.
; Stutter dialtone support: If voicemail is received in the mailbox then
; taking the phone off hook will cause a stutter dialtone instead of a
; normal one.
;
; If a mailbox is specified *with* a voicemail context, the same will result
; if voicemail received in mailbox in the specified voicemail context.
;
; for default voicemail context, the example below is fine:
;
;mailbox=1234
;
; for any other voicemail context, the following will produce the stutter tone:
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
;
;mailbox=1234@context
;

View File

@@ -623,6 +623,7 @@ description=Demo System At Digium ; Description of this peer, as listed by
;[dynamichost]
;host=dynamic
;secret=mysecret
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
;mailbox=1234 ; Notify about mailbox 1234
;inkeys=key1:key2
;peercontext=local ; Default context to request for calls to peer

View File

@@ -803,7 +803,8 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;mwi => 1234:password:authuser@myauthprovider.com/1234
;mwi => 1234:password:authuser@myauthportprovider.com:6969/1234
;
; MWI received will be stored in the 1234 mailbox of the SIP_Remote context. It can be used by other phones by following the below:
; MWI received will be stored in the 1234 mailbox of the SIP_Remote context.
; It can be used by other phones by following the below:
; mailbox=1234@SIP_Remote
;----------------------------------------- NAT SUPPORT ------------------------
;
@@ -1231,6 +1232,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; videosupport
; maxcallbitrate
; rfc2833compensate
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
; mailbox
; session-timers
; session-expires
@@ -1450,7 +1452,7 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
;host=dynamic ; This peer register with us
;dtmfmode=inband ; Choices are inband, rfc2833, or info
;defaultip=192.168.0.59 ; IP used until peer registers
;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator
;mailbox=1234@context,2345@context ; Mailbox(-es) for message waiting indicator
;subscribemwi=yes ; Only send notifications if this phone
; subscribes for mailbox notification
;vmexten=voicemail ; dialplan extension to reach mailbox

View File

@@ -108,6 +108,7 @@ keepalive=120
;[100]
;nat=yes
;callerid="Customer Support" <810-234-1212>
; Note: app_voicemail mailboxes must be in the form of mailbox@context.
;mailbox=100
;vmexten=8500 ; Device level voicemailmain pilot number
;regexten=100

View File

@@ -2,12 +2,20 @@
; Voicemail Configuration
;
; ********* NOTICE ************************************************************
;
; NOTE: Asterisk has to edit this file to change a user's password. This does
; not currently work with the "#include <file>" directive for Asterisk
; configuration files, nor when using realtime static configuration.
; Do not use them with this configuration file.
;
; NOTE: Mailboxes defined by app_voicemail MUST be referenced by the rest
; of the system as mailbox@context. The rest of the system cannot add
; @default to mailbox identifiers for app_voicemail that do not specify a
; context any longer. It is a mailbox identifier format that should only
; be interpreted by app_voicemail.
;
; ********* NOTICE ************************************************************
[general]
; Formats for writing Voicemail. Note that when using IMAP storage for
@@ -410,6 +418,7 @@ european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM
[default]
; Note: The rest of the system must reference mailboxes defined here as mailbox@default.
1234 => 4242,Example Mailbox,root@localhost
;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10