diff -urN asterisk.orig/Makefile asterisk/Makefile
--- asterisk.orig/Makefile	Sat Feb 19 09:55:08 2005
+++ asterisk/Makefile	Sat Feb 19 09:55:25 2005
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	asterisk
-PORTVERSION=	1.0.3
-PORTREVISION=	1
+PORTVERSION=	1.0.5
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.asterisk.org/pub/telephony/asterisk/ \
 		ftp://ftp.asterisk.org/pub/telephony/asterisk/old-releases/
diff -urN asterisk.orig/distinfo asterisk/distinfo
--- asterisk.orig/distinfo	Sat Feb 19 09:55:08 2005
+++ asterisk/distinfo	Sat Feb 19 09:57:04 2005
@@ -1,2 +1,2 @@
-MD5 (asterisk-1.0.3.tar.gz) = 20a77d71efb670eb395314d52218fc7c
-SIZE (asterisk-1.0.3.tar.gz) = 9564612
+MD5 (asterisk-1.0.5.tar.gz) = efabd43ac70ada3bdc97a57027c670a3
+SIZE (asterisk-1.0.5.tar.gz) = 9586778
diff -urN asterisk.orig/files/patch-Makefile asterisk/files/patch-Makefile
--- asterisk.orig/files/patch-Makefile	Sat Feb 19 09:55:08 2005
+++ asterisk/files/patch-Makefile	Sat Feb 19 16:21:35 2005
@@ -1,9 +1,6 @@
-
-$FreeBSD: ports/net/asterisk/files/patch-Makefile,v 1.6 2004/12/13 13:35:02 sobomax Exp $
-
---- Makefile.orig
-+++ Makefile
-@@ -44,6 +44,15 @@
+--- Makefile.orig	Fri Jan 21 06:18:35 2005
++++ Makefile	Sat Feb 19 16:20:18 2005
+@@ -45,6 +45,15 @@
  PROC=$(shell uname -m)
  endif
  
@@ -19,7 +16,7 @@
  # Pentium Pro Optimize
  #PROC=i686
  
-@@ -62,10 +71,10 @@
+@@ -63,10 +72,10 @@
  #K6OPT  = -DK6OPT
  
  #Tell gcc to optimize the asterisk's code
@@ -32,7 +29,7 @@
  
  # If you are running a radio application, define RADIO_RELAX so that the DTMF
  # will be received more reliably
-@@ -90,7 +99,7 @@
+@@ -91,7 +100,7 @@
  
  # Where to install asterisk after compiling
  # Default -> leave empty
@@ -41,7 +38,7 @@
  
  # Staging directory
  # Files are copied here temporarily during the install process
-@@ -110,23 +119,23 @@
+@@ -111,23 +120,23 @@
  # Don't use together with -DBUSYDETECT_TONEONLY
  BUSYDETECT+= #-DBUSYDETECT_COMPARE_TONE_AND_SILENCE
  
@@ -75,7 +72,7 @@
  CFLAGS+=$(OPTIMIZE)
  
  ifneq ($(PROC),ultrasparc)
-@@ -137,11 +146,8 @@
+@@ -138,11 +147,8 @@
  CFLAGS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "-DOSP_SUPPORT -I/usr/include/osp" ; fi)
  
  ifeq (${OSARCH},FreeBSD)
@@ -86,10 +83,10 @@
 -CFLAGS+=$(shell if [ -d /usr/local/include/spandsp ]; then echo "-I/usr/local/include/spandsp"; fi)
 +CFLAGS+=$(PTHREAD_CFLAGS)
 +LIBS+=$(PTHREAD_LIBS)
+ MPG123TARG=freebsd
  endif # FreeBSD
  
- ifeq (${OSARCH},NetBSD)
-@@ -157,7 +163,10 @@
+@@ -160,7 +166,10 @@
  #CFLAGS+=-DOLD_DSP_ROUTINES
  
  CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
@@ -101,7 +98,7 @@
  
  LIBEDIT=editline/libedit.a
  
-@@ -219,7 +228,7 @@
+@@ -222,7 +231,7 @@
  SOLINK=-shared -Xlinker -x
  endif
  
@@ -110,7 +107,7 @@
  INSTALL=install
  
  _all: all
-@@ -231,7 +240,7 @@
+@@ -234,7 +243,7 @@
  	@echo " +               $(MAKE) install                +"  
  	@echo " +-------------------------------------------+"  
  
@@ -119,7 +116,7 @@
  
  editline/config.h:
  	cd editline && unset CFLAGS LIBS && ./configure ; \
-@@ -240,13 +249,13 @@
+@@ -243,13 +252,13 @@
  	cd editline && unset CFLAGS LIBS && test -f config.h || ./configure
  	$(MAKE) -C editline libedit.a
  
@@ -140,7 +137,7 @@
  
  ifneq ($(wildcard .depend),)
  include .depend
-@@ -268,13 +277,10 @@
+@@ -271,13 +280,10 @@
  
  asterisk.o: asterisk.c build.h
  
@@ -157,7 +154,7 @@
  
  ifneq ($(strip $(ASTERISKVERSION)),)
  build.h: .version
-@@ -292,8 +298,8 @@
+@@ -295,8 +301,8 @@
  		exit 1; \
  	fi
  
@@ -168,7 +165,7 @@
  
  muted: muted.o
  	$(CC) -o muted muted.o
-@@ -312,28 +318,28 @@
+@@ -315,28 +321,28 @@
  	$(MAKE) -C stdtime clean
  
  datafiles: all
@@ -203,7 +200,7 @@
  		else \
  			echo "No description for $$x"; \
  			exit 1; \
-@@ -341,18 +347,18 @@
+@@ -344,18 +350,18 @@
  	done
  	for x in sounds/vm-* sounds/transfer* sounds/pbx-* sounds/ss-* sounds/beep* sounds/dir-* sounds/conf-* sounds/agent-* sounds/invalid* sounds/tt-* sounds/auth-* sounds/privacy-* sounds/queue-*; do \
  		if grep -q "^%`basename $$x`%" sounds.txt; then \
@@ -227,7 +224,7 @@
  
  update: 
  	@if [ -d CVS ]; then \
-@@ -364,111 +370,86 @@
+@@ -367,111 +373,94 @@
  	fi
  
  bininstall: all
@@ -261,13 +258,14 @@
 +	$(MKDIR) $(DESTDIR)$(ASTHEADERDIR)
 +	$(BSD_INSTALL_DATA) include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
  	rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
--	rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
--	if [ ! -h $(DESTDIR)$(ASTSPOOLDIR)/vm ] && [ -d $(DESTDIR)$(ASTSPOOLDIR)/vm ]; then \
--		mv $(DESTDIR)$(ASTSPOOLDIR)/vm $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
--	else \
+ 	rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
+ 	if [ ! -h $(DESTDIR)$(ASTSPOOLDIR)/vm ] && [ -d $(DESTDIR)$(ASTSPOOLDIR)/vm ]; then \
+ 		mv $(DESTDIR)$(ASTSPOOLDIR)/vm $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
+ 	else \
 -		mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
--		rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
--	fi
++		$(MKDIR) $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
+ 		rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
+ 	fi
 -	ln -s $(ASTSPOOLDIR)/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
 -	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
 -	mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
@@ -287,7 +285,7 @@
 +	$(MKDIR) $(DESTDIR)$(ASTMANDIR)/man8
 +	$(BSD_INSTALL_DATA) keys/iaxtel.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
 +	$(BSD_INSTALL_DATA) keys/freeworlddialup.pub $(DESTDIR)$(ASTVARLIBDIR)/keys
-+	$(BSD_INSTALL_DATA) asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
++	$(BSD_INSTALL_DATA) asterisk.8.gz $(DESTDIR)$(ASTMANDIR)/man8
  	if [ -d contrib/firmware/iax ]; then \
 -		install -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
 +		$(BSD_INSTALL_DATA) contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTVARLIBDIR)/firmware/iax/iaxy.bin; \
@@ -296,7 +294,7 @@
  	fi 
 -	( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/vm . )
 -	( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/voicemail . )
--	if [ -f mpg123-0.59r/mpg123 ]; then make -C mpg123-0.59r install; fi
+-	if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
 -	@echo " +---- Asterisk Installation Complete -------+"  
 -	@echo " +                                           +"
 -	@echo " +    YOU MUST READ THE SECURITY DOCUMENT    +"
@@ -320,6 +318,7 @@
 -	@echo " +-------------------------------------------+"
 +	( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -sf $(ASTSPOOLDIR)/vm . )
 +	( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -sf $(ASTSPOOLDIR)/voicemail . )
++	#if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
  
 -install: all datafiles bininstall
 +install: all datafiles bininstall samples
@@ -388,7 +387,7 @@
  	:> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm
  	for x in vm-theperson digits/1 digits/2 digits/3 digits/4 vm-isunavail; do \
  		cat $(DESTDIR)$(ASTVARLIBDIR)/sounds/$$x.gsm >> $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/unavail.gsm ; \
-@@ -483,7 +464,7 @@
+@@ -486,7 +475,7 @@
  	@[ -d $(DESTDIR)$(HTTPDIR)/html ] || ( echo "No http directory" && exit 1 )
  	@[ -d $(DESTDIR)$(HTTPDIR)/cgi-bin ] || ( echo "No cgi-bin directory" && exit 1 )
  	install -m 4755 -o root -g root contrib/scripts/vmail.cgi $(DESTDIR)$(HTTPDIR)/cgi-bin/vmail.cgi
@@ -397,7 +396,7 @@
  	for x in images/*.gif; do \
  		install -m 644 $$x $(DESTDIR)$(HTTPDIR)/html/_asterisk/; \
  	done
-@@ -503,10 +484,10 @@
+@@ -506,10 +495,10 @@
  
  __rpm: _version
  	rm -rf /tmp/asterisk ; \
diff -urN asterisk.orig/files/patch-codecs::Makefile asterisk/files/patch-codecs::Makefile
--- asterisk.orig/files/patch-codecs::Makefile	Sat Feb 19 09:55:08 2005
+++ asterisk/files/patch-codecs::Makefile	Sat Feb 19 16:12:48 2005
@@ -1,15 +1,12 @@
-
-$FreeBSD: ports/net/asterisk/files/patch-codecs::Makefile,v 1.5 2004/10/17 18:00:02 sobomax Exp $
-
---- codecs/Makefile.orig	Mon Jul 19 18:52:57 2004
-+++ codecs/Makefile	Sun Oct 10 15:28:35 2004
-@@ -17,23 +17,23 @@
+--- codecs/Makefile.orig	Thu Jan 13 05:22:07 2005
++++ codecs/Makefile	Sat Feb 19 10:27:07 2005
+@@ -17,24 +17,24 @@
  # g723.1b)
  #
  #MODG723=codec_g723_1.so codec_g723_1b.so
 -MODG723=$(shell [ -f g723.1/coder.c ] && echo "codec_g723_1.so")
 -MODG723+=$(shell [ -f g723.1b/coder2.c ] && echo "codec_g723_1b.so")
--MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] && echo "codec_speex.so")
+-MODSPEEX=$(shell [ -f /usr/include/speex.h ] || [ -f /usr/local/include/speex.h ] || [ -f /usr/local/include/speex/speex.h ] && echo "codec_speex.so")
 -MODILBC=$(shell [ -f ilbc/iLBC_decode.h ] && echo "codec_ilbc.so")
 +MODG723=codec_g723_1_dummy.so
 +MODG729=codec_g729_dummy.so
@@ -17,7 +14,9 @@
 +MODILBC=codec_ilbc.so
  CFLAGS+=-fPIC
 -CFLAGS+=$(shell [ -f /usr/local/include/speex.h ] && echo "-I/usr/local/include")
+-CFLAGS+=$(shell [ -f /usr/local/include/speex/speex.h ] && echo "-I/usr/local/include/speex")
 +CFLAGS+=-I$(LOCALBASE)/include
++CFLAGS+=-I$(LOCALBASE)/include/speex
  
  LIBG723=g723.1/libg723.a
  LIBG723B=g723.1b/libg723b.a
@@ -34,7 +33,7 @@
          codec_adpcm.so codec_ulaw.so codec_alaw.so codec_a_mu.so \
  	codec_g726.so
  
-@@ -91,7 +91,7 @@
+@@ -92,7 +92,7 @@
  endif
  
  install: all
