[Asterisk-code-review] app_voicemail.c: Build all three variants for app_voicemail at the sa... (...asterisk[16])
Christian Savinovich
asteriskteam at digium.com
Thu Jun 27 00:04:49 CDT 2019
Christian Savinovich has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11493
Change subject: app_voicemail.c: Build all three variants for app_voicemail at the same time
......................................................................
app_voicemail.c: Build all three variants for app_voicemail at the same time
This review makes changes to apps/Makefile to offer the built of all three
app_voicemail variations at the same time: file (default), odbc, and imap.
This functionality was requested by users. modules.conf.sample warns the
user to make sure only one voicemail is loaded at a time.
Change-Id: Iba3cd8ffb4b7e8b1c64a11dd383e1eafcd3ed0e7
---
M apps/Makefile
M apps/app_voicemail.c
A apps/app_voicemail_imap.c
A apps/app_voicemail_imap.exports.in
A apps/app_voicemail_odbc.c
A apps/app_voicemail_odbc.exports.in
M configs/samples/modules.conf.sample
7 files changed, 13 insertions(+), 32 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/93/11493/1
diff --git a/apps/Makefile b/apps/Makefile
index 589293c..63cc06b 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -16,12 +16,6 @@
MENUSELECT_DESCRIPTION=Applications
MENUSELECT_OPTS_app_directory:=$(MENUSELECT_OPTS_app_voicemail)
-ifneq ($(findstring ODBC_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
- MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_ODBC_STORAGE)
-endif
-ifneq ($(findstring IMAP_STORAGE,$(MENUSELECT_OPTS_app_voicemail)),)
- MENUSELECT_DEPENDS_app_voicemail+=$(MENUSELECT_DEPENDS_IMAP_STORAGE)
-endif
all: _all
@@ -32,7 +26,9 @@
app_confbridge.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_meetme.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_minivm.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
-app_voicemail.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
+app_voicemail.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DFILE_STORAGE
+app_voicemail_odbc.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DODBC_STORAGE
+app_voicemail_imap.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION) -DIMAP_STORAGE
app_while.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c0edd44..c35803d 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -53,31 +53,6 @@
<support_level>core</support_level>
***/
-/*** MAKEOPTS
-<category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" touch_on_change="apps/app_voicemail.c apps/app_directory.c">
- <member name="FILE_STORAGE" displayname="Storage of Voicemail using filesystem">
- <conflict>ODBC_STORAGE</conflict>
- <conflict>IMAP_STORAGE</conflict>
- <defaultenabled>yes</defaultenabled>
- <support_level>core</support_level>
- </member>
- <member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
- <depend>generic_odbc</depend>
- <conflict>IMAP_STORAGE</conflict>
- <conflict>FILE_STORAGE</conflict>
- <defaultenabled>no</defaultenabled>
- <support_level>core</support_level>
- </member>
- <member name="IMAP_STORAGE" displayname="Storage of Voicemail using IMAP4">
- <depend>imap_tk</depend>
- <conflict>ODBC_STORAGE</conflict>
- <conflict>FILE_STORAGE</conflict>
- <use type="external">openssl</use>
- <defaultenabled>no</defaultenabled>
- <support_level>core</support_level>
- </member>
-</category>
-***/
#include "asterisk.h"
diff --git a/apps/app_voicemail_imap.c b/apps/app_voicemail_imap.c
new file mode 120000
index 0000000..fdb024a
--- /dev/null
+++ b/apps/app_voicemail_imap.c
@@ -0,0 +1 @@
+app_voicemail.c
\ No newline at end of file
diff --git a/apps/app_voicemail_imap.exports.in b/apps/app_voicemail_imap.exports.in
new file mode 120000
index 0000000..401e8f2
--- /dev/null
+++ b/apps/app_voicemail_imap.exports.in
@@ -0,0 +1 @@
+app_voicemail.exports.in
\ No newline at end of file
diff --git a/apps/app_voicemail_odbc.c b/apps/app_voicemail_odbc.c
new file mode 120000
index 0000000..fdb024a
--- /dev/null
+++ b/apps/app_voicemail_odbc.c
@@ -0,0 +1 @@
+app_voicemail.c
\ No newline at end of file
diff --git a/apps/app_voicemail_odbc.exports.in b/apps/app_voicemail_odbc.exports.in
new file mode 120000
index 0000000..401e8f2
--- /dev/null
+++ b/apps/app_voicemail_odbc.exports.in
@@ -0,0 +1 @@
+app_voicemail.exports.in
\ No newline at end of file
diff --git a/configs/samples/modules.conf.sample b/configs/samples/modules.conf.sample
index c6c0dbc..1e83349 100644
--- a/configs/samples/modules.conf.sample
+++ b/configs/samples/modules.conf.sample
@@ -41,4 +41,10 @@
noload => res_hep.so
noload => res_hep_pjsip.so
noload => res_hep_rtcp.so
+
+; The default voicemail module is app_voicemal. All voicemail modules
+; are mutually exclusive. Therefore it is better to make sure they
+; are not loaded at startup
;
+noload => app_voicemail_odbc.so
+noload => app_voicemail_imap.so
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11493
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Iba3cd8ffb4b7e8b1c64a11dd383e1eafcd3ed0e7
Gerrit-Change-Number: 11493
Gerrit-PatchSet: 1
Gerrit-Owner: Christian Savinovich <csavinovich at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190627/9ce20985/attachment.html>
More information about the asterisk-code-review
mailing list