diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-12-19 16:52:43 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-12-19 16:52:43 +0000 |
commit | e4803bbd9eba2705615e2495de0ed0c35051dd45 (patch) | |
tree | fe8787ab22e2c694e93c4ec2757e3d8ca4c681dc /channels/sig_pri.h | |
parent | 2882c5f9f1f1c81a5a2bae35825d81070bb10164 (diff) |
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
Diffstat (limited to 'channels/sig_pri.h')
-rw-r--r-- | channels/sig_pri.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/channels/sig_pri.h b/channels/sig_pri.h index a46bca637..09fa92073 100644 --- a/channels/sig_pri.h +++ b/channels/sig_pri.h @@ -388,7 +388,7 @@ struct sig_pri_chan { /*! Typical maximum length of mwi mailbox context */ #define SIG_PRI_MAX_MWI_CONTEXT_LEN 10 /*! - * \brief Maximum mwi_vm_numbers string length. + * \brief Maximum mwi_vm_numbers and mwi_vm_boxes string length. * \details * max_length = #mailboxes * (vm_number + ',') * The last ',' is a null terminator instead. @@ -396,13 +396,20 @@ struct sig_pri_chan { #define SIG_PRI_MAX_MWI_VM_NUMBER_STR (SIG_PRI_MAX_MWI_MAILBOXES \ * (SIG_PRI_MAX_MWI_VM_NUMBER_LEN + 1)) /*! + * \brief Maximum length of vm_mailbox string. + * \details + * max_length = vm_box + '@' + context. + */ +#define SIG_PRI_MAX_MWI_VM_MAILBOX (SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN \ + + 1 + SIG_PRI_MAX_MWI_CONTEXT_LEN) +/*! * \brief Maximum mwi_mailboxs string length. * \details - * max_length = #mailboxes * (mbox_number + '@' + context + ',') + * max_length = #mailboxes * (vm_mailbox + ',') * The last ',' is a null terminator instead. */ #define SIG_PRI_MAX_MWI_MAILBOX_STR (SIG_PRI_MAX_MWI_MAILBOXES \ - * (SIG_PRI_MAX_MWI_MBOX_NUMBER_LEN + 1 + SIG_PRI_MAX_MWI_CONTEXT_LEN + 1)) + * (SIG_PRI_MAX_MWI_VM_MAILBOX + 1)) struct sig_pri_mbox { /*! @@ -410,11 +417,11 @@ struct sig_pri_mbox { * \note NULL if mailbox not configured. */ struct stasis_subscription *sub; - /*! \brief Mailbox number */ - const char *number; - /*! \brief Mailbox context. */ - const char *context; - /*! \brief Voicemail controlling number. */ + /*! \brief Mailbox uniqueid. */ + const char *uniqueid; + /*! \brief Mailbox number sent to span. */ + const char *vm_box; + /*! \brief Voicemail access controlling number sent to span. */ const char *vm_number; }; #endif /* defined(HAVE_PRI_MWI) */ @@ -506,11 +513,18 @@ struct sig_pri_span { /*! * \brief Comma separated list of mailboxes to indicate MWI. * \note Empty if disabled. - * \note Format: mailbox_number[@context]{,mailbox_number[@context]} + * \note Format: vm_mailbox{,vm_mailbox} * \note String is split apart when span is started. */ char mwi_mailboxes[SIG_PRI_MAX_MWI_MAILBOX_STR]; /*! + * \brief Comma separated list of mailbox numbers sent over ISDN span for MWI. + * \note Empty if disabled. + * \note Format: vm_box{,vm_box} + * \note String is split apart when span is started. + */ + char mwi_vm_boxes[SIG_PRI_MAX_MWI_VM_NUMBER_STR]; + /*! * \brief Comma separated list of voicemail access controlling numbers for MWI. * \note Format: vm_number{,vm_number} * \note String is split apart when span is started. |