summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-12-19 16:52:43 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-12-19 16:52:43 +0000
commite4803bbd9eba2705615e2495de0ed0c35051dd45 (patch)
treefe8787ab22e2c694e93c4ec2757e3d8ca4c681dc /include
parent2882c5f9f1f1c81a5a2bae35825d81070bb10164 (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 'include')
-rw-r--r--include/asterisk/app.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index 623f0884e..a998ed86d 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -382,16 +382,14 @@ typedef int (ast_inboxcount2_fn)(const char *mailboxes, int *urgentmsgs, int *ne
/*!
* \brief Gets the number of messages that exist in a mailbox folder.
*
- * \param context The context part of user@context. Uses 'default' if not provided.
- * \param user The user part of user@context.
+ * \param mailbox_id The mailbox name.
* \param folder The folder to look in. Default is INBOX if not provided.
*
- * \note If requesting INBOX then the returned count is INBOX +
- * Urgent.
+ * \note If requesting INBOX then the returned count is INBOX + Urgent.
*
- * \return The number of messages in this mailbox folder (zero or more).
+ * \return The number of messages in the mailbox folder (zero or more).
*/
-typedef int (ast_messagecount_fn)(const char *context, const char *user, const char *folder);
+typedef int (ast_messagecount_fn)(const char *mailbox_id, const char *folder);
/*!
* \brief Play a recorded user name for the mailbox.
@@ -569,7 +567,7 @@ struct ast_vm_functions {
/*!
* \brief Determine if a voicemail provider is registered.
- * \since 13.0.0
+ * \since 12.0.0
*
* \retval 0 if no privider registered.
* \retval 1 if a privider is registered.
@@ -666,14 +664,16 @@ int ast_app_inboxcount2(const char *mailboxes, int *urgentmsgs, int *newmsgs, in
int ast_app_sayname(struct ast_channel *chan, const char *mailbox, const char *context);
/*!
- * \brief Check number of messages in a given context, mailbox, and folder
- * \since 1.4
- * \param[in] context Mailbox context
- * \param[in] mailbox Mailbox number
- * \param[in] folder Mailbox folder
- * \return Number of messages in the given context, mailbox, and folder. If folder is NULL, folder "INBOX" is assumed. If folder is "INBOX", includes number of messages in the "Urgent" folder.
+ * \brief Get the number of messages in a given mailbox folder
+ *
+ * \param[in] mailbox_id Mailbox name
+ * \param[in] folder The folder to look in. Default is INBOX if not provided.
+ *
+ * \note If requesting INBOX then the returned count is INBOX + Urgent.
+ *
+ * \return The number of messages in the mailbox folder (zero or more).
*/
-int ast_app_messagecount(const char *context, const char *mailbox, const char *folder);
+int ast_app_messagecount(const char *mailbox_id, const char *folder);
/*!
* \brief Return name of folder, given an id
@@ -1342,7 +1342,7 @@ int ast_app_parse_timelen(const char *timestr, int *result, enum ast_timelen def
* \since 12
* \brief Publish a MWI state update via stasis
* \param[in] mailbox The number identifying this mailbox
- * \param[in] context The context this mailbox resides in
+ * \param[in] context The context this mailbox resides in (NULL or "" if only using mailbox)
* \param[in] new_msgs The number of new messages in this mailbox
* \param[in] old_msgs The number of old messages in this mailbox
* \retval 0 Success
@@ -1356,7 +1356,7 @@ int ast_app_parse_timelen(const char *timestr, int *result, enum ast_timelen def
* \since 12
* \brief Publish a MWI state update associated with some channel
* \param[in] mailbox The number identifying this mailbox
- * \param[in] context The context this mailbox resides in
+ * \param[in] context The context this mailbox resides in (NULL or "" if only using mailbox)
* \param[in] new_msgs The number of new messages in this mailbox
* \param[in] old_msgs The number of old messages in this mailbox
* \param[in] channel_id A unique identifier for a channel associated with this
@@ -1372,7 +1372,7 @@ int ast_app_parse_timelen(const char *timestr, int *result, enum ast_timelen def
* \since 12
* \brief Publish a MWI state update via stasis with all parameters
* \param[in] mailbox The number identifying this mailbox
- * \param[in] context The context this mailbox resides in
+ * \param[in] context The context this mailbox resides in (NULL or "" if only using mailbox)
* \param[in] new_msgs The number of new messages in this mailbox
* \param[in] old_msgs The number of old messages in this mailbox
* \param[in] channel_id A unique identifier for a channel associated with this
@@ -1399,9 +1399,7 @@ int ast_publish_mwi_state_full(
*/
struct ast_mwi_state {
AST_DECLARE_STRING_FIELDS(
- AST_STRING_FIELD(uniqueid); /*!< Unique identifier for this mailbox/context */
- AST_STRING_FIELD(mailbox); /*!< Mailbox for this event */
- AST_STRING_FIELD(context); /*!< Context that this mailbox belongs to */
+ AST_STRING_FIELD(uniqueid); /*!< Unique identifier for this mailbox */
);
int new_msgs; /*!< The current number of new messages for this mailbox */
int old_msgs; /*!< The current number of old messages for this mailbox */