diff --git a/Makefile b/Makefile
index 75f2423b88f8a9acd2287214becdd98a9aa2f83d..123447ac2472acbc4d189e8f6156dc9aa7b4e7dc 100755
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,8 @@ DEBUG=-g #-pg
 INCLUDE=-Iinclude -I../include
 CFLAGS=-pipe -Wall -Werror -Wmissing-prototypes -Wmissing-declarations -O6 $(DEBUG) $(INCLUDE) -D_REENTRANT
 CFLAGS+=$(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi)
-CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
 SUBDIRS=channels pbx apps codecs formats
-LIBS=-ldl -lpthread -lreadline #-lefence
+LIBS=-ldl -lpthread -lreadline # -lefence
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o translate.o file.o say.o pbx.o cli.o md5.o asterisk.o
 CC=gcc
 INSTALL=install
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 939587ff77b970b6722a50be723f0e9773307381..0106d6168f8147f0bd33f3697670603fb82dd873 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -329,7 +329,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 	}
 	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, 10000, "#")) {
 			ast_log(LOG_WARNING, "Couldn't read username\n");
 			goto out;
 		}			
@@ -343,7 +343,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 			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, 10000, "#")) {
 			ast_log(LOG_WARNING, "Unable to read password\n");
 			goto out;
 		}
diff --git a/channels/Makefile b/channels/Makefile
index 411ce353d4bbef6834f1da411f237c455701997e..c7d29c66c6f0e9df6056dd97438522bd4f5edc5c 100755
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -17,6 +17,7 @@ CHANNEL_LIBS=chan_vofr.so chan_modem.so \
 CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
 
 CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
 
 CFLAGS+=#-DVOFRDUMPER
 
@@ -28,6 +29,13 @@ clean:
 %.so : %.o
 	$(CC) -shared -Xlinker -x -o $@ $<
 
+#libiax.a: libiax.o
+#	rm -f libiax.a
+#	$(AR) cr libiax.a libiax.o
+
+#chan_iax.so: chan_iax.o libiax.a
+#	$(CC) -shared -Xlinker -x -o $@ $< -L. -liax
+
 #chan_modem.so : chan_modem.o
 #	$(CC) -rdynamic -shared -Xlinker -x -o $@ $<
 
diff --git a/pbx.c b/pbx.c
index 99d09eae9137f58f83d8a71c62decf472ea5aafb..c84784beb697e43b03610bfb97e0cac851407e09 100755
--- a/pbx.c
+++ b/pbx.c
@@ -471,8 +471,11 @@ static void *pbx_thread(void *data)
 				digit = ast_waitstream(c, AST_DIGIT_ANY);
 				ast_stopstream(c);
 				/* Hang up if something goes wrong */
-				if (digit < 0)
+				if (digit < 0) {
+					if (option_verbose > 2)
+						ast_verbose(VERBOSE_PREFIX_3 "Lost connection on %s\n", c->name);
 					goto out;
+				}
 				else if (digit) {
 					exten[pos++] = digit;
 					break;
@@ -487,7 +490,7 @@ static void *pbx_thread(void *data)
 		else
 			waittime = c->pbx->rtimeout;
 		while(!ast_exists_extension(c, c->context, exten, 1) && 
-		      ast_canmatch_extension(c, c->context, exten, 1)) {
+		       ast_canmatch_extension(c, c->context, exten, 1)) {
 			/* As long as we're willing to wait, and as long as it's not defined, 
 			   keep reading digits until we can't possibly get a right answer anymore.  */
 			digit = ast_waitfordigit(c, waittime * 1000);