diff options
-rw-r--r-- | apps/app_voicemail.c | 14 | ||||
-rw-r--r-- | build_tools/cflags.xml | 3 | ||||
-rw-r--r-- | channels/chan_zap.c | 24 | ||||
-rw-r--r-- | doc/smdi.txt | 10 | ||||
-rw-r--r-- | include/asterisk/callerid.h | 2 |
5 files changed, 0 insertions, 53 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index f472e3030..cb5d6d7d8 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -75,10 +75,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/cli.h" #include "asterisk/utils.h" #include "asterisk/stringfields.h" -#ifdef WITH_SMDI #include "asterisk/smdi.h" #define SMDI_MWI_WAIT_TIMEOUT 1000 /* 1 second */ -#endif #ifdef USE_ODBC_STORAGE #include "asterisk/res_odbc.h" #endif @@ -408,9 +406,7 @@ static int silencethreshold = 128; static char serveremail[80]; static char mailcmd[160]; /* Configurable mail cmd */ static char externnotify[160]; -#ifdef WITH_SMDI static struct ast_smdi_interface *smdi_iface = NULL; -#endif static char vmfmts[80]; static int vmminmessage; static int vmmaxmessage; @@ -2348,16 +2344,13 @@ static void run_externnotify(char *context, char *extension) char arguments[255]; char ext_context[256] = ""; int newvoicemails = 0, oldvoicemails = 0; -#ifdef WITH_SMDI struct ast_smdi_mwi_message *mwi_msg; -#endif if (!ast_strlen_zero(context)) snprintf(ext_context, sizeof(ext_context), "%s@%s", extension, context); else ast_copy_string(ext_context, extension, sizeof(ext_context)); -#ifdef WITH_SMDI if (!strcasecmp(externnotify, "smdi")) { if (ast_app_has_voicemail(ext_context, NULL)) ast_smdi_mwi_set(smdi_iface, extension); @@ -2376,9 +2369,6 @@ static void run_externnotify(char *context, char *extension) ast_log(LOG_DEBUG, "Successfully executed SMDI MWI change for %s on %s\n", extension, smdi_iface->name); } } else if (!ast_strlen_zero(externnotify)) { -#else - if (!ast_strlen_zero(externnotify)) { -#endif if (inboxcount(ext_context, &newvoicemails, &oldvoicemails)) { ast_log(LOG_ERROR, "Problem in calculating number of voicemail messages available for extension %s\n", extension); } else { @@ -6136,9 +6126,7 @@ static int load_config(void) char *cat; struct ast_variable *var; char *notifystr = NULL; -#ifdef WITH_SMDI char *smdistr = NULL; -#endif char *astattach; char *astsearch; char *astsaycid; @@ -6245,7 +6233,6 @@ static int load_config(void) if ((notifystr = ast_variable_retrieve(cfg, "general", "externnotify"))) { ast_copy_string(externnotify, notifystr, sizeof(externnotify)); ast_log(LOG_DEBUG, "found externnotify: %s\n", externnotify); -#ifdef WITH_SMDI if (!strcasecmp(externnotify, "smdi")) { ast_log(LOG_DEBUG, "Using SMDI for external voicemail notification\n"); if ((smdistr = ast_variable_retrieve(cfg, "general", "smdiport"))) { @@ -6262,7 +6249,6 @@ static int load_config(void) ast_log(LOG_DEBUG, "Using SMDI port %s\n", smdi_iface->name); } } -#endif } else { externnotify[0] = '\0'; } diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml index dedc45814..a8e312403 100644 --- a/build_tools/cflags.xml +++ b/build_tools/cflags.xml @@ -21,7 +21,4 @@ </member> <member name="TRACE_FRAMES" displayname="Trace Frame Allocations"> </member> - <member name="WITH_SMDI" displayname="Include SMDI Support"> - <defaultenabled>yes</defaultenabled> - </member> </category> diff --git a/channels/chan_zap.c b/channels/chan_zap.c index dadb378b6..5eb6565d2 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -104,11 +104,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/transcap.h" #include "asterisk/stringfields.h" #include "asterisk/abstract_jb.h" -#ifdef WITH_SMDI #include "asterisk/smdi.h" #include "asterisk/astobj.h" #define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */ -#endif /*! Global jitterbuffer configuration - by default, jb is disabled */ static struct ast_jb_conf default_jbconf = @@ -286,10 +284,8 @@ static char mailbox[AST_MAX_EXTENSION]; static int amaflags = 0; static int adsi = 0; -#ifdef WITH_SMDI static int use_smdi = 0; static char smdi_port[SMDI_MAX_FILENAME_LEN] = "/dev/ttyS0"; -#endif static int numbufs = 4; static int cur_prewink = -1; @@ -611,10 +607,8 @@ static struct zt_pvt { unsigned int resetting:1; unsigned int setup_ack:1; #endif -#ifdef WITH_SMDI unsigned int use_smdi:1; /* Whether to use SMDI on this channel */ struct ast_smdi_interface *smdi_iface; /* The serial port to listen for SMDI data on */ -#endif struct zt_distRings drings; @@ -2147,10 +2141,8 @@ static void destroy_zt_pvt(struct zt_pvt **pvt) p->prev->next = p->next; if (p->next) p->next->prev = p->prev; -#ifdef WITH_SMDI if (p->use_smdi) ASTOBJ_UNREF(p->smdi_iface, ast_smdi_interface_destroy); -#endif ast_mutex_destroy(&p->lock); free(p); *pvt = NULL; @@ -5272,9 +5264,7 @@ static void *ss_thread(void *data) int counter1; int counter; int samples = 0; -#ifdef WITH_SMDI struct ast_smdi_md_message *smdi_msg = NULL; -#endif int flags; int i; int timeout; @@ -5930,7 +5920,6 @@ lax); } } #endif -#ifdef WITH_SMDI /* check for SMDI messages */ if (p->use_smdi && p->smdi_iface) { smdi_msg = ast_smdi_md_message_wait(p->smdi_iface, SMDI_MD_WAIT_TIMEOUT); @@ -5956,9 +5945,6 @@ lax); * and we're set to use a polarity reversal to trigger the start of caller id, * grab the caller id and wait for ringing to start... */ } else if (p->use_callerid && (chan->_state == AST_STATE_PRERING && p->cid_start == CID_START_POLARITY)) { -#else - if (p->use_callerid && (chan->_state == AST_STATE_PRERING && p->cid_start == CID_START_POLARITY)) { -#endif /* If set to use DTMF CID signalling, listen for DTMF */ if (p->cid_signalling == CID_SIG_DTMF) { int i = 0; @@ -6377,10 +6363,8 @@ lax); ast_shrink_phone_number(number); ast_set_callerid(chan, number, name, number); -#ifdef WITH_SMDI if (smdi_msg) ASTOBJ_UNREF(smdi_msg, ast_smdi_md_message_destroy); -#endif if (cs) callerid_free(cs); ast_setstate(chan, AST_STATE_RING); @@ -7257,9 +7241,7 @@ static struct zt_pvt *mkintf(int channel, int signalling, int outsignalling, int tmp->callwaitingcallerid = callwaitingcallerid; tmp->threewaycalling = threewaycalling; tmp->adsi = adsi; -#ifdef WITH_SMDI tmp->use_smdi = use_smdi; -#endif tmp->permhidecallerid = hidecallerid; tmp->callreturn = callreturn; tmp->echocancel = echocancel; @@ -7292,7 +7274,6 @@ static struct zt_pvt *mkintf(int channel, int signalling, int outsignalling, int } } -#ifdef WITH_SMDI if (tmp->cid_signalling == CID_SIG_SMDI) { if (!tmp->use_smdi) { ast_log(LOG_WARNING, "SMDI callerid requires SMDI to be enabled, enabling...\n"); @@ -7306,7 +7287,6 @@ static struct zt_pvt *mkintf(int channel, int signalling, int outsignalling, int tmp->use_smdi = 0; } } -#endif ast_copy_string(tmp->accountcode, accountcode, sizeof(tmp->accountcode)); tmp->amaflags = amaflags; @@ -10449,10 +10429,8 @@ static int setup_zap(int reload) cid_signalling = CID_SIG_V23; else if (!strcasecmp(v->value, "dtmf")) cid_signalling = CID_SIG_DTMF; -#ifdef WITH_SMDI else if (!strcasecmp(v->value, "smdi")) cid_signalling = CID_SIG_SMDI; -#endif else if (!strcasecmp(v->value, "v23_jp")) cid_signalling = CID_SIG_V23_JP; else if (ast_true(v->value)) @@ -10477,12 +10455,10 @@ static int setup_zap(int reload) ast_copy_string(mailbox, v->value, sizeof(mailbox)); } else if (!strcasecmp(v->name, "adsi")) { adsi = ast_true(v->value); -#ifdef WITH_SMDI } else if (!strcasecmp(v->name, "usesmdi")) { use_smdi = ast_true(v->value); } else if (!strcasecmp(v->name, "smdiport")) { ast_copy_string(smdi_port, v->value, sizeof(smdi_port)); -#endif } else if (!strcasecmp(v->name, "transfer")) { transfer = ast_true(v->value); } else if (!strcasecmp(v->name, "canpark")) { diff --git a/doc/smdi.txt b/doc/smdi.txt index 6de0c35ea..d89c4f35c 100644 --- a/doc/smdi.txt +++ b/doc/smdi.txt @@ -1,16 +1,6 @@ Asterisk SMDI (Simple Message Desk Interface) integration --------------------------------------------------------- -Support for using Asterisk as an SMDI message desk was developed by Matthew A. -Nicholson <mnicholson@digium.com>. To enable SMDI support in asterisk edit the -Makefile file and uncomment the line regarding SMDI so it reads like -this: - -# -# Asterisk SMDI integration -# -WITH_SMDI = 1 - SMDI integration is configured in smdi.conf, zaptel.conf, and voicemail.conf. Various characteristics of the SMDI interfaces to be used (serial ports) are defined in smdi.conf. SMDI integration for callerid and MWI are defined in diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h index c762184d7..7347dd9d0 100644 --- a/include/asterisk/callerid.h +++ b/include/asterisk/callerid.h @@ -54,9 +54,7 @@ #define CID_SIG_V23 2 #define CID_SIG_DTMF 3 #define CID_SIG_V23_JP 4 -#ifdef WITH_SMDI #define CID_SIG_SMDI 5 -#endif #define CID_START_RING 1 #define CID_START_POLARITY 2 |