diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-18 20:53:37 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-18 20:53:37 +0000 |
commit | ef8c2ce558770863dbc19c79d3ac644c47873872 (patch) | |
tree | d5b79057eb46a117342e26a291edaf282060d3bd /apps | |
parent | 4eb4f638b631e12d3a69cdfe72a9f5bd962c03af (diff) |
Recorded merge of revisions 195370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r195370 | tilghman | 2009-05-18 15:52:33 -0500 (Mon, 18 May 2009) | 15 lines
Recorded merge of revisions 195366 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines
Add a similar dependency on SMDI for voicemail as already exists for ADSI.
(closes issue #14846)
Reported by: pj
Patches:
20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@195371 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 21 | ||||
-rw-r--r-- | apps/app_voicemail.c | 4 |
2 files changed, 14 insertions, 11 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index d86fa6bc2..95e7ebc15 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3699,16 +3699,18 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce else which = peer; ast_channel_unlock(qe->chan); - if (monitorfilename) - ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT); - else if (qe->chan->cdr) - ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT); - else { - /* Last ditch effort -- no CDR, make up something */ - snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random()); - ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT); + if (ast_monitor_start) { + if (monitorfilename) { + ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT); + } else if (qe->chan->cdr && ast_monitor_start) { + ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT); + } else if (ast_monitor_start) { + /* Last ditch effort -- no CDR, make up something */ + snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random()); + ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT); + } } - if (!ast_strlen_zero(monexec)) { + if (!ast_strlen_zero(monexec) && ast_monitor_setjoinfiles) { ast_monitor_setjoinfiles(which, 1); } } else { @@ -6589,6 +6591,7 @@ static int unload_module(void) struct ao2_iterator q_iter; struct call_queue *q = NULL; + if (device_state.thread != AST_PTHREADT_NULL) { device_state.stop = 1; ast_mutex_lock(&device_state.lock); diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 153fb9537..6bd8a4d18 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -9327,10 +9327,10 @@ static int load_config(int reload) if ((val = ast_variable_retrieve(cfg, "general", "smdienable")) && ast_true(val)) { ast_debug(1, "Enabled SMDI voicemail notification\n"); if ((val = ast_variable_retrieve(cfg, "general", "smdiport"))) { - smdi_iface = ast_smdi_interface_find(val); + smdi_iface = ast_smdi_interface_find ? ast_smdi_interface_find(val) : NULL; } else { ast_debug(1, "No SMDI interface set, trying default (/dev/ttyS0)\n"); - smdi_iface = ast_smdi_interface_find("/dev/ttyS0"); + smdi_iface = ast_smdi_interface_find ? ast_smdi_interface_find("/dev/ttyS0") : NULL; } if (!smdi_iface) { ast_log(LOG_ERROR, "No valid SMDI interface specfied, disabling SMDI voicemail notification\n"); |