aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 00:25:29 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-26 00:25:29 +0000
commita507c4cfd71ee35d48b7b4534cd36e52397d7124 (patch)
treeee3bfd9e13a824608c595f68588a17ff317e7dae /apps
parentdc29269b87c3f34871fd8970f201d3c24e4d7957 (diff)
Merge changes from team/russell/smdi-1.4
This commit brings in a significant set of changes to the SMDI support in Asterisk. There were a number of bugs in the current implementation, most notably being that it was very likely on busy systems to pop off the wrong message from the SMDI message queue. So, this set of changes fixes the issues discovered as well as introducing some new ways to use the SMDI support which are required to avoid the bugs with grabbing the wrong message off of the queue. This code introduces a new interface to SMDI, with two dialplan functions. First, you get an SMDI message in the dialplan using SMDI_MSG_RETRIEVE() and then you access details in the message using the SMDI_MSG() function. A side benefit of this is that it now supports more than just chan_zap. For example, with this implementation, you can have some FXO lines being terminated on a SIP gateway, but the SMDI link in Asterisk. Another issue with the current implementation is that it is quite common that the station ID that comes in on the SMDI link is not necessarily the same as the Asterisk voicemail box. There are now additional directives in the smdi.conf configuration file which let you map SMDI station IDs to Asterisk voicemail boxes. Yet another issue with the current SMDI support was related to MWI reporting over the SMDI link. The current code could only report a MWI change when the change was made by someone calling into voicemail. If the change was made by some other entity (such as with IMAP storage, or with a web interface of some kind), then the MWI change would never be sent. The SMDI module can now poll for MWI changes if configured to do so. This work was inspired by and primarily done for the University of Pennsylvania. (also related to issue #9260) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@104119 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 0f3df684a..8474b3001 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2779,8 +2779,8 @@ static void run_externnotify(char *context, char *extension)
else
ast_smdi_mwi_unset(smdi_iface, extension);
- if ((mwi_msg = ast_smdi_mwi_message_wait(smdi_iface, SMDI_MWI_WAIT_TIMEOUT))) {
- ast_log(LOG_ERROR, "Error executing SMDI MWI change for %s on %s\n", extension, smdi_iface->name);
+ if ((mwi_msg = ast_smdi_mwi_message_wait_station(smdi_iface, SMDI_MWI_WAIT_TIMEOUT, extension))) {
+ ast_log(LOG_ERROR, "Error executing SMDI MWI change for %s\n", extension);
if (!strncmp(mwi_msg->cause, "INV", 3))
ast_log(LOG_ERROR, "Invalid MWI extension: %s\n", mwi_msg->fwd_st);
else if (!strncmp(mwi_msg->cause, "BLK", 3))
@@ -2789,7 +2789,7 @@ static void run_externnotify(char *context, char *extension)
ASTOBJ_UNREF(mwi_msg, ast_smdi_mwi_message_destroy);
} else {
if (option_debug)
- ast_log(LOG_DEBUG, "Successfully executed SMDI MWI change for %s on %s\n", extension, smdi_iface->name);
+ ast_log(LOG_DEBUG, "Successfully executed SMDI MWI change for %s\n", extension);
}
} else if (!ast_strlen_zero(externnotify)) {
if (inboxcount(ext_context, &newvoicemails, &oldvoicemails)) {
@@ -7539,9 +7539,6 @@ static int load_config(void)
if (!smdi_iface) {
ast_log(LOG_ERROR, "No valid SMDI interface specfied, disabling external voicemail notification\n");
externnotify[0] = '\0';
- } else {
- if (option_debug > 2)
- ast_log(LOG_DEBUG, "Using SMDI port %s\n", smdi_iface->name);
}
}
} else {