[asterisk-commits] russell: branch russell/fxo_mwi r90926 - in /team/russell/fxo_mwi: ./ channel...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 4 12:05:01 CST 2007
Author: russell
Date: Tue Dec 4 12:05:01 2007
New Revision: 90926
URL: http://svn.digium.com/view/asterisk?view=rev&rev=90926
Log:
* Rename externnotify to mwimonitornotify to avoid conflicts with voicemail.conf option
* Remove comments about sample script, as the sample I have won't be relevant for the trunk version
* Reset mwimonitornotify on reload
Modified:
team/russell/fxo_mwi/CHANGES
team/russell/fxo_mwi/channels/chan_zap.c
team/russell/fxo_mwi/configs/zapata.conf.sample
Modified: team/russell/fxo_mwi/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/fxo_mwi/CHANGES?view=diff&rev=90926&r1=90925&r2=90926
==============================================================================
--- team/russell/fxo_mwi/CHANGES (original)
+++ team/russell/fxo_mwi/CHANGES Tue Dec 4 12:05:01 2007
@@ -274,7 +274,12 @@
* CID matching information is now shown when doing 'dialplan show'.
* Added zap show version CLI command to chan_zap.
* Added setvar support to zapata.conf channel entries.
-
+ * Added two new options: mwimonitor and mwimonitornotify. These options allow
+ you to enable MWI monitoring on FXO lines. When the MWI state changes,
+ the script specified in the mwimonitornotify option is executed. An internal
+ event indicating the new state of the mailbox is also generated, so that
+ the normal MWI facilities in Asterisk work as usual.
+
H.323 Changes
-------------
* H323 remote hold notification support added (by NOTIFY message
Modified: team/russell/fxo_mwi/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/russell/fxo_mwi/channels/chan_zap.c?view=diff&rev=90926&r1=90925&r2=90926
==============================================================================
--- team/russell/fxo_mwi/channels/chan_zap.c (original)
+++ team/russell/fxo_mwi/channels/chan_zap.c Tue Dec 4 12:05:01 2007
@@ -224,7 +224,7 @@
static char defaultcic[64] = "";
static char defaultozz[64] = "";
-static char externnotify[160] = "";
+static char mwimonitornotify[PATH_MAX] = "";
static char progzone[10] = "";
@@ -1850,9 +1850,10 @@
static void notify_message(char *mailbox, int thereornot)
{
- char s[256];
- if (!ast_strlen_zero(mailbox) && !ast_strlen_zero(externnotify)) {
- snprintf(s, sizeof(s), "%s %s %d", externnotify, mailbox, thereornot);
+ char s[sizeof(mwimonitornotify) + 80];
+
+ if (!ast_strlen_zero(mailbox) && !ast_strlen_zero(mwimonitornotify)) {
+ snprintf(s, sizeof(s), "%s %s %d", mwimonitornotify, mailbox, thereornot);
ast_safe_system(s);
}
}
@@ -13125,8 +13126,8 @@
ast_copy_string(defaultcic, v->value, sizeof(defaultcic));
} else if (!strcasecmp(v->name, "defaultozz")) {
ast_copy_string(defaultozz, v->value, sizeof(defaultozz));
- } else if (!strcasecmp(v->name, "externnotify")) {
- ast_copy_string(externnotify, v->value, sizeof(externnotify));
+ } else if (!strcasecmp(v->name, "mwimonitornotify")) {
+ ast_copy_string(mwimonitornotify, v->value, sizeof(mwimonitornotify));
}
} else if (!skipchannels)
ast_log(LOG_WARNING, "Ignoring %s\n", v->name);
Modified: team/russell/fxo_mwi/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/russell/fxo_mwi/configs/zapata.conf.sample?view=diff&rev=90926&r1=90925&r2=90926
==============================================================================
--- team/russell/fxo_mwi/configs/zapata.conf.sample (original)
+++ team/russell/fxo_mwi/configs/zapata.conf.sample Tue Dec 4 12:05:01 2007
@@ -339,17 +339,16 @@
;
; The following option enables receiving MWI on FXO lines. The default
; value is no. When this is enabled, and MWI notification indicates on or off,
-; the script specified by the externnotify option is executed.
+; the script specified by the mwimonitornotify option is executed.
;
;mwimonitor=no
;
; 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. An example script is provided
-; in contrib/scripts/zapnotify.sh.
-;
-;externnotify=/usr/local/bin/zapnotify.sh
+; there are messages waiting or not.
+;
+;mwimonitornotify=/usr/local/bin/zapnotify.sh
;
; Whether or not to enable call waiting on internal extensions
; With this set to 'yes', busy extensions will hear the call-waiting
More information about the asterisk-commits
mailing list