aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapps/Makefile2
-rwxr-xr-xapps/app_echo.c80
-rwxr-xr-xapps/app_skel.c50
-rwxr-xr-xapps/app_system.c82
-rwxr-xr-xapps/app_voicemail.c33
-rwxr-xr-xasterisk.c78
-rwxr-xr-xchannel.c61
-rwxr-xr-xcodecs/codec_g723_1.c2
-rwxr-xr-xconfigs/adtranvofr.conf.sample12
-rwxr-xr-xconfigs/modem.conf.sample6
-rwxr-xr-xconfigs/modules.conf.sample20
-rwxr-xr-xconfigs/voicemail.conf.sample22
-rwxr-xr-xinclude/asterisk/channel.h8
-rwxr-xr-xloader.c36
-rwxr-xr-xpbx/pbx_gtkconsole.c133
-rwxr-xr-xsay.c14
-rwxr-xr-xsounds/beep.gsmbin0 -> 858 bytes
-rwxr-xr-xsounds/demo-abouttotry.gsmbin0 -> 24981 bytes
-rwxr-xr-xsounds/demo-congrats.gsmbin0 -> 40458 bytes
-rwxr-xr-xsounds/demo-echodone.gsmbin0 -> 3828 bytes
-rwxr-xr-xsounds/demo-echotest.gsmbin0 -> 29700 bytes
-rwxr-xr-xsounds/demo-instruct.gsmbin0 -> 102201 bytes
-rwxr-xr-xsounds/demo-nogo.gsmbin0 -> 16104 bytes
-rwxr-xr-xsounds/demo-thanks.gsmbin0 -> 6105 bytes
-rwxr-xr-xsounds/digits/0.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/1.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/10.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/11.gsm5
-rwxr-xr-xsounds/digits/12.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/13.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/14.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/15.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/16.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/17.gsm4
-rwxr-xr-xsounds/digits/18.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/19.gsm1
-rwxr-xr-xsounds/digits/2.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/20.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/3.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/30.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/4.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/40.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/5.gsm4
-rwxr-xr-xsounds/digits/50.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/6.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/60.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/7.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/70.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/8.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/80.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/9.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/90.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/digits/hundred.gsmbin0 -> 1155 bytes
-rwxr-xr-xsounds/transfer.gsmbin0 -> 3432 bytes
-rwxr-xr-xsounds/vm-deleted.gsmbin0 -> 2046 bytes
-rwxr-xr-xsounds/vm-goodbye.gsmbin0 -> 2013 bytes
-rwxr-xr-xsounds/vm-incorrect.gsmbin0 -> 2442 bytes
-rwxr-xr-xsounds/vm-instructions.gsmbin0 -> 9834 bytes
-rwxr-xr-xsounds/vm-intro.gsmbin0 -> 9735 bytes
-rwxr-xr-xsounds/vm-isonphone.gsmbin0 -> 1749 bytes
-rwxr-xr-xsounds/vm-isunavail.gsmbin0 -> 1947 bytes
-rwxr-xr-xsounds/vm-login.gsmbin0 -> 2706 bytes
-rwxr-xr-xsounds/vm-message.gsmbin0 -> 1452 bytes
-rwxr-xr-xsounds/vm-messages.gsm5
-rwxr-xr-xsounds/vm-msginstruct.gsmbin0 -> 19602 bytes
-rwxr-xr-xsounds/vm-msgsaved.gsmbin0 -> 3003 bytes
-rwxr-xr-xsounds/vm-no.gsm1
-rwxr-xr-xsounds/vm-nomore.gsmbin0 -> 2442 bytes
-rwxr-xr-xsounds/vm-password.gsmbin0 -> 1353 bytes
-rwxr-xr-xsounds/vm-theperson.gsmbin0 -> 2310 bytes
-rwxr-xr-xsounds/vm-undeleted.gsmbin0 -> 2475 bytes
-rwxr-xr-xsounds/vm-youhave.gsmbin0 -> 1254 bytes
72 files changed, 521 insertions, 138 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 773eb535f..fd5eaac36 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -11,7 +11,7 @@
# the GNU General Public License
#
-APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_intercom.so app_mp3.so
+APPS=app_dial.so app_playback.so app_voicemail.so app_directory.so app_intercom.so app_mp3.so app_system.so app_echo.so
CFLAGS+=
diff --git a/apps/app_echo.c b/apps/app_echo.c
new file mode 100755
index 000000000..370dc6863
--- /dev/null
+++ b/apps/app_echo.c
@@ -0,0 +1,80 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Echo application -- play back what you hear to evaluate latency
+ *
+ * Copyright (C) 1999, Mark Spencer
+ *
+ * Mark Spencer <markster@linux-support.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#include <asterisk/file.h>
+#include <asterisk/logger.h>
+#include <asterisk/channel.h>
+#include <asterisk/pbx.h>
+#include <asterisk/module.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <pthread.h>
+
+
+static char *tdesc = "Simple Echo Application";
+
+static char *app = "Echo";
+
+STANDARD_LOCAL_USER;
+
+LOCAL_USER_DECL;
+
+static int skel_exec(struct ast_channel *chan, void *data)
+{
+ int res=-1;
+ struct localuser *u;
+ struct ast_frame *f;
+ LOCAL_USER_ADD(u);
+ /* Do our thing here */
+ while((f = ast_read(chan))) {
+ if (f->frametype == AST_FRAME_VOICE) {
+ if (ast_write(chan, f))
+ break;
+ } else if (f->frametype == AST_FRAME_DTMF) {
+ if (f->subclass == '#') {
+ res = 0;
+ break;
+ } else
+ if (ast_write(chan, f))
+ break;
+ }
+ }
+ LOCAL_USER_REMOVE(u);
+ return res;
+}
+
+int unload_module(void)
+{
+ STANDARD_HANGUP_LOCALUSERS;
+ return ast_unregister_application(app);
+}
+
+int load_module(void)
+{
+ return ast_register_application(app, skel_exec);
+}
+
+char *description(void)
+{
+ return tdesc;
+}
+
+int usecount(void)
+{
+ int res;
+ STANDARD_USECOUNT(res);
+ return res;
+}
diff --git a/apps/app_skel.c b/apps/app_skel.c
index e766d1142..419b8f40a 100755
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -15,6 +15,7 @@
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
+#include <asterisk/module.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -22,63 +23,32 @@
#include <pthread.h>
-static pthread_mutex_t skellock = PTHREAD_MUTEX_INITIALIZER;
-
-static int usecnt=0;
static char *tdesc = "Trivial skeleton Application";
static char *app = "skel";
-struct skeluser {
- struct ast_channel *chan;
- struct skeluser *next;
-} *users = NULL;
+STANDARD_LOCAL_USER;
+
+LOCAL_USER_DECL;
static int skel_exec(struct ast_channel *chan, void *data)
{
int res=0;
- struct skeluser *u, *ul=NULL;
+ struct localuser *u;
if (!data) {
ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
return -1;
}
- if (!(u=malloc(sizeof(struct skeluser)))) {
- ast_log(LOG_WARNING, "Out of memory\n");
- return -1;
- }
- pthread_mutex_lock(&skellock);
- u->chan = chan;
- u->next = users;
- users = u;
- usecnt++;
- pthread_mutex_unlock(&skellock);
+ LOCAL_USER_ADD(u);
/* Do our thing here */
- pthread_mutex_lock(&skellock);
- u = users;
- while(u) {
- if (ul)
- ul->next = u->next;
- else
- users = u->next;
- u = u->next;
- }
- usecnt--;
- pthread_mutex_unlock(&skellock);
+ LOCAL_USER_REMOVE(u);
return res;
}
int unload_module(void)
{
- struct skeluser *u;
- pthread_mutex_lock(&skellock);
- u = users;
- while(u) {
- /* Hang up anybody who is using us */
- ast_softhangup(u->chan);
- u = u->next;
- }
- pthread_mutex_unlock(&skellock);
+ STANDARD_HANGUP_LOCALUSERS;
return ast_unregister_application(app);
}
@@ -95,8 +65,6 @@ char *description(void)
int usecount(void)
{
int res;
- pthread_mutex_lock(&skellock);
- res = usecnt;
- pthread_mutex_unlock(&skellock);
+ STANDARD_USECOUNT(res);
return res;
}
diff --git a/apps/app_system.c b/apps/app_system.c
new file mode 100755
index 000000000..7e140a427
--- /dev/null
+++ b/apps/app_system.c
@@ -0,0 +1,82 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Execute arbitrary system commands
+ *
+ * Copyright (C) 1999, Mark Spencer
+ *
+ * Mark Spencer <markster@linux-support.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#include <asterisk/file.h>
+#include <asterisk/logger.h>
+#include <asterisk/channel.h>
+#include <asterisk/pbx.h>
+#include <asterisk/module.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <pthread.h>
+
+
+static char *tdesc = "Generic System() application";
+
+static char *app = "System";
+
+STANDARD_LOCAL_USER;
+
+LOCAL_USER_DECL;
+
+static int skel_exec(struct ast_channel *chan, void *data)
+{
+ int res=0;
+ struct localuser *u;
+ if (!data) {
+ ast_log(LOG_WARNING, "System requires an argument(command)\n");
+ return -1;
+ }
+ LOCAL_USER_ADD(u);
+ /* Do our thing here */
+ res = system((char *)data);
+ if (res < 0) {
+ ast_log(LOG_WARNING, "Unable to execute '%s'\n", data);
+ res = -1;
+ } else if (res == 127) {
+ ast_log(LOG_WARNING, "Unable to execute '%s'\n", data);
+ res = -1;
+ } else {
+ if (res && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101))
+ chan->priority+=100;
+ res = 0;
+ }
+ LOCAL_USER_REMOVE(u);
+ return res;
+}
+
+int unload_module(void)
+{
+ STANDARD_HANGUP_LOCALUSERS;
+ return ast_unregister_application(app);
+}
+
+int load_module(void)
+{
+ return ast_register_application(app, skel_exec);
+}
+
+char *description(void)
+{
+ return tdesc;
+}
+
+int usecount(void)
+{
+ int res;
+ STANDARD_USECOUNT(res);
+ return res;
+}
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index f2893b3f6..8fc6f500f 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -141,7 +141,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent)
struct ast_config *cfg;
char *copy, *name, *passwd, *email, *dir, *fmt, *fmts, *fn=NULL;
char comment[256];
- struct ast_filestream *writer, *others[MAX_OTHER_FORMATS];
+ struct ast_filestream *writer=NULL, *others[MAX_OTHER_FORMATS];
char *sfmt[MAX_OTHER_FORMATS];
int res = -1, fmtcnt=0, x;
int msgnum;
@@ -182,8 +182,12 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent)
snprintf(comment, sizeof(comment), "Voicemail from %s to %s (%s) on %s\n",
(chan->callerid ? chan->callerid : "Unknown"),
name, ext, chan->name);
+ if (ast_fileexists(fn, NULL) > 0) {
+ msgnum++;
+ continue;
+ }
writer = ast_writefile(fn, fmt, comment, O_EXCL, 1 /* check for other formats */, 0700);
- if (!writer && (errno != EEXIST))
+ if (!writer)
break;
msgnum++;
} while(!writer && (msgnum < MAXMSG));
@@ -221,9 +225,14 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, int silent)
if (f->frametype == AST_FRAME_VOICE) {
/* Write the primary format */
res = ast_writestream(writer, f);
+ if (res) {
+ ast_log(LOG_WARNING, "Error writing primary frame\n");
+ break;
+ }
/* And each of the others */
- for (x=0;x<fmtcnt;x++)
+ for (x=0;x<fmtcnt;x++) {
res |= ast_writestream(others[x], f);
+ }
ast_frfree(f);
/* Exit on any error */
if (res) {
@@ -314,20 +323,30 @@ static int vm_execmain(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "No voicemail configuration\n");
goto out;
}
- if (ast_streamfile(chan, "vm-login"))
+ if (ast_streamfile(chan, "vm-login")) {
+ ast_log(LOG_WARNING, "Couldn't stream login file\n");
goto out;
+ }
do {
/* Prompt for, and read in the username */
- if (ast_readstring(chan, username, sizeof(username), 2000, 5000, "#"))
+ if (ast_readstring(chan, username, sizeof(username), 2000, 5000, "#")) {
+ ast_log(LOG_WARNING, "Couldn't read username\n");
goto out;
+ }
if (!strlen(username)) {
+ if (option_verbose > 2)
+ ast_verbose(VERBOSE_PREFIX_3 "Username not entered\n");
res = 0;
goto out;
}
- if (ast_streamfile(chan, "vm-password"))
+ if (ast_streamfile(chan, "vm-password")) {
+ ast_log(LOG_WARNING, "Unable to stream password file\n");
goto out;
- if (ast_readstring(chan, password, sizeof(password), 2000, 5000, "#"))
+ }
+ if (ast_readstring(chan, password, sizeof(password), 2000, 5000, "#")) {
+ ast_log(LOG_WARNING, "Unable to read password\n");
goto out;
+ }
copy = ast_variable_retrieve(cfg, NULL, username);
if (copy) {
copy = strdup(copy);
diff --git a/asterisk.c b/asterisk.c
index a79474077..bec0894ae 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -28,7 +28,9 @@ int option_verbose=0;
int option_debug=0;
int option_nofork=0;
int option_quiet=0;
+int option_console=0;
int option_highpriority=0;
+int fully_booted = 0;
#define HIGH_PRIORITY 1
#define HIGH_PRIORITY_SCHED SCHED_RR
@@ -39,6 +41,7 @@ static void urg_handler(int num)
system call. We don't actually need to do anything though. */
if (option_debug)
ast_log(LOG_DEBUG, "Urgent handler\n");
+ signal(num, urg_handler);
return;
}
@@ -89,6 +92,7 @@ static void console_verboser(char *s, int pos, int replace, int complete)
if (!pos)
fprintf(stdout, "\r");
fprintf(stdout, s + pos);
+ fflush(stdout);
if (complete)
/* Wake up a select()ing console */
pthread_kill(consolethread, SIGURG);
@@ -99,8 +103,19 @@ static void consolehandler(char *s)
/* Called when readline data is available */
if (s && strlen(s))
add_history(s);
- if (s)
+ /* Give the console access to the shell */
+ if (s) {
+ if (s[0] == '!') {
+ if (s[1])
+ system(s+1);
+ else
+ system(getenv("SHELL") ? getenv("SHELL") : "/bin/sh");
+ } else
ast_cli_command(STDOUT_FILENO, s);
+ if (!strcasecmp(s, "help"))
+ fprintf(stdout, " !<command> Executes a given shell command\n");
+ } else
+ fprintf(stdout, "\nUse \"quit\" to exit\n");
}
static char quit_help[] =
@@ -138,17 +153,21 @@ int main(int argc, char *argv[])
exit(1);
}
/* Check for options */
- while((c=getopt(argc, argv, "dvqp")) != EOF) {
+ while((c=getopt(argc, argv, "dvqpc")) != EOF) {
switch(c) {
case 'd':
option_debug++;
option_nofork++;
break;
+ case 'c':
+ option_console++;
+ option_nofork++;
case 'p':
option_highpriority++;
break;
case 'v':
option_verbose++;
+ option_nofork++;
break;
case 'q':
option_quiet++;
@@ -157,12 +176,15 @@ int main(int argc, char *argv[])
exit(1);
}
}
+ ast_register_verbose(console_verboser);
/* Print a welcome message if desired */
- if (option_verbose) {
+ if (option_verbose || option_console) {
ast_verbose( "Asterisk, Copyright (C) 1999 Mark Spencer\n");
ast_verbose( "Written by Mark Spencer <markster@linux-support.net>\n");
ast_verbose( "=========================================================================\n");
}
+ if (option_console && !option_verbose)
+ ast_verbose("[ Booting...");
signal(SIGURG, urg_handler);
signal(SIGINT, quit_handler);
signal(SIGTERM, quit_handler);
@@ -177,28 +199,34 @@ int main(int argc, char *argv[])
exit(1);
/* We might have the option of showing a console, but for now just
do nothing... */
-
- /* Console stuff now... */
- /* Register our quit function */
- ast_cli_register(&quit);
- consolethread = pthread_self();
- ast_register_verbose(console_verboser);
- if (option_verbose)
+ if (option_console && !option_verbose)
+ ast_verbose(" ]\n");
+ if (option_verbose || option_console)
ast_verbose( "Asterisk Ready.\n");
- if (strlen(filename))
- read_history(filename);
- rl_callback_handler_install(ASTERISK_PROMPT, consolehandler);
- rl_completion_entry_function = (Function *)cli_generator;
- for(;;) {
- FD_ZERO(&rfds);
- FD_SET(STDIN_FILENO, &rfds);
- res = select(STDIN_FILENO + 1, &rfds, NULL, NULL, NULL);
- if (res > 0) {
- rl_callback_read_char();
- } else if (res < 1) {
- rl_forced_update_display();
- }
-
- }
+ fully_booted = 1;
+ if (option_console) {
+ /* Console stuff now... */
+ /* Register our quit function */
+ ast_cli_register(&quit);
+ consolethread = pthread_self();
+ if (strlen(filename))
+ read_history(filename);
+ rl_callback_handler_install(ASTERISK_PROMPT, consolehandler);
+ rl_completion_entry_function = (Function *)cli_generator;
+ for(;;) {
+ FD_ZERO(&rfds);
+ FD_SET(STDIN_FILENO, &rfds);
+ res = select(STDIN_FILENO + 1, &rfds, NULL, NULL, NULL);
+ if (res > 0) {
+ rl_callback_read_char();
+ } else if (res < 1) {
+ rl_forced_update_display();
+ }
+
+ }
+ } else {
+ /* Do nothing */
+ select(0,NULL,NULL,NULL,NULL);
+ }
return 0;
}
diff --git a/channel.c b/channel.c
index 0a18b2818..881e291cf 100755
--- a/channel.c
+++ b/channel.c
@@ -18,6 +18,7 @@
#include <sys/time.h>
#include <signal.h>
#include <errno.h>
+#include <unistd.h>
#include <asterisk/sched.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
@@ -26,6 +27,27 @@
#include <asterisk/file.h>
#include <asterisk/translate.h>
+
+
+#ifdef DEBUG_MUTEX
+/* Convenient mutex debugging functions */
+#define PTHREAD_MUTEX_LOCK(a) __PTHREAD_MUTEX_LOCK(__FUNCTION__, a)
+#define PTHREAD_MUTEX_UNLOCK(a) __PTHREAD_MUTEX_UNLOCK(__FUNCTION__, a)
+
+static int __PTHREAD_MUTEX_LOCK(char *f, pthread_mutex_t *a) {
+ ast_log(LOG_DEBUG, "Locking %p (%s)\n", a, f);
+ return pthread_mutex_lock(a);
+}
+
+static int __PTHREAD_MUTEX_UNLOCK(char *f, pthread_mutex_t *a) {
+ ast_log(LOG_DEBUG, "Unlocking %p (%s)\n", a, f);
+ return pthread_mutex_unlock(a);
+}
+#else
+#define PTHREAD_MUTEX_LOCK(a) pthread_mutex_lock(a)
+#define PTHREAD_MUTEX_UNLOCK(a) pthread_mutex_unlock(a)
+#endif
+
struct chanlist {
char type[80];
char description[80];
@@ -33,7 +55,6 @@ struct chanlist {
struct ast_channel * (*requester)(char *type, int format, void *data);
struct chanlist *next;
} *backends = NULL;
-
struct ast_channel *channels = NULL;
/* Protect the channel list (highly unlikely that two things would change
@@ -45,7 +66,7 @@ int ast_channel_register(char *type, char *description, int capabilities,
struct ast_channel *(*requester)(char *type, int format, void *data))
{
struct chanlist *chan, *last=NULL;
- if (pthread_mutex_lock(&chlock)) {
+ if (PTHREAD_MUTEX_LOCK(&chlock)) {
ast_log(LOG_WARNING, "Unable to lock channel list\n");
return -1;
}
@@ -53,7 +74,7 @@ int ast_channel_register(char *type, char *description, int capabilities,
while(chan) {
if (!strcasecmp(type, chan->type)) {
ast_log(LOG_WARNING, "Already have a handler for type '%s'\n", type);
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return -1;
}
last = chan;
@@ -62,7 +83,7 @@ int ast_channel_register(char *type, char *description, int capabilities,
chan = malloc(sizeof(struct chanlist));
if (!chan) {
ast_log(LOG_WARNING, "Out of memory\n");
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return -1;
}
strncpy(chan->type, type, sizeof(chan->type));
@@ -78,7 +99,7 @@ int ast_channel_register(char *type, char *description, int capabilities,
ast_log(LOG_DEBUG, "Registered handler for '%s' (%s)\n", chan->type, chan->description);
else if (option_verbose > 1)
ast_verbose( VERBOSE_PREFIX_2 "Registered channel type '%s' (%s)\n", chan->type, chan->description);
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return 0;
}
@@ -86,7 +107,7 @@ struct ast_channel *ast_channel_alloc(void)
{
struct ast_channel *tmp;
struct ast_channel_pvt *pvt;
- pthread_mutex_lock(&chlock);
+ PTHREAD_MUTEX_LOCK(&chlock);
tmp = malloc(sizeof(struct ast_channel));
memset(tmp, 0, sizeof(struct ast_channel));
if (tmp) {
@@ -121,17 +142,17 @@ struct ast_channel *ast_channel_alloc(void)
}
} else
ast_log(LOG_WARNING, "Out of memory\n");
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return tmp;
}
struct ast_channel *ast_channel_walk(struct ast_channel *prev)
{
struct ast_channel *l, *ret=NULL;
- pthread_mutex_lock(&chlock);
+ PTHREAD_MUTEX_LOCK(&chlock);
l = channels;
if (!prev) {
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return l;
}
while(l) {
@@ -139,7 +160,7 @@ struct ast_channel *ast_channel_walk(struct ast_channel *prev)
ret = l->next;
l = l->next;
}
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return ret;
}
@@ -147,7 +168,7 @@ struct ast_channel *ast_channel_walk(struct ast_channel *prev)
void ast_channel_free(struct ast_channel *chan)
{
struct ast_channel *last=NULL, *cur;
- pthread_mutex_lock(&chlock);
+ PTHREAD_MUTEX_LOCK(&chlock);
cur = channels;
while(cur) {
if (cur == chan) {
@@ -174,7 +195,7 @@ void ast_channel_free(struct ast_channel *chan)
free(chan->callerid);
pthread_mutex_destroy(&chan->lock);
free(chan);
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
}
int ast_softhangup(struct ast_channel *chan)
@@ -220,7 +241,7 @@ void ast_channel_unregister(char *type)
struct chanlist *chan, *last=NULL;
if (option_debug)
ast_log(LOG_DEBUG, "Unregistering channel type '%s'\n", type);
- if (pthread_mutex_lock(&chlock)) {
+ if (PTHREAD_MUTEX_LOCK(&chlock)) {
ast_log(LOG_WARNING, "Unable to lock channel list\n");
return;
}
@@ -232,13 +253,13 @@ void ast_channel_unregister(char *type)
else
backends = backends->next;
free(chan);
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return;
}
last = chan;
chan = chan->next;
}
- pthread_mutex_unlock(&chlock);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
}
int ast_answer(struct ast_channel *chan)
@@ -392,7 +413,7 @@ struct ast_channel *ast_request(char *type, int format, void *data)
{
struct chanlist *chan;
struct ast_channel *c = NULL;
- if (pthread_mutex_lock(&chlock)) {
+ if (PTHREAD_MUTEX_LOCK(&chlock)) {
ast_log(LOG_WARNING, "Unable to lock channel list\n");
return NULL;
}
@@ -402,15 +423,16 @@ struct ast_channel *ast_request(char *type, int format, void *data)
if (!(chan->capabilities & format)) {
format = ast_translator_best_choice(format, chan->capabilities);
}
+ PTHREAD_MUTEX_UNLOCK(&chlock);
if (chan->requester)
c = chan->requester(type, format, data);
- pthread_mutex_unlock(&chlock);
- break;
+ return c;
}
chan = chan->next;
}
if (!chan)
ast_log(LOG_WARNING, "No channel type registered for '%s'\n", type);
+ PTHREAD_MUTEX_UNLOCK(&chlock);
return c;
}
@@ -433,9 +455,10 @@ int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int fti
if (!len)
return -1;
do {
- if (c->streamid > -1) {
+ if ((c->streamid > -1) || (c->trans && (c->trans->streamid > -1))) {
d = ast_waitstream(c, AST_DIGIT_ANY);
ast_stopstream(c);
+ usleep(1000);
if (!d)
d = ast_waitfordigit(c, to);
} else {
diff --git a/codecs/codec_g723_1.c b/codecs/codec_g723_1.c
index 89d2be760..b71e28cc2 100755
--- a/codecs/codec_g723_1.c
+++ b/codecs/codec_g723_1.c
@@ -200,7 +200,7 @@ static int g723tolin_framein(struct ast_translator_pvt *pvt, struct ast_frame *f
#ifdef ANNEX_B
Decod(&tmp->dec, tmpdata, f->data, 0);
for (x=0;x<Frame;x++)
- (tmp->buf + tmp->tail)[x] = tmpdata[x];
+ (tmp->buf + tmp->tail)[x] = (short)tmpdata[x];
#else
Decod(&tmp->dec, tmp->buf + tmp->tail, f->data, 0);
#endif
diff --git a/configs/adtranvofr.conf.sample b/configs/adtranvofr.conf.sample
index df19e094e..efd6af3f0 100755
--- a/configs/adtranvofr.conf.sample
+++ b/configs/adtranvofr.conf.sample
@@ -6,8 +6,10 @@
[interfaces]
;
; Lines for which we are the user termination. They accept incoming
-; and outgoing calls.
+; and outgoing calls. We use the default context on the first 8 lines
+; used by internal phones.
;
+context=default
;user=voice00
;user=voice01
;user=voice02
@@ -16,15 +18,11 @@
;user=voice05
;user=voice06
;user=voice07
-context=default
-user=voice13
-user=voice14
-user=voice15
; Calls on 16 and 17 come from the outside world, so they get
; a little bit special treatment
context=remote
-user=voice16
-user=voice17
+;user=voice16
+;user=voice17
;
; Next we have lines which we only accept calls on, and typically
; do not send outgoing calls on (i.e. these are where we are the
diff --git a/configs/modem.conf.sample b/configs/modem.conf.sample
index 27b3230f4..d5989b477 100755
--- a/configs/modem.conf.sample
+++ b/configs/modem.conf.sample
@@ -26,8 +26,8 @@ stripmsd=1
;
; Type of dialing
;
-;dialtype=tone
-dialtype=pulse
+dialtype=tone
+;dialtype=pulse
;
; Mode selection. "Immediate" means that as soon as you dial, you're connected
; and the line is considered up. "Ring" means we wait until the ring cadence
@@ -39,4 +39,4 @@ mode=immediate
;
; List all devices we can use.
;
-device=/dev/ttyS3
+;device=/dev/ttyS3
diff --git a/configs/modules.conf.sample b/configs/modules.conf.sample
index 2fe03093b..2b32e1b09 100755
--- a/configs/modules.conf.sample
+++ b/configs/modules.conf.sample
@@ -3,12 +3,26 @@
;
; Module Loader configuration file
;
+
[modules]
autoload=yes
-;load=pbx_gtkconsole.so
+;
+; If you want, load the GTK console right away.
+; Don't load the KDE console since
+; it's not as sophisticated right now.
+;
noload=pbx_gtkconsole.so
+;load=pbx_gtkconsole.so
noload=pbx_kdeconsole.so
+;
+; Intercom application is obsoleted by
+; chan_oss. Don't load it.
+;
noload=app_intercom.so
-;load=chan_vofr.so
-;load=chan_h323.so
+;
+; Module names listed in "global" section will have symbols globally
+; exported to modules loaded after them.
+;
+[global]
+chan_modem.so=yes
diff --git a/configs/voicemail.conf.sample b/configs/voicemail.conf.sample
index dcf3d0f8f..ce36a3b66 100755
--- a/configs/voicemail.conf.sample
+++ b/configs/voicemail.conf.sample
@@ -2,13 +2,19 @@
; Voicemail Configuration
;
[general]
-; Default format for writing Voicemail
-; format=g723sf|rawgsm|mp3|wav
-format=g723sf|wav49|wav
+; Default formats for writing Voicemail
+;format=g723sf|wav49|wav
+format=gsm|wav49|wav
+;
+; Each mailbox is listed in the form <mailbox>=<password>,<name>,<email>
+; if the e-mail is specified, a message will be sent when a message is
+; received, to the given mailbox.
+;
[default]
-4200=2345,Mark Spencer,markster@linux-support.net
-4300=2345,Ben Rigas,ben@american-computer.net
-4310=2345,Sales,sales@marko.net
-4069=2345,Matt Brooks,matt@marko.net
-4110=1379,Rob Flynn,rflynn@blueridge.net
+1234=4242,Example Mailbox,root@localhost
+;4200=9855,Mark Spencer,markster@linux-support.net
+;4300=3456,Ben Rigas,ben@american-computer.net
+;4310=5432,Sales,sales@marko.net
+;4069=6522,Matt Brooks,matt@marko.net
+;4110=3443,Rob Flynn,rflynn@blueridge.net
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 425eb2e30..d78c490d1 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -143,12 +143,14 @@ char ast_waitfordigit(struct ast_channel *c, int ms);
for the first digit */
int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders);
#define CHECK_BLOCKING(c) { \
- if ((c)->blocking) \
+ if ((c)->blocking) {\
ast_log(LOG_WARNING, "Blocking '%s', already blocked by thread %ld in procedure %s\n", (c)->name, (c)->blocker, (c)->blockproc); \
- else { \
+ /* *((int *)0)=0; */ \
+ } else { \
(c)->blocker = pthread_self(); \
(c)->blockproc = __PRETTY_FUNCTION__; \
- c->blocking = -1; } }
+ c->blocking = -1; \
+ } }
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/loader.c b/loader.c
index d6a549b4b..63c44df40 100755
--- a/loader.c
+++ b/loader.c
@@ -92,6 +92,22 @@ int ast_load_resource(char *resource_name)
int errors=0;
int res;
struct module *m;
+ int flags=0;
+ char *val;
+ int o;
+ struct ast_config *cfg;
+ /* Keep the module file parsing silent */
+ o = option_verbose;
+ option_verbose = 0;
+ cfg = ast_load(AST_MODULE_CONFIG);
+ option_verbose = o;
+ if (cfg) {
+ if ((val = ast_variable_retrieve(cfg, "global", resource_name))
+ && ast_true(val))
+ flags |= RTLD_GLOBAL;
+ ast_destroy(cfg);
+ }
+
if (pthread_mutex_lock(&modlock))
ast_log(LOG_WARNING, "Failed to lock\n");
m = module_list;
@@ -115,7 +131,7 @@ int ast_load_resource(char *resource_name)
} else {
snprintf(fn, sizeof(fn), "%s/%s", AST_MODULE_DIR, resource_name);
}
- m->lib = dlopen(fn, RTLD_NOW | RTLD_GLOBAL);
+ m->lib = dlopen(fn, RTLD_NOW | flags);
if (!m->lib) {
ast_log(LOG_WARNING, "%s\n", dlerror());
free(m);
@@ -149,16 +165,24 @@ int ast_load_resource(char *resource_name)
pthread_mutex_unlock(&modlock);
return -1;
}
- if (option_verbose)
- ast_verbose( " => (%s)\n", m->description());
+ if (!fully_booted) {
+ if (option_verbose)
+ ast_verbose( " => (%s)\n", m->description());
+ if (option_console && !option_verbose)
+ ast_verbose( ".");
+ } else {
+ if (option_verbose)
+ ast_verbose(VERBOSE_PREFIX_1 "Loaded %s => (%s)\n", fn, m->description());
+ }
+ m->next = module_list;
+ module_list = m;
pthread_mutex_unlock(&modlock);
if ((res = m->load_module())) {
- ast_log(LOG_WARNING, "%s: load_module failed, returning %d\n", m->resource, fn, res);
+ ast_log(LOG_WARNING, "%s: load_module failed, returning %d\n", m->resource, res);
ast_unload_resource(resource_name, 0);
return -1;
}
- m->next = module_list;
- module_list = m;
+ ast_update_use_count();
return 0;
}
diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c
index 1aefa4ca8..52a4ecb98 100755
--- a/pbx/pbx_gtkconsole.c
+++ b/pbx/pbx_gtkconsole.c
@@ -25,12 +25,15 @@
#include <asterisk/module.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
+#include <asterisk/cli.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
+#include <sys/time.h>
+#include <sys/signal.h>
#include <gtk/gtk.h>
#include <glib.h>
@@ -42,6 +45,9 @@ static pthread_mutex_t verb_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_t console_thread;
static int inuse=0;
+static int clipipe[2];
+static int cleanupid = -1;
+
static char *dtext = "Asterisk PBX Console (GTK Version)";
static GtkWidget *window;
@@ -50,6 +56,9 @@ static GtkWidget *closew;
static GtkWidget *verb;
static GtkWidget *modules;
static GtkWidget *statusbar;
+static GtkWidget *cli;
+
+static struct timeval last;
static void update_statusbar(char *msg)
{
@@ -65,26 +74,101 @@ int unload_module(void)
gdk_threads_enter();
gtk_widget_destroy(window);
gdk_threads_leave();
+ close(clipipe[0]);
+ close(clipipe[1]);
}
return 0;
}
+static int cleanup(void *useless)
+{
+ gdk_threads_enter();
+ gtk_clist_thaw(GTK_CLIST(verb));
+ gtk_widget_queue_resize(verb->parent);
+ gtk_clist_moveto(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1, 0, 0, 0);
+ cleanupid = -1;
+ gdk_threads_leave();
+ return 0;
+}
+
-static void verboser(char *stuff, int opos, int replacelast, int complete)
+static void __verboser(char *stuff, int opos, int replacelast, int complete)
{
char *s2[2];
- pthread_mutex_lock(&verb_lock);
+ struct timeval tv;
+ int ms;
s2[0] = stuff;
s2[1] = NULL;
- gdk_threads_enter();
+ gtk_clist_freeze(GTK_CLIST(verb));
if (replacelast)
gtk_clist_remove(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1);
gtk_clist_append(GTK_CLIST(verb), s2);
- gtk_clist_moveto(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1, 0, 0, 0);
- gdk_threads_leave();
+ if (last.tv_sec || last.tv_usec) {
+ gdk_threads_leave();
+ gettimeofday(&tv, NULL);
+ if (cleanupid > -1)
+ gtk_timeout_remove(cleanupid);
+ ms = (tv.tv_sec - last.tv_sec) * 1000 + (tv.tv_usec - last.tv_usec) / 1000;
+ if (ms < 100) {
+ /* We just got a message within 100ms, so just schedule an update
+ in the near future */
+ cleanupid = gtk_timeout_add(200, cleanup, NULL);
+ } else {
+ cleanup(&cleanupid);
+ }
+ last = tv;
+ } else {
+ gettimeofday(&last, NULL);
+ }
+}
+
+static void verboser(char *stuff, int opos, int replacelast, int complete)
+{
+ pthread_mutex_lock(&verb_lock);
+ /* Lock appropriately if we're really being called in verbose mode */
+ __verboser(stuff, opos, replacelast, complete);
pthread_mutex_unlock(&verb_lock);
}
+static void cliinput(void *data, int source, GdkInputCondition ic)
+{
+ static char buf[256];
+ static int offset = 0;
+ int res;
+ char *c;
+ char *l;
+ char n;
+ /* Read as much stuff is there */
+ res = read(source, buf + offset, sizeof(buf) - 1 - offset);
+ if (res > -1)
+ buf[res + offset] = '\0';
+ /* make sure we've null terminated whatever we have so far */
+ c = buf;
+ l = buf;
+ while(*c) {
+ if (*c == '\n') {
+ /* Keep the trailing \n */
+ c++;
+ n = *c;
+ *c = '\0';
+ __verboser(l, 0, 0, 1);
+ *(c - 1) = '\0';
+ *c = n;
+ l = c;
+ } else
+ c++;
+ }
+ if (strlen(l)) {
+ /* We have some left over */
+ memmove(buf, l, strlen(l) + 1);
+ offset = strlen(buf);
+ } else {
+ offset = 0;
+ }
+
+}
+
+
static void remove_module()
{
int res;
@@ -194,14 +278,12 @@ static int mod_update(void)
if (GTK_CLIST(modules)->selection) {
module= (char *)gtk_clist_get_row_data(GTK_CLIST(modules), (int) GTK_CLIST(modules)->selection->data);
}
- gdk_threads_enter();
gtk_clist_freeze(GTK_CLIST(modules));
gtk_clist_clear(GTK_CLIST(modules));
ast_update_module_list(add_mod);
if (module)
gtk_clist_select_row(GTK_CLIST(modules), gtk_clist_find_row_from_data(GTK_CLIST(modules), module), -1);
gtk_clist_thaw(GTK_CLIST(modules));
- gdk_threads_leave();
return 1;
}
@@ -220,8 +302,12 @@ static void exit_now(GtkWidget *widget, gpointer data)
static void exit_completely(GtkWidget *widget, gpointer data)
{
- /* This is the wrong way to do this. We need an ast_clean_exit() routine */
- exit(0);
+#if 0
+ /* Clever... */
+ ast_cli_command(clipipe[1], "quit");
+#else
+ kill(getpid(), SIGTERM);
+#endif
}
static void exit_nicely(GtkWidget *widget, gpointer data)
@@ -239,6 +325,17 @@ static void *consolethread(void *data)
return NULL;
}
+static int cli_activate()
+{
+ char buf[256];
+ strncpy(buf, gtk_entry_get_text(GTK_ENTRY(cli)), sizeof(buf));
+ gtk_entry_set_text(GTK_ENTRY(cli), "");
+ if (strlen(buf)) {
+ ast_cli_command(clipipe[1], buf);
+ }
+ return TRUE;
+}
+
static int show_console()
{
GtkWidget *hbox;
@@ -276,7 +373,7 @@ static int show_console()
gtk_container_add(GTK_CONTAINER(sw), verb);
gtk_widget_show(verb);
gtk_widget_show(sw);
- gtk_widget_set_usize(verb, 600, 400);
+ gtk_widget_set_usize(verb, 640, 400);
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), sw, gtk_label_new("Verbose Status"));
@@ -333,14 +430,21 @@ static int show_console()
hbox = gtk_vbox_new(FALSE, 0);
gtk_widget_show(hbox);
+
+ /* Command line */
+ cli = gtk_entry_new();
+ gtk_widget_show(cli);
+
+ gtk_signal_connect(GTK_OBJECT(cli), "activate",
+ GTK_SIGNAL_FUNC (cli_activate), NULL);
gtk_box_pack_start(GTK_BOX(hbox), notebook, TRUE, TRUE, 5);
gtk_box_pack_start(GTK_BOX(hbox), wbox, FALSE, FALSE, 5);
+ gtk_box_pack_start(GTK_BOX(hbox), cli, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), statusbar, FALSE, FALSE, 0);
-
-
gtk_container_add(GTK_CONTAINER(window), hbox);
gtk_window_set_title(GTK_WINDOW(window), "Asterisk Console");
+ gtk_widget_grab_focus(cli);
pthread_create(&console_thread, NULL, consolethread, NULL);
/* XXX Okay, seriously fix me! XXX */
usleep(100000);
@@ -348,6 +452,7 @@ static int show_console()
gtk_clist_freeze(GTK_CLIST(verb));
ast_loader_register(mod_update);
gtk_clist_thaw(GTK_CLIST(verb));
+ gdk_input_add(clipipe[0], GDK_INPUT_READ, cliinput, NULL);
mod_update();
update_statusbar("Asterisk Console Ready");
return 0;
@@ -356,6 +461,10 @@ static int show_console()
int load_module(void)
{
+ if (pipe(clipipe)) {
+ ast_log(LOG_WARNING, "Unable to create CLI pipe\n");
+ return -1;
+ }
g_thread_init(NULL);
if (gtk_init_check(NULL, NULL)) {
/* XXX Do we need to call this twice? XXX */
diff --git a/say.c b/say.c
index c3f5fba5b..41b66925e 100755
--- a/say.c
+++ b/say.c
@@ -42,8 +42,13 @@ int ast_say_digits(struct ast_channel *chan, int num)
int ast_say_number(struct ast_channel *chan, int num)
{
int res = 0;
+ int playh = 0;
char fn[256] = "";
while(num && !res) {
+ if (playh) {
+ snprintf(fn, sizeof(fn), "digits/hundred");
+ playh = 0;
+ } else
if (num < 20) {
snprintf(fn, sizeof(fn), "digits/%d", num);
num = 0;
@@ -52,8 +57,13 @@ int ast_say_number(struct ast_channel *chan, int num)
snprintf(fn, sizeof(fn), "digits/%d", (num /10) * 10);
num -= ((num / 10) * 10);
} else {
- ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
- res = -1;
+ if (num < 1000){
+ snprintf(fn, sizeof(fn), "digits/%d", (num/100));
+ playh++;
+ } else {
+ ast_log(LOG_DEBUG, "Number '%d' is too big for me\n", num);
+ res = -1;
+ }
}
if (!res) {
res = ast_streamfile(chan, fn);
diff --git a/sounds/beep.gsm b/sounds/beep.gsm
new file mode 100755
index 000000000..16407f655
--- /dev/null
+++ b/sounds/beep.gsm
Binary files differ
diff --git a/sounds/demo-abouttotry.gsm b/sounds/demo-abouttotry.gsm
new file mode 100755
index 000000000..2d7842fd3
--- /dev/null
+++ b/sounds/demo-abouttotry.gsm
Binary files differ
diff --git a/sounds/demo-congrats.gsm b/sounds/demo-congrats.gsm
new file mode 100755
index 000000000..c3fa396ba
--- /dev/null
+++ b/sounds/demo-congrats.gsm
Binary files differ
diff --git a/sounds/demo-echodone.gsm b/sounds/demo-echodone.gsm
new file mode 100755
index 000000000..f0d6764f4
--- /dev/null
+++ b/sounds/demo-echodone.gsm
Binary files differ
diff --git a/sounds/demo-echotest.gsm b/sounds/demo-echotest.gsm
new file mode 100755
index 000000000..3ad6c2aa4
--- /dev/null
+++ b/sounds/demo-echotest.gsm
Binary files differ
diff --git a/sounds/demo-instruct.gsm b/sounds/demo-instruct.gsm
new file mode 100755
index 000000000..b40d17212
--- /dev/null
+++ b/sounds/demo-instruct.gsm
Binary files differ
diff --git a/sounds/demo-nogo.gsm b/sounds/demo-nogo.gsm
new file mode 100755
index 000000000..340b3c870
--- /dev/null
+++ b/sounds/demo-nogo.gsm
Binary files differ
diff --git a/sounds/demo-thanks.gsm b/sounds/demo-thanks.gsm
new file mode 100755
index 000000000..6c8b1418f
--- /dev/null
+++ b/sounds/demo-thanks.gsm
Binary files differ
diff --git a/sounds/digits/0.gsm b/sounds/digits/0.gsm
new file mode 100755
index 000000000..d7c3be0ae
--- /dev/null
+++ b/sounds/digits/0.gsm
Binary files differ
diff --git a/sounds/digits/1.gsm b/sounds/digits/1.gsm
new file mode 100755
index 000000000..c59f027cd
--- /dev/null
+++ b/sounds/digits/1.gsm
Binary files differ
diff --git a/sounds/digits/10.gsm b/sounds/digits/10.gsm
new file mode 100755
index 000000000..fd8c88a09
--- /dev/null
+++ b/sounds/digits/10.gsm
Binary files differ
diff --git a/sounds/digits/11.gsm b/sounds/digits/11.gsm
new file mode 100755
index 000000000..c22cf785b
--- /dev/null
+++ b/sounds/digits/11.gsm
@@ -0,0 +1,5 @@
+S^UeM-WVJ[jm#֒CK818ԱjMo!ivsdH eb,]օ۞%^$)n8kkŨӢG o6ڄd4 5!kdȓ;?*$&r[1붃%D9^:ܑ"ڀ]#V4᳉""q/!a& 'MZi3is¹ U! ",ށ}ⵝW qe{{);o{Tw4E(s*(MLsywUrI-qP QmkMN/:q/'je*oטm2.'oo+cm[x۰7@QS\kQjG=PP,_pk磌kbCis fMTp6%Ӭ_pkPߎUV5wkxd5n1:kp=RơX+
+JHɅJbykh<9[~h$؃솲9[jjhfʅ#Di^
+r4jgq9Rr4МRW5Aٓu0ӫd3ԉ
+=p(QX((͞ѤghLKh˧c;"'0S )\T(``9km&v fYcī'2E)u3 C>U rqR#BVܯeM$(dr+cƶ7e!5"ҟweG.SFZb{[W
+b NdԺ@ģ{" N"5,Գ"'FۍZˆ]UY`!QA;v_AܹҐBj^Ts[eӦ@V@,S^S"࠾Ӧm؀ٜ["+mGY sZn֠rE3|qĥ@-jfشrM̢ޠT1u76 jaXli,LՓ@!E""zQ6"Ơ!Sp8Z\XMZ\lh*'@ۑEҝb@8[;`KVbB_S}u \ No newline at end of file
diff --git a/sounds/digits/12.gsm b/sounds/digits/12.gsm
new file mode 100755
index 000000000..445a4bfea
--- /dev/null
+++ b/sounds/digits/12.gsm
Binary files differ
diff --git a/sounds/digits/13.gsm b/sounds/digits/13.gsm
new file mode 100755
index 000000000..e0e04e717
--- /dev/null
+++ b/sounds/digits/13.gsm
Binary files differ
diff --git a/sounds/digits/14.gsm b/sounds/digits/14.gsm
new file mode 100755
index 000000000..0ee808ad4
--- /dev/null
+++ b/sounds/digits/14.gsm
Binary files differ
diff --git a/sounds/digits/15.gsm b/sounds/digits/15.gsm
new file mode 100755
index 000000000..debe89058
--- /dev/null
+++ b/sounds/digits/15.gsm
Binary files differ
diff --git a/sounds/digits/16.gsm b/sounds/digits/16.gsm
new file mode 100755
index 000000000..fe4b020ab
--- /dev/null
+++ b/sounds/digits/16.gsm
Binary files differ
diff --git a/sounds/digits/17.gsm b/sounds/digits/17.gsm
new file mode 100755
index 000000000..af2fc6aaa
--- /dev/null
+++ b/sounds/digits/17.gsm
@@ -0,0 +1,4 @@
+-R4t`֡f*¶4;pQI^֝y`"IV c,U\Oګ˥Ux|(VᙩsS4[xؑءFͺnD6ͦ(⛢5f՜`Y#fhnCbԢ7fY$i7&ԝrrw%(m6XT0&˛+7,%Ԧd_4\l6y[uDny13#nJ&u8-`]w;IƓwQ$+tRKm8w1q[ul&1u0,L|/4 $F̉Iot͊i9%*[Zr42',Ȅ>[}E&va8hd}+if}FyvÈ,V{CqԦc1{9$A%
+D)vwKD'#wc0qhE)Ws <%mbG7-.%Zm˷l(#hc`mɿŎeqi%x9w=KCx49-zmG#&X䖥N{B4~û]&㢢(vɧ'$-DatKI +5ꁪvLPgnLj3R)wb$ 1%摇h.ĦDdXإ%"=mG l8Lӹi(h]pj;؝<fndpqk}9iSd彭NhLrh8dǶ@Bm}-H$՞D(I hہh\M7?b=E؋G'oʜ%7YԦ
+h"LUn<ёCMUmJԓeqwnyI܅ ]dIXZMP#ǤӞv
+ڍdcy"j[A$þxߥ.HˡZR?Z4$PJ}QMBRnYbRĉ%m"jffYTq"e-km8ܶ6m2$왷!%laݼm!dҟf #IaHfڻa#jE̹AsQ#ҠvdRH!NJT"ߩ"A&n \ No newline at end of file
diff --git a/sounds/digits/18.gsm b/sounds/digits/18.gsm
new file mode 100755
index 000000000..d2c604867
--- /dev/null
+++ b/sounds/digits/18.gsm
Binary files differ
diff --git a/sounds/digits/19.gsm b/sounds/digits/19.gsm
new file mode 100755
index 000000000..67dc993b3
--- /dev/null
+++ b/sounds/digits/19.gsm
@@ -0,0 +1 @@
+ԠcrXS)ԜZڝ_&jzXhrEV撠٪Y3#M8[QԠ'esY˭RFt N$]zĀ+!e#4Ծcr4ْjR834QoWq%ҝdb@]n=€ɝ6ha]uai˶CJV8c4ۓ%D&Y1hr0l(>MRv܃kr_(hf'vr&}7$ڒȘ8ժp{XMy&Wm{XwLۖp(g-D'ul&h[_Ru( 1}1Ps+8"lR;g$K_a jo͸Xo+'* C(_Lj'p!#w)Ng'Rډ])DDC[pBu+cd[e IʡE]!ܢ7Tb|!R#Y$@#G4}Ԍ]YjҞc-Q¡DR'#i!nݑ9rj"rqA;J֤zFZq)űM),pL؄*0¤g9f۞wZ+)QHF*<REv;\G(}(kih̅:d-MIdz*_$22 )vz)눹m̽^<d3uʰ[M!YF*h]E&ңgZX&ʥ%8T-E;$: i}VnnI-T^<zu7Go[#E"x8M{DGBYl(RE둾#r63mN R\ ˆLq'Ŭ Rjˬan[+u[s:8#䢧d'$VB!WXMMdZn]baIj P'/֦!,zҟe]"bQ)A)efORT`Ut"K"eA&͎ٝXK%*+ހdST)"enC+ \ No newline at end of file
diff --git a/sounds/digits/2.gsm b/sounds/digits/2.gsm
new file mode 100755
index 000000000..4de58fbc9
--- /dev/null
+++ b/sounds/digits/2.gsm
Binary files differ
diff --git a/sounds/digits/20.gsm b/sounds/digits/20.gsm
new file mode 100755
index 000000000..e10de0d62
--- /dev/null
+++ b/sounds/digits/20.gsm
Binary files differ
diff --git a/sounds/digits/3.gsm b/sounds/digits/3.gsm
new file mode 100755
index 000000000..4395cae0a
--- /dev/null
+++ b/sounds/digits/3.gsm
Binary files differ
diff --git a/sounds/digits/30.gsm b/sounds/digits/30.gsm
new file mode 100755
index 000000000..025a25846
--- /dev/null
+++ b/sounds/digits/30.gsm
Binary files differ
diff --git a/sounds/digits/4.gsm b/sounds/digits/4.gsm
new file mode 100755
index 000000000..be5c1df6b
--- /dev/null
+++ b/sounds/digits/4.gsm
Binary files differ
diff --git a/sounds/digits/40.gsm b/sounds/digits/40.gsm
new file mode 100755
index 000000000..cdf537e67
--- /dev/null
+++ b/sounds/digits/40.gsm
Binary files differ
diff --git a/sounds/digits/5.gsm b/sounds/digits/5.gsm
new file mode 100755
index 000000000..570b01f1a
--- /dev/null
+++ b/sounds/digits/5.gsm
@@ -0,0 +1,4 @@
+iHbvó̠ӍʤnDXo]z"X$9S<[s(!vEUv }!j@RYW+\<p3]zY*Q+,KzԭQhv,߂`րɣ$ԌȢf8աzYa"r`ߛYܔ$%IebFQ"&˶_ͶAdRH1M"1:ZD@)5$CW[YG#m/a$dԕ=]9$s"+qYn qC[v%ԯսqϸ/9qQ8!M0*qV8Ùov'mP7L))/oQ[*m9'o#V]Emm3%>m\8:m7َ"oԦQHԱ;o̎W*mf1
+oMnc*4/q
+J)/qzr##7#3*n=2,psXN[u h"1R:u22UuStw,aM#/1Q]MGE2y*{yr9|{#Ȣ}'^qz'}1oErDODI[lmyL֪4UqdPHDŽխز#u&Î,"NQG#ժ"0Fc'$ }#o6%*uFtm }*fj]|tdh֧[ҹ3K6zgKIxsoPfKV}N5u8H{Zj7B+lWĭ";5b@cm"R̍M}ʁ a%lZk!XQzww,-+D6"z"T\q%"|Y5'Y'DTIOդZfq,ۭٮgbA\rMS$%QጡCmȥ΀A[j< m !i1,f]Y[5&Դӈȣj]YcW[
+c]zRؓT${V*C̭` n'ҝsbi#G,lrڀ \ No newline at end of file
diff --git a/sounds/digits/50.gsm b/sounds/digits/50.gsm
new file mode 100755
index 000000000..38edca623
--- /dev/null
+++ b/sounds/digits/50.gsm
Binary files differ
diff --git a/sounds/digits/6.gsm b/sounds/digits/6.gsm
new file mode 100755
index 000000000..bfad09ae7
--- /dev/null
+++ b/sounds/digits/6.gsm
Binary files differ
diff --git a/sounds/digits/60.gsm b/sounds/digits/60.gsm
new file mode 100755
index 000000000..2bfdd22b1
--- /dev/null
+++ b/sounds/digits/60.gsm
Binary files differ
diff --git a/sounds/digits/7.gsm b/sounds/digits/7.gsm
new file mode 100755
index 000000000..10d47a833
--- /dev/null
+++ b/sounds/digits/7.gsm
Binary files differ
diff --git a/sounds/digits/70.gsm b/sounds/digits/70.gsm
new file mode 100755
index 000000000..b2d792d46
--- /dev/null
+++ b/sounds/digits/70.gsm
Binary files differ
diff --git a/sounds/digits/8.gsm b/sounds/digits/8.gsm
new file mode 100755
index 000000000..d448934c0
--- /dev/null
+++ b/sounds/digits/8.gsm
Binary files differ
diff --git a/sounds/digits/80.gsm b/sounds/digits/80.gsm
new file mode 100755
index 000000000..8f03a1e61
--- /dev/null
+++ b/sounds/digits/80.gsm
Binary files differ
diff --git a/sounds/digits/9.gsm b/sounds/digits/9.gsm
new file mode 100755
index 000000000..834c1a529
--- /dev/null
+++ b/sounds/digits/9.gsm
Binary files differ
diff --git a/sounds/digits/90.gsm b/sounds/digits/90.gsm
new file mode 100755
index 000000000..7a362fdf6
--- /dev/null
+++ b/sounds/digits/90.gsm
Binary files differ
diff --git a/sounds/digits/hundred.gsm b/sounds/digits/hundred.gsm
new file mode 100755
index 000000000..890cd90c7
--- /dev/null
+++ b/sounds/digits/hundred.gsm
Binary files differ
diff --git a/sounds/transfer.gsm b/sounds/transfer.gsm
new file mode 100755
index 000000000..a4928913b
--- /dev/null
+++ b/sounds/transfer.gsm
Binary files differ
diff --git a/sounds/vm-deleted.gsm b/sounds/vm-deleted.gsm
new file mode 100755
index 000000000..0839a0e94
--- /dev/null
+++ b/sounds/vm-deleted.gsm
Binary files differ
diff --git a/sounds/vm-goodbye.gsm b/sounds/vm-goodbye.gsm
new file mode 100755
index 000000000..9ae8ad1ee
--- /dev/null
+++ b/sounds/vm-goodbye.gsm
Binary files differ
diff --git a/sounds/vm-incorrect.gsm b/sounds/vm-incorrect.gsm
new file mode 100755
index 000000000..486a9b8b4
--- /dev/null
+++ b/sounds/vm-incorrect.gsm
Binary files differ
diff --git a/sounds/vm-instructions.gsm b/sounds/vm-instructions.gsm
new file mode 100755
index 000000000..7e826b791
--- /dev/null
+++ b/sounds/vm-instructions.gsm
Binary files differ
diff --git a/sounds/vm-intro.gsm b/sounds/vm-intro.gsm
new file mode 100755
index 000000000..64624a0d8
--- /dev/null
+++ b/sounds/vm-intro.gsm
Binary files differ
diff --git a/sounds/vm-isonphone.gsm b/sounds/vm-isonphone.gsm
new file mode 100755
index 000000000..a0ce4e5a5
--- /dev/null
+++ b/sounds/vm-isonphone.gsm
Binary files differ
diff --git a/sounds/vm-isunavail.gsm b/sounds/vm-isunavail.gsm
new file mode 100755
index 000000000..e972c1ebf
--- /dev/null
+++ b/sounds/vm-isunavail.gsm
Binary files differ
diff --git a/sounds/vm-login.gsm b/sounds/vm-login.gsm
new file mode 100755
index 000000000..a1f14288e
--- /dev/null
+++ b/sounds/vm-login.gsm
Binary files differ
diff --git a/sounds/vm-message.gsm b/sounds/vm-message.gsm
new file mode 100755
index 000000000..8386ae799
--- /dev/null
+++ b/sounds/vm-message.gsm
Binary files differ
diff --git a/sounds/vm-messages.gsm b/sounds/vm-messages.gsm
new file mode 100755
index 000000000..5c2b5b240
--- /dev/null
+++ b/sounds/vm-messages.gsm
@@ -0,0 +1,5 @@
+EPZS]X||Lo39\AT-VfrY;2|VN6ʀfGHA(i
+ҧz!)a]mR+u
+"e$KkE⭛e鋕QJ٬pQ4f%\VhQ!dmrLlj[u8S$ZXPl)ZңecQe+۷By%j[#:ݜkȊqҤvl%N1o&|rĢoC OjĖl)o-oKʩTk-$v$k:\өlziMuNk-;wUi Li̜Yh\ijyC&kDg,KK͉K*m(g v ѦeN$j ƾM嗶hT-4,Rz|(gLm4kH5'#ԦRi)NkE6M=bm|iCH1G'nܩiʣ.kid!t$ ٯ%x
+x&%㙌tdAդ"֤2!(%vksqge.Uyoɨ;mwf8mI7)&#%e*v-9"vG)/},L*x㥀XSf3CWKirbqXU(ڦiԎϒ.ԝbrD}*2CH,"X":ӞmV»)GBRU]rA׊".f**Ziܢ #J1$mۄ7yCڔq&e|F ١ꧧDm)zP(Zr-p9+I ZƤӣm.ql-<`j.PV[FIӤmjhHnDė%!TĘ$Ԅ}氚m#;&gmsZ$ef*NEx䭨Ӥc:)LmPšB_i QrCkS‘EoFfSæU[4f$T2^KrF+՘ar$BRŦMmh1DXmaz"m#w)T1܄ZÁהzeS"XM{X5ŭMcAؚ%[Zӊk%tl5\z'y(e"a[j T]N7車PidԂKe
+Y&^ú6jLf6 \ No newline at end of file
diff --git a/sounds/vm-msginstruct.gsm b/sounds/vm-msginstruct.gsm
new file mode 100755
index 000000000..2d1628e7b
--- /dev/null
+++ b/sounds/vm-msginstruct.gsm
Binary files differ
diff --git a/sounds/vm-msgsaved.gsm b/sounds/vm-msgsaved.gsm
new file mode 100755
index 000000000..e06590102
--- /dev/null
+++ b/sounds/vm-msgsaved.gsm
Binary files differ
diff --git a/sounds/vm-no.gsm b/sounds/vm-no.gsm
new file mode 100755
index 000000000..cb27cf805
--- /dev/null
+++ b/sounds/vm-no.gsm
@@ -0,0 +1 @@
+dB6q4TR ZwUMҤE k\`9)i%,!#kCIt&Yj؅U*»;̡iͥ¨\t % slw&}"dybH^{C%$myz(vs*6ބs̒h|s7ql;l(.̕4Skra0oKV>ohӫvqWe˘oJtM.]cm[؆@kLDEmI6v.7=Y#یӪnܰP4_o ~wvqۭ7 t%zs IOVwnف$0Fr8+i 15}lzyQrH؁ k,nLHH ߗU,f[Pɪin 줪r BKɥ mT}K pn&}'5í襖T=4qnd˺DvWF ȕE*ϩ,n##G-3%a;;piZm5nH0J($Pr8j4][Q\sc!bD/kR*FSS&&("$eĤp,IYs!iM6%X\FM4|Y'=`S!6EZjWl5\mRY)a5fzN%]j)_ՙԮE= +q.K bYAݠ5Uܐ` ԀլzM⒙Zas-8ێx]f|#LI,")4u,$Qr=Ёiȹ,Ѥ dcA5/ZSȠ=[i*e!HڊYJViݬHΫZer"p<،K'#RLi5ҩrYaJ`3c*S/vd$ '*YR֡znKp"@V Ӱp/E \ No newline at end of file
diff --git a/sounds/vm-nomore.gsm b/sounds/vm-nomore.gsm
new file mode 100755
index 000000000..0e89761df
--- /dev/null
+++ b/sounds/vm-nomore.gsm
Binary files differ
diff --git a/sounds/vm-password.gsm b/sounds/vm-password.gsm
new file mode 100755
index 000000000..fe6660bed
--- /dev/null
+++ b/sounds/vm-password.gsm
Binary files differ
diff --git a/sounds/vm-theperson.gsm b/sounds/vm-theperson.gsm
new file mode 100755
index 000000000..3938e0ce7
--- /dev/null
+++ b/sounds/vm-theperson.gsm
Binary files differ
diff --git a/sounds/vm-undeleted.gsm b/sounds/vm-undeleted.gsm
new file mode 100755
index 000000000..e7fa4be02
--- /dev/null
+++ b/sounds/vm-undeleted.gsm
Binary files differ
diff --git a/sounds/vm-youhave.gsm b/sounds/vm-youhave.gsm
new file mode 100755
index 000000000..9c2e38208
--- /dev/null
+++ b/sounds/vm-youhave.gsm
Binary files differ