aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 18:51:52 +0000
committerbbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-09 18:51:52 +0000
commit722eb3c4c3cfa1c0cee915c949c5f95199ee24dd (patch)
tree25683963c5e51bdedd6211cd0ea92a85639505c3 /apps
parent815b5b09da5e555add7bba3d8fca588e7611248a (diff)
Merged revisions 285710 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r285710 | bbryant | 2010-09-09 14:50:13 -0400 (Thu, 09 Sep 2010) | 8 lines Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent. (closes issue #16903) Reported by: Nick_Lewis Patches: pbx.c-specificity.patch uploaded by Nick Lewis (license 657) Tested by: Nick_Lewis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@285711 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_adsiprog.c6
-rw-r--r--apps/app_celgenuserevent.c3
-rw-r--r--apps/app_chanspy.c2
-rw-r--r--apps/app_dial.c3
-rw-r--r--apps/app_festival.c13
-rw-r--r--apps/app_followme.c1
-rw-r--r--apps/app_getcpeid.c6
-rw-r--r--apps/app_meetme.c6
-rw-r--r--apps/app_osplookup.c8
-rw-r--r--apps/app_queue.c5
-rw-r--r--apps/app_readexten.c2
-rw-r--r--apps/app_speech_utils.c6
-rw-r--r--apps/app_stack.c6
-rw-r--r--apps/app_voicemail.c13
14 files changed, 58 insertions, 22 deletions
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index 8af1473d1..c138f0429 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -1591,4 +1591,8 @@ static int load_module(void)
return AST_MODULE_LOAD_SUCCESS;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Asterisk ADSI Programming Application");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Asterisk ADSI Programming Application",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_adsi",
+ );
diff --git a/apps/app_celgenuserevent.c b/apps/app_celgenuserevent.c
index da1c246ef..b1701ba23 100644
--- a/apps/app_celgenuserevent.c
+++ b/apps/app_celgenuserevent.c
@@ -41,6 +41,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="event-name" required="true">
<argument name="event-name" required="true">
</argument>
+ <argument name="extra" required="false">
+ <para>Extra text to be included with the event.</para>
+ </argument>
</parameter>
</syntax>
<description>
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index 96748e667..f1b509c63 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -927,7 +927,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags,
}
if (!ast_test_flag(flags, OPTION_NAME) || res < 0) {
if (!ast_test_flag(flags, OPTION_NOTECH)) {
- if (ast_fileexists(peer_name, NULL, NULL) != -1) {
+ if (ast_fileexists(peer_name, NULL, NULL) > 0) {
res = ast_streamfile(chan, peer_name, chan->language);
if (!res) {
res = ast_waitstream(chan, "");
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 60bf7b424..0f7b4880d 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2611,8 +2611,9 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
sentringing = 0;
ast_indicate(chan, -1);
}
- /* Be sure no generators are left on it */
+ /* Be sure no generators are left on it and reset the visible indication */
ast_deactivate_generator(chan);
+ chan->visible_indication = 0;
/* Make sure channels are compatible */
res = ast_channel_make_compatible(chan, peer);
if (res < 0) {
diff --git a/apps/app_festival.c b/apps/app_festival.c
index c547cfc6b..ef8827adb 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -49,6 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
+#include "asterisk/endian.h"
#define FESTIVAL_CONFIG "festival.conf"
#define MAXLEN 180
@@ -127,7 +128,7 @@ static char *socket_receive_file_to_buff(int fd, int *size)
static int send_waveform_to_fd(char *waveform, int length, int fd)
{
int res;
-#ifdef __PPC__
+#if __BYTE_ORDER == __BIG_ENDIAN
int x;
char c;
#endif
@@ -142,20 +143,20 @@ static int send_waveform_to_fd(char *waveform, int length, int fd)
ast_close_fds_above_n(0);
if (ast_opt_high_priority)
ast_set_priority(0);
-#ifdef __PPC__
+#if __BYTE_ORDER == __BIG_ENDIAN
for (x = 0; x < length; x += 2) {
c = *(waveform + x + 1);
*(waveform + x + 1) = *(waveform + x);
*(waveform + x) = c;
}
#endif
-
- if (write(fd, waveform, length) < 0) {
- ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno));
+
+ if (write(0, waveform, length) < 0) {
+ /* Cannot log -- all FDs are already closed */
}
close(fd);
- exit(0);
+ _exit(0);
}
static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, int length, char *intkeys)
diff --git a/apps/app_followme.c b/apps/app_followme.c
index fcab992d3..b17d5252b 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -51,7 +51,6 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/cli.h"
#include "asterisk/manager.h"
#include "asterisk/config.h"
-#include "asterisk/monitor.h"
#include "asterisk/utils.h"
#include "asterisk/causes.h"
#include "asterisk/astdb.h"
diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c
index 93df1623a..220708156 100644
--- a/apps/app_getcpeid.c
+++ b/apps/app_getcpeid.c
@@ -132,4 +132,8 @@ static int load_module(void)
return ast_register_application_xml(app, cpeid_exec);
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get ADSI CPE ID");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Get ADSI CPE ID",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_adsi",
+ );
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 85bb0a645..2f64a9b78 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2782,6 +2782,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
ast_say_digits(chan, (conf->endtime - now.tv_sec) / 60, "", chan->language);
if (!ast_streamfile(chan, "minutes", chan->language))
ast_waitstream(chan, "");
+ if (musiconhold) {
+ conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]);
+ }
announcement_played = 1;
}
}
@@ -2853,6 +2856,9 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, struc
res = ast_streamfile(chan, user->warning_sound, chan->language);
res = ast_waitstream(chan, "");
}
+ if (musiconhold) {
+ conf_start_moh(chan, optargs[OPT_ARG_MOH_CLASS]);
+ }
}
}
if (user->warning_freq) {
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index ea20cee77..239d6d501 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -1493,6 +1493,7 @@ static int osp_lookup(
char callingnum[OSP_SIZE_NORSTR];
char callednum[OSP_SIZE_NORSTR];
char destination[OSP_SIZE_NORSTR];
+ char* tmp;
unsigned int tokenlen;
char token[OSP_SIZE_TOKSTR];
char src[OSP_SIZE_NORSTR];
@@ -1565,6 +1566,11 @@ static int osp_lookup(
}
}
+ ast_copy_string(callednum, called, sizeof(callednum));
+ if((tmp = strchr(callednum, ';')) != NULL) {
+ *tmp = '\0';
+ }
+
callidnum = 0;
callids[0] = NULL;
for (i = 0; i < OSP_CALLID_MAXNUM; i++) {
@@ -1605,7 +1611,7 @@ static int osp_lookup(
dev,
calling ? calling : "",
OSPC_NFORMAT_E164,
- called,
+ callednum,
OSPC_NFORMAT_E164,
NULL,
callidnum,
diff --git a/apps/app_queue.c b/apps/app_queue.c
index ccdee7fb3..57cbc0b63 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -57,7 +57,7 @@
*/
/*** MODULEINFO
- <depend>res_monitor</depend>
+ <use>res_monitor</use>
***/
#include "asterisk.h"
@@ -8186,7 +8186,7 @@ static int load_module(void)
static int reload(void)
{
- struct ast_flags mask = {AST_FLAGS_ALL,};
+ struct ast_flags mask = {AST_FLAGS_ALL & ~QUEUE_RESET_STATS,};
ast_unload_realtime("queue_members");
reload_handler(1, &mask, NULL);
return 0;
@@ -8197,5 +8197,6 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "True Call Queueing",
.unload = unload_module,
.reload = reload,
.load_pri = AST_MODPRI_DEVSTATE_CONSUMER,
+ .nonoptreq = "res_monitor",
);
diff --git a/apps/app_readexten.c b/apps/app_readexten.c
index 8049fc949..5e8159b35 100644
--- a/apps/app_readexten.c
+++ b/apps/app_readexten.c
@@ -232,7 +232,7 @@ static int readexten_exec(struct ast_channel *chan, const char *data)
if (res < 1) { /* timeout expired or hangup */
if (ast_check_hangup(chan)) {
status = "HANGUP";
- } else {
+ } else if (x == 0) {
pbx_builtin_setvar_helper(chan, arglist.variable, "t");
status = "TIMEOUT";
}
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 60af43640..0323f7c47 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -955,4 +955,8 @@ static int load_module(void)
return res;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialplan Speech Applications");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Dialplan Speech Applications",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_speech",
+ );
diff --git a/apps/app_stack.c b/apps/app_stack.c
index dcf13a00d..29c37a20b 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -704,4 +704,8 @@ static int load_module(void)
return 0;
}
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialplan subroutines (Gosub, Return, etc)");
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Dialplan subroutines (Gosub, Return, etc)",
+ .load = load_module,
+ .unload = unload_module,
+ .nonoptreq = "res_agi",
+ );
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 4ff67e371..8f0a5bd82 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -38,7 +38,8 @@
*/
/*** MODULEINFO
- <depend>res_smdi</depend>
+ <use>res_adsi</use>
+ <use>res_smdi</use>
***/
/*** MAKEOPTS
@@ -1492,11 +1493,12 @@ static void vm_change_password(struct ast_vm_user *vmu, const char *newpassword)
}
value = strstr(tmp, ",");
if (!value) {
- ast_log(AST_LOG_WARNING, "variable has bad format.\n");
- break;
+ new = alloca(strlen(newpassword)+1);
+ sprintf(new, "%s", newpassword);
+ } else {
+ new = alloca((strlen(value) + strlen(newpassword) + 1));
+ sprintf(new, "%s%s", newpassword, value);
}
- new = alloca((strlen(value) + strlen(newpassword) + 1));
- sprintf(new, "%s%s", newpassword, value);
if (!(cat = ast_category_get(cfg, category))) {
ast_log(AST_LOG_WARNING, "Failed to get category structure.\n");
break;
@@ -13085,4 +13087,5 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, tdesc,
.load = load_module,
.unload = unload_module,
.reload = reload,
+ .nonoptreq = "res_adsi,res_smdi",
);