summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_followme.c17
-rw-r--r--configs/basic-pbx/asterisk.conf22
-rw-r--r--main/strings.c6
3 files changed, 23 insertions, 22 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index e5a5ee3c5..af6bb1039 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -66,6 +66,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/stasis_channels.h"
#include "asterisk/max_forwards.h"
+#define REC_FORMAT "sln"
+
/*** DOCUMENTATION
<application name="FollowMe" language="en_US">
<synopsis>
@@ -1421,7 +1423,7 @@ static int app_exec(struct ast_channel *chan, const char *data)
snprintf(targs->namerecloc, sizeof(targs->namerecloc), "%s/followme.%s",
ast_config_AST_SPOOL_DIR, ast_channel_uniqueid(chan));
- if (ast_play_and_record(chan, "vm-rec-name", targs->namerecloc, 5, "sln", &duration,
+ if (ast_play_and_record(chan, "vm-rec-name", targs->namerecloc, 5, REC_FORMAT, &duration,
NULL, ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE), 0, NULL) < 0) {
goto outrun;
}
@@ -1522,7 +1524,18 @@ outrun:
ast_free(nm);
}
if (!ast_strlen_zero(targs->namerecloc)) {
- unlink(targs->namerecloc);
+ int ret;
+ char fn[PATH_MAX];
+
+ snprintf(fn, sizeof(fn), "%s.%s", targs->namerecloc,
+ REC_FORMAT);
+ ret = unlink(fn);
+ if (ret != 0) {
+ ast_log(LOG_NOTICE, "Failed to delete recorded name file %s: %d (%s)\n",
+ fn, errno, strerror(errno));
+ } else {
+ ast_debug(2, "deleted recorded prompt %s.\n", fn);
+ }
}
ast_free((char *) targs->predial_callee);
ast_party_connected_line_free(&targs->connected_in);
diff --git a/configs/basic-pbx/asterisk.conf b/configs/basic-pbx/asterisk.conf
index 2490b5629..ff66ceea7 100644
--- a/configs/basic-pbx/asterisk.conf
+++ b/configs/basic-pbx/asterisk.conf
@@ -1,25 +1,13 @@
-[directories]
-astetcdir => /etc/asterisk
-astmoddir => /usr/lib/asterisk/modules
-astvarlibdir => /var/lib/asterisk
-astdbdir => /var/lib/asterisk
-astkeydir => /var/lib/asterisk
-astdatadir => /var/lib/asterisk
-astagidir => /var/lib/asterisk/agi-bin
-astspooldir => /var/spool/asterisk
-astrundir => /var/run/asterisk
-astlogdir => /var/log/asterisk
-astsbindir => /usr/sbin
-
[options]
; If we want to start Asterisk with a default verbosity for the verbose
-; or debug logger channel types, then we use these settings.
+; or debug logger channel types, then we use these settings (by default
+; they are disabled).
;verbose = 5
-;debug = 5
+;debug = 2
; User and group to run asterisk as. NOTE: This will require changes to
; directory and device permissions.
-;runuser = asterisk ; The user to run as.
-;rungroup = asterisk ; The group to run as.
+;runuser = asterisk ; The user to run as. The default is root.
+;rungroup = asterisk ; The group to run as. The default is root
;defaultlanguage = es
diff --git a/main/strings.c b/main/strings.c
index 9e885ebc3..db78a6cd2 100644
--- a/main/strings.c
+++ b/main/strings.c
@@ -234,8 +234,8 @@ int ast_strings_match(const char *left, const char *op, const char *right)
{
char *internal_op = (char *)op;
char *internal_right = (char *)right;
- float left_num;
- float right_num;
+ double left_num;
+ double right_num;
int scan_numeric = 0;
if (!(left && right)) {
@@ -297,7 +297,7 @@ regex:
}
equals:
- scan_numeric = (sscanf(left, "%f", &left_num) && sscanf(internal_right, "%f", &right_num));
+ scan_numeric = (sscanf(left, "%lf", &left_num) && sscanf(internal_right, "%lf", &right_num));
if (internal_op[0] == '=') {
if (ast_strlen_zero(left) && ast_strlen_zero(internal_right)) {