summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
Diffstat (limited to 'comms')
-rw-r--r--comms/asterisk/DESCR10
-rw-r--r--comms/asterisk/Makefile88
-rw-r--r--comms/asterisk/PLIST.FreeBSD3
-rw-r--r--comms/asterisk/PLIST.Linux3
-rw-r--r--comms/asterisk/PLIST.NetBSD3
-rw-r--r--comms/asterisk/PLIST.OpenBSD3
-rw-r--r--comms/asterisk/PLIST.common535
-rw-r--r--comms/asterisk/PLIST.common_end4
-rw-r--r--comms/asterisk/distinfo10
-rw-r--r--comms/asterisk/files/asterisk.sh28
-rw-r--r--comms/asterisk/options.mk22
-rw-r--r--comms/asterisk/patches/patch-aa88
-rw-r--r--comms/asterisk/patches/patch-ab17
-rw-r--r--comms/asterisk/patches/patch-ac28
-rw-r--r--comms/asterisk/patches/patch-ad88
-rw-r--r--comms/asterisk/patches/patch-ae19
16 files changed, 949 insertions, 0 deletions
diff --git a/comms/asterisk/DESCR b/comms/asterisk/DESCR
new file mode 100644
index 00000000000..d399f66f0de
--- /dev/null
+++ b/comms/asterisk/DESCR
@@ -0,0 +1,10 @@
+Asterisk is a complete PBX in software. It provides
+all of the features you would expect from a PBX and more. Asterisk
+does voice over IP in three protocols, and can interoperate with
+almost all standards-based telephony equipment using relatively
+inexpensive hardware.
+
+Asterisk provides Voicemail services with Directory, Call Conferencing,
+Interactive Voice Response, Call Queuing. It has support for
+three-way calling, caller ID services, ADSI, SIP and H.323 (as both
+client and gateway).
diff --git a/comms/asterisk/Makefile b/comms/asterisk/Makefile
new file mode 100644
index 00000000000..cc6a97e4712
--- /dev/null
+++ b/comms/asterisk/Makefile
@@ -0,0 +1,88 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+#
+
+DISTNAME= asterisk-1.0.7
+PKGREVISION= 1
+CATEGORIES= comms net audio
+MASTER_SITES= ftp://ftp.asterisk.org/pub/asterisk/ \
+ ftp://ftp.asterisk.org/pub/asterisk/old-releases/
+
+MAINTAINER= riz@NetBSD.org
+HOMEPAGE= http://www.asterisk.org/
+COMMENT= The Asterisk Software PBX
+
+USE_GNU_TOOLS+= make yacc
+
+MANCOMPRESSED= yes
+
+INSTALL_TARGET= install samples
+
+# Running as non-root will come later
+#ASTERISK_USER?= asterisk
+#ASTERISK_GROUP?= asterisk
+#PKG_GROUPS= ${ASTERISK_GROUP}
+#PKG_USERS= ${ASTERISK_USER}:${ASTERISK_GROUP}::Asterisk\\ user
+
+# Various path settings for Asterisk
+PKG_SYSCONFSUBDIR?= asterisk
+ASTLIBDIR?=${PREFIX}/lib/asterisk
+ASTVARLIBDIR?=${PREFIX}/libdata/asterisk
+ASTETCDIR?=${PKG_SYSCONFDIR}
+ASTSPOOLDIR?=${VARBASE}/spool/asterisk
+ASTLOGDIR?=${VARBASE}/log/asterisk
+ASTHEADERDIR?=${PREFIX}/include/asterisk
+ASTCONFPATH?=${ASTETCDIR}/asterisk.conf
+ASTBINDIR?=${PREFIX}/bin
+ASTSBINDIR?=${PREFIX}/sbin
+ASTVARRUNDIR?=${VARBASE}/run
+ASTMANDIR?=${PREFIX}/man
+ASTEXAMPLEDIR?=${PREFIX}/share/examples/asterisk
+
+# Override default paths in Makefile
+SUBST_CLASSES+= asterisk
+SUBST_STAGE.asterisk= pre-configure
+SUBST_FILES.asterisk= Makefile
+SUBST_SED.asterisk= \
+ -e "s|^\(ASTLIBDIR\)=.*|\1 = ${ASTLIBDIR}|" \
+ -e "s|^\(ASTVARLIBDIR\)=.*|\1 = ${ASTVARLIBDIR}|" \
+ -e "s|^\(ASTETCDIR\)=.*|\1 = ${ASTETCDIR}|" \
+ -e "s|^\(ASTSPOOLDIR\)=.*|\1 = ${ASTSPOOLDIR}|" \
+ -e "s|^\(ASTLOGDIR\)=.*|\1 = ${ASTLOGDIR}|" \
+ -e "s|^\(ASTHEADERDIR\)=.*|\1 = ${ASTHEADERDIR}|" \
+ -e "s|^\(ASTCONFPATH\)=.*|\1 = ${ASTCONFPATH}|" \
+ -e "s|^\(ASTBINDIR\)=.*|\1 = ${ASTBINDIR}|" \
+ -e "s|^\(ASTSBINDIR\)=.*|\1 = ${ASTSBINDIR}|" \
+ -e "s|^\(ASTVARRUNDIR\)=.*|\1 = ${ASTVARRUNDIR}|" \
+ -e "s|^\(ASTMANDIR\)=.*|\1 = ${ASTMANDIR}|" \
+ -e "s|^\(ASTEXAMPLEDIR\)=.*|\1 = ${ASTEXAMPLEDIR}|"
+
+.include "options.mk"
+
+USE_PKGINSTALL= yes
+RCD_SCRIPTS= asterisk
+OWN_DIRS+= ${ASTSPOOLDIR} ${ASTLOGDIR} ${ASTVARRUNDIR}
+OWN_DIRS+= ${ASTLOGDIR}/cdr-csv
+
+CONF_FILES= # empty
+.for _file_ in asterisk.conf extensions.conf
+CONF_FILES+= ${ASTEXAMPLEDIR}/${_file_} ${ASTETCDIR}/${_file_}
+.endfor
+
+# if we put all the files in $CONF_FILES, the message is _way_ too long.
+.for _file_ in adsi.conf adtranvofr.conf agents.conf alarmreceiver.conf \
+ alsa.conf cdr_manager.conf cdr_odbc.conf \
+ cdr_pgsql.conf cdr_tds.conf enum.conf extconfig.conf \
+ features.conf festival.conf iax.conf \
+ iaxprov.conf indications.conf logger.conf manager.conf \
+ meetme.conf mgcp.conf modem.conf modules.conf musiconhold.conf \
+ osp.conf oss.conf phone.conf privacy.conf queues.conf \
+ res_config_odbc.conf res_odbc.conf rpt.conf rtp.conf sip.conf \
+ skinny.conf voicemail.conf vpb.conf zapata.conf asterisk.adsi \
+ telcordia-1.adsi
+SUPPORT_FILES+= ${ASTEXAMPLEDIR}/${_file_} ${ASTETCDIR}/${_file_}
+.endfor
+.undef _file_
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/comms/asterisk/PLIST.FreeBSD b/comms/asterisk/PLIST.FreeBSD
new file mode 100644
index 00000000000..0e0b4273335
--- /dev/null
+++ b/comms/asterisk/PLIST.FreeBSD
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.FreeBSD,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+lib/asterisk/modules/app_intercom.so
+lib/asterisk/modules/chan_oss.so
diff --git a/comms/asterisk/PLIST.Linux b/comms/asterisk/PLIST.Linux
new file mode 100644
index 00000000000..f4d56e0f0c9
--- /dev/null
+++ b/comms/asterisk/PLIST.Linux
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.Linux,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+lib/asterisk/modules/app_intercom.so
+lib/asterisk/modules/chan_oss.so
diff --git a/comms/asterisk/PLIST.NetBSD b/comms/asterisk/PLIST.NetBSD
new file mode 100644
index 00000000000..56212632566
--- /dev/null
+++ b/comms/asterisk/PLIST.NetBSD
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.NetBSD,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+lib/asterisk/modules/app_intercom.so
+lib/asterisk/modules/chan_oss.so
diff --git a/comms/asterisk/PLIST.OpenBSD b/comms/asterisk/PLIST.OpenBSD
new file mode 100644
index 00000000000..5b4c2a934c1
--- /dev/null
+++ b/comms/asterisk/PLIST.OpenBSD
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.OpenBSD,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+lib/asterisk/modules/app_intercom.so
+lib/asterisk/modules/chan_oss.so
diff --git a/comms/asterisk/PLIST.common b/comms/asterisk/PLIST.common
new file mode 100644
index 00000000000..edd8ac0f759
--- /dev/null
+++ b/comms/asterisk/PLIST.common
@@ -0,0 +1,535 @@
+@comment $NetBSD: PLIST.common,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+include/asterisk/acl.h
+include/asterisk/adsi.h
+include/asterisk/aes.h
+include/asterisk/agi.h
+include/asterisk/alaw.h
+include/asterisk/app.h
+include/asterisk/ast_expr.h
+include/asterisk/astdb.h
+include/asterisk/astmm.h
+include/asterisk/astosp.h
+include/asterisk/callerid.h
+include/asterisk/causes.h
+include/asterisk/cdr.h
+include/asterisk/channel.h
+include/asterisk/channel_pvt.h
+include/asterisk/chanvars.h
+include/asterisk/cli.h
+include/asterisk/config.h
+include/asterisk/config_pvt.h
+include/asterisk/crypto.h
+include/asterisk/cvsid.h
+include/asterisk/dlfcn-compat.h
+include/asterisk/dns.h
+include/asterisk/dsp.h
+include/asterisk/enum.h
+include/asterisk/features.h
+include/asterisk/file.h
+include/asterisk/frame.h
+include/asterisk/fskmodem.h
+include/asterisk/image.h
+include/asterisk/indications.h
+include/asterisk/io.h
+include/asterisk/linkedlists.h
+include/asterisk/localtime.h
+include/asterisk/lock.h
+include/asterisk/logger.h
+include/asterisk/manager.h
+include/asterisk/md5.h
+include/asterisk/module.h
+include/asterisk/monitor.h
+include/asterisk/musiconhold.h
+include/asterisk/options.h
+include/asterisk/pbx.h
+include/asterisk/poll-compat.h
+include/asterisk/privacy.h
+include/asterisk/res_odbc.h
+include/asterisk/rtp.h
+include/asterisk/say.h
+include/asterisk/sched.h
+include/asterisk/srv.h
+include/asterisk/tdd.h
+include/asterisk/term.h
+include/asterisk/translate.h
+include/asterisk/ulaw.h
+include/asterisk/utils.h
+include/asterisk/vmodem.h
+lib/asterisk/modules/app_adsiprog.so
+lib/asterisk/modules/app_alarmreceiver.so
+lib/asterisk/modules/app_authenticate.so
+lib/asterisk/modules/app_cdr.so
+lib/asterisk/modules/app_chanisavail.so
+lib/asterisk/modules/app_controlplayback.so
+lib/asterisk/modules/app_cut.so
+lib/asterisk/modules/app_db.so
+lib/asterisk/modules/app_dial.so
+lib/asterisk/modules/app_directory.so
+lib/asterisk/modules/app_disa.so
+lib/asterisk/modules/app_echo.so
+lib/asterisk/modules/app_enumlookup.so
+lib/asterisk/modules/app_eval.so
+lib/asterisk/modules/app_exec.so
+lib/asterisk/modules/app_festival.so
+lib/asterisk/modules/app_forkcdr.so
+lib/asterisk/modules/app_getcpeid.so
+lib/asterisk/modules/app_groupcount.so
+lib/asterisk/modules/app_hasnewvoicemail.so
+lib/asterisk/modules/app_ices.so
+lib/asterisk/modules/app_image.so
+lib/asterisk/modules/app_lookupblacklist.so
+lib/asterisk/modules/app_lookupcidname.so
+lib/asterisk/modules/app_macro.so
+lib/asterisk/modules/app_milliwatt.so
+lib/asterisk/modules/app_mp3.so
+lib/asterisk/modules/app_nbscat.so
+lib/asterisk/modules/app_parkandannounce.so
+lib/asterisk/modules/app_playback.so
+lib/asterisk/modules/app_privacy.so
+lib/asterisk/modules/app_qcall.so
+lib/asterisk/modules/app_queue.so
+lib/asterisk/modules/app_random.so
+lib/asterisk/modules/app_read.so
+lib/asterisk/modules/app_record.so
+lib/asterisk/modules/app_sayunixtime.so
+lib/asterisk/modules/app_senddtmf.so
+lib/asterisk/modules/app_sendtext.so
+lib/asterisk/modules/app_setcallerid.so
+lib/asterisk/modules/app_setcdruserfield.so
+lib/asterisk/modules/app_setcidname.so
+lib/asterisk/modules/app_setcidnum.so
+lib/asterisk/modules/app_sms.so
+lib/asterisk/modules/app_softhangup.so
+lib/asterisk/modules/app_striplsd.so
+lib/asterisk/modules/app_substring.so
+lib/asterisk/modules/app_system.so
+lib/asterisk/modules/app_talkdetect.so
+lib/asterisk/modules/app_test.so
+lib/asterisk/modules/app_transfer.so
+lib/asterisk/modules/app_txtcidname.so
+lib/asterisk/modules/app_url.so
+lib/asterisk/modules/app_userevent.so
+lib/asterisk/modules/app_verbose.so
+lib/asterisk/modules/app_voicemail.so
+lib/asterisk/modules/app_waitforring.so
+lib/asterisk/modules/app_zapateller.so
+lib/asterisk/modules/cdr_csv.so
+lib/asterisk/modules/cdr_manager.so
+lib/asterisk/modules/chan_agent.so
+lib/asterisk/modules/chan_iax2.so
+lib/asterisk/modules/chan_local.so
+lib/asterisk/modules/chan_mgcp.so
+lib/asterisk/modules/chan_modem.so
+lib/asterisk/modules/chan_modem_aopen.so
+lib/asterisk/modules/chan_modem_bestdata.so
+lib/asterisk/modules/chan_modem_i4l.so
+lib/asterisk/modules/chan_sip.so
+lib/asterisk/modules/chan_skinny.so
+lib/asterisk/modules/codec_a_mu.so
+lib/asterisk/modules/codec_adpcm.so
+lib/asterisk/modules/codec_alaw.so
+lib/asterisk/modules/codec_g726.so
+lib/asterisk/modules/codec_gsm.so
+lib/asterisk/modules/codec_ilbc.so
+lib/asterisk/modules/codec_lpc10.so
+lib/asterisk/modules/codec_ulaw.so
+lib/asterisk/modules/format_g726.so
+lib/asterisk/modules/format_g729.so
+lib/asterisk/modules/format_gsm.so
+lib/asterisk/modules/format_h263.so
+lib/asterisk/modules/format_ilbc.so
+lib/asterisk/modules/format_jpeg.so
+lib/asterisk/modules/format_pcm.so
+lib/asterisk/modules/format_pcm_alaw.so
+lib/asterisk/modules/format_sln.so
+lib/asterisk/modules/format_vox.so
+lib/asterisk/modules/format_wav.so
+lib/asterisk/modules/format_wav_gsm.so
+lib/asterisk/modules/pbx_config.so
+lib/asterisk/modules/pbx_spool.so
+lib/asterisk/modules/pbx_wilcalu.so
+lib/asterisk/modules/res_adsi.so
+lib/asterisk/modules/res_agi.so
+lib/asterisk/modules/res_crypto.so
+lib/asterisk/modules/res_features.so
+lib/asterisk/modules/res_indications.so
+lib/asterisk/modules/res_monitor.so
+lib/asterisk/modules/res_musiconhold.so
+${GTK}lib/asterisk/modules/pbx_gtkconsole.so
+${ZAPTEL}lib/asterisk/modules/app_flash.so
+${ZAPTEL}lib/asterisk/modules/app_meetme.so
+${ZAPTEL}lib/asterisk/modules/app_zapbarge.so
+${ZAPTEL}lib/asterisk/modules/app_zapras.so
+${ZAPTEL}lib/asterisk/modules/app_zapscan.so
+${ZAPTEL}lib/asterisk/modules/chan_zap.so
+libdata/asterisk/agi-bin/agi-test.agi
+libdata/asterisk/agi-bin/eagi-sphinx-test
+libdata/asterisk/agi-bin/eagi-test
+libdata/asterisk/firmware/iax/iaxy.bin
+libdata/asterisk/images/asterisk-intro.jpg
+libdata/asterisk/keys/freeworlddialup.pub
+libdata/asterisk/keys/iaxtel.pub
+libdata/asterisk/mohmp3/fpm-calm-river.mp3
+libdata/asterisk/mohmp3/fpm-sunshine.mp3
+libdata/asterisk/mohmp3/fpm-world-mix.mp3
+libdata/asterisk/sounds/agent-alreadyon.gsm
+libdata/asterisk/sounds/agent-incorrect.gsm
+libdata/asterisk/sounds/agent-loggedoff.gsm
+libdata/asterisk/sounds/agent-loginok.gsm
+libdata/asterisk/sounds/agent-newlocation.gsm
+libdata/asterisk/sounds/agent-pass.gsm
+libdata/asterisk/sounds/agent-user.gsm
+libdata/asterisk/sounds/auth-incorrect.gsm
+libdata/asterisk/sounds/auth-thankyou.gsm
+libdata/asterisk/sounds/beep.gsm
+libdata/asterisk/sounds/conf-adminmenu.gsm
+libdata/asterisk/sounds/conf-enteringno.gsm
+libdata/asterisk/sounds/conf-errormenu.gsm
+libdata/asterisk/sounds/conf-getchannel.gsm
+libdata/asterisk/sounds/conf-getconfno.gsm
+libdata/asterisk/sounds/conf-getpin.gsm
+libdata/asterisk/sounds/conf-invalid.gsm
+libdata/asterisk/sounds/conf-invalidpin.gsm
+libdata/asterisk/sounds/conf-kicked.gsm
+libdata/asterisk/sounds/conf-locked.gsm
+libdata/asterisk/sounds/conf-lockednow.gsm
+libdata/asterisk/sounds/conf-muted.gsm
+libdata/asterisk/sounds/conf-noempty.gsm
+libdata/asterisk/sounds/conf-onlyperson.gsm
+libdata/asterisk/sounds/conf-unlockednow.gsm
+libdata/asterisk/sounds/conf-unmuted.gsm
+libdata/asterisk/sounds/conf-usermenu.gsm
+libdata/asterisk/sounds/demo-abouttotry.gsm
+libdata/asterisk/sounds/demo-congrats.gsm
+libdata/asterisk/sounds/demo-echodone.gsm
+libdata/asterisk/sounds/demo-echotest.gsm
+libdata/asterisk/sounds/demo-enterkeywords.gsm
+libdata/asterisk/sounds/demo-instruct.gsm
+libdata/asterisk/sounds/demo-moreinfo.gsm
+libdata/asterisk/sounds/demo-nogo.gsm
+libdata/asterisk/sounds/demo-nomatch.gsm
+libdata/asterisk/sounds/demo-thanks.gsm
+libdata/asterisk/sounds/digits/0.gsm
+libdata/asterisk/sounds/digits/1.gsm
+libdata/asterisk/sounds/digits/10.gsm
+libdata/asterisk/sounds/digits/11.gsm
+libdata/asterisk/sounds/digits/12.gsm
+libdata/asterisk/sounds/digits/13.gsm
+libdata/asterisk/sounds/digits/14.gsm
+libdata/asterisk/sounds/digits/15.gsm
+libdata/asterisk/sounds/digits/16.gsm
+libdata/asterisk/sounds/digits/17.gsm
+libdata/asterisk/sounds/digits/18.gsm
+libdata/asterisk/sounds/digits/19.gsm
+libdata/asterisk/sounds/digits/2.gsm
+libdata/asterisk/sounds/digits/20.gsm
+libdata/asterisk/sounds/digits/3.gsm
+libdata/asterisk/sounds/digits/30.gsm
+libdata/asterisk/sounds/digits/4.gsm
+libdata/asterisk/sounds/digits/40.gsm
+libdata/asterisk/sounds/digits/5.gsm
+libdata/asterisk/sounds/digits/50.gsm
+libdata/asterisk/sounds/digits/6.gsm
+libdata/asterisk/sounds/digits/60.gsm
+libdata/asterisk/sounds/digits/7.gsm
+libdata/asterisk/sounds/digits/70.gsm
+libdata/asterisk/sounds/digits/8.gsm
+libdata/asterisk/sounds/digits/80.gsm
+libdata/asterisk/sounds/digits/9.gsm
+libdata/asterisk/sounds/digits/90.gsm
+libdata/asterisk/sounds/digits/a-m.gsm
+libdata/asterisk/sounds/digits/at.gsm
+libdata/asterisk/sounds/digits/day-0.gsm
+libdata/asterisk/sounds/digits/day-1.gsm
+libdata/asterisk/sounds/digits/day-2.gsm
+libdata/asterisk/sounds/digits/day-3.gsm
+libdata/asterisk/sounds/digits/day-4.gsm
+libdata/asterisk/sounds/digits/day-5.gsm
+libdata/asterisk/sounds/digits/day-6.gsm
+libdata/asterisk/sounds/digits/dollars.gsm
+libdata/asterisk/sounds/digits/h-1.gsm
+libdata/asterisk/sounds/digits/h-10.gsm
+libdata/asterisk/sounds/digits/h-11.gsm
+libdata/asterisk/sounds/digits/h-12.gsm
+libdata/asterisk/sounds/digits/h-13.gsm
+libdata/asterisk/sounds/digits/h-14.gsm
+libdata/asterisk/sounds/digits/h-15.gsm
+libdata/asterisk/sounds/digits/h-16.gsm
+libdata/asterisk/sounds/digits/h-17.gsm
+libdata/asterisk/sounds/digits/h-18.gsm
+libdata/asterisk/sounds/digits/h-19.gsm
+libdata/asterisk/sounds/digits/h-2.gsm
+libdata/asterisk/sounds/digits/h-20.gsm
+libdata/asterisk/sounds/digits/h-3.gsm
+libdata/asterisk/sounds/digits/h-30.gsm
+libdata/asterisk/sounds/digits/h-4.gsm
+libdata/asterisk/sounds/digits/h-5.gsm
+libdata/asterisk/sounds/digits/h-6.gsm
+libdata/asterisk/sounds/digits/h-7.gsm
+libdata/asterisk/sounds/digits/h-8.gsm
+libdata/asterisk/sounds/digits/h-9.gsm
+libdata/asterisk/sounds/digits/hundred.gsm
+libdata/asterisk/sounds/digits/million.gsm
+libdata/asterisk/sounds/digits/mon-0.gsm
+libdata/asterisk/sounds/digits/mon-1.gsm
+libdata/asterisk/sounds/digits/mon-10.gsm
+libdata/asterisk/sounds/digits/mon-11.gsm
+libdata/asterisk/sounds/digits/mon-2.gsm
+libdata/asterisk/sounds/digits/mon-3.gsm
+libdata/asterisk/sounds/digits/mon-4.gsm
+libdata/asterisk/sounds/digits/mon-5.gsm
+libdata/asterisk/sounds/digits/mon-6.gsm
+libdata/asterisk/sounds/digits/mon-7.gsm
+libdata/asterisk/sounds/digits/mon-8.gsm
+libdata/asterisk/sounds/digits/mon-9.gsm
+libdata/asterisk/sounds/digits/oclock.gsm
+libdata/asterisk/sounds/digits/oh.gsm
+libdata/asterisk/sounds/digits/p-m.gsm
+libdata/asterisk/sounds/digits/pound.gsm
+libdata/asterisk/sounds/digits/star.gsm
+libdata/asterisk/sounds/digits/thousand.gsm
+libdata/asterisk/sounds/digits/today.gsm
+libdata/asterisk/sounds/digits/tomorrow.gsm
+libdata/asterisk/sounds/digits/yesterday.gsm
+libdata/asterisk/sounds/dir-instr.gsm
+libdata/asterisk/sounds/dir-intro-fn.gsm
+libdata/asterisk/sounds/dir-intro.gsm
+libdata/asterisk/sounds/dir-nomatch.gsm
+libdata/asterisk/sounds/dir-nomore.gsm
+libdata/asterisk/sounds/invalid.gsm
+libdata/asterisk/sounds/letters/a.gsm
+libdata/asterisk/sounds/letters/at.gsm
+libdata/asterisk/sounds/letters/b.gsm
+libdata/asterisk/sounds/letters/c.gsm
+libdata/asterisk/sounds/letters/d.gsm
+libdata/asterisk/sounds/letters/dash.gsm
+libdata/asterisk/sounds/letters/dollar.gsm
+libdata/asterisk/sounds/letters/dot.gsm
+libdata/asterisk/sounds/letters/e.gsm
+libdata/asterisk/sounds/letters/equals.gsm
+libdata/asterisk/sounds/letters/exclaimation-point.gsm
+libdata/asterisk/sounds/letters/f.gsm
+libdata/asterisk/sounds/letters/g.gsm
+libdata/asterisk/sounds/letters/h.gsm
+libdata/asterisk/sounds/letters/i.gsm
+libdata/asterisk/sounds/letters/j.gsm
+libdata/asterisk/sounds/letters/k.gsm
+libdata/asterisk/sounds/letters/l.gsm
+libdata/asterisk/sounds/letters/m.gsm
+libdata/asterisk/sounds/letters/n.gsm
+libdata/asterisk/sounds/letters/o.gsm
+libdata/asterisk/sounds/letters/p.gsm
+libdata/asterisk/sounds/letters/plus.gsm
+libdata/asterisk/sounds/letters/q.gsm
+libdata/asterisk/sounds/letters/r.gsm
+libdata/asterisk/sounds/letters/s.gsm
+libdata/asterisk/sounds/letters/slash.gsm
+libdata/asterisk/sounds/letters/space.gsm
+libdata/asterisk/sounds/letters/t.gsm
+libdata/asterisk/sounds/letters/u.gsm
+libdata/asterisk/sounds/letters/v.gsm
+libdata/asterisk/sounds/letters/w.gsm
+libdata/asterisk/sounds/letters/x.gsm
+libdata/asterisk/sounds/letters/y.gsm
+libdata/asterisk/sounds/letters/z.gsm
+libdata/asterisk/sounds/letters/zed.gsm
+libdata/asterisk/sounds/pbx-invalid.gsm
+libdata/asterisk/sounds/pbx-invalidpark.gsm
+libdata/asterisk/sounds/pbx-transfer.gsm
+libdata/asterisk/sounds/phonetic/9_p.gsm
+libdata/asterisk/sounds/phonetic/a_p.gsm
+libdata/asterisk/sounds/phonetic/b_p.gsm
+libdata/asterisk/sounds/phonetic/c_p.gsm
+libdata/asterisk/sounds/phonetic/d_p.gsm
+libdata/asterisk/sounds/phonetic/e_p.gsm
+libdata/asterisk/sounds/phonetic/f_p.gsm
+libdata/asterisk/sounds/phonetic/g_p.gsm
+libdata/asterisk/sounds/phonetic/h_p.gsm
+libdata/asterisk/sounds/phonetic/i_p.gsm
+libdata/asterisk/sounds/phonetic/j_p.gsm
+libdata/asterisk/sounds/phonetic/k_p.gsm
+libdata/asterisk/sounds/phonetic/l_p.gsm
+libdata/asterisk/sounds/phonetic/m_p.gsm
+libdata/asterisk/sounds/phonetic/n_p.gsm
+libdata/asterisk/sounds/phonetic/o_p.gsm
+libdata/asterisk/sounds/phonetic/p_p.gsm
+libdata/asterisk/sounds/phonetic/q_p.gsm
+libdata/asterisk/sounds/phonetic/r_p.gsm
+libdata/asterisk/sounds/phonetic/s_p.gsm
+libdata/asterisk/sounds/phonetic/t_p.gsm
+libdata/asterisk/sounds/phonetic/u_p.gsm
+libdata/asterisk/sounds/phonetic/v_p.gsm
+libdata/asterisk/sounds/phonetic/w_p.gsm
+libdata/asterisk/sounds/phonetic/x_p.gsm
+libdata/asterisk/sounds/phonetic/y_p.gsm
+libdata/asterisk/sounds/phonetic/z_p.gsm
+libdata/asterisk/sounds/privacy-incorrect.gsm
+libdata/asterisk/sounds/privacy-prompt.gsm
+libdata/asterisk/sounds/privacy-thankyou.gsm
+libdata/asterisk/sounds/privacy-unident.gsm
+libdata/asterisk/sounds/queue-callswaiting.gsm
+libdata/asterisk/sounds/queue-holdtime.gsm
+libdata/asterisk/sounds/queue-less-than.gsm
+libdata/asterisk/sounds/queue-minutes.gsm
+libdata/asterisk/sounds/queue-seconds.gsm
+libdata/asterisk/sounds/queue-thankyou.gsm
+libdata/asterisk/sounds/queue-thereare.gsm
+libdata/asterisk/sounds/queue-youarenext.gsm
+libdata/asterisk/sounds/ss-noservice.gsm
+libdata/asterisk/sounds/transfer.gsm
+libdata/asterisk/sounds/tt-allbusy.gsm
+libdata/asterisk/sounds/tt-monkeys.gsm
+libdata/asterisk/sounds/tt-monkeysintro.gsm
+libdata/asterisk/sounds/tt-somethingwrong.gsm
+libdata/asterisk/sounds/tt-weasels.gsm
+libdata/asterisk/sounds/vm
+libdata/asterisk/sounds/vm-Cust1.gsm
+libdata/asterisk/sounds/vm-Cust2.gsm
+libdata/asterisk/sounds/vm-Cust3.gsm
+libdata/asterisk/sounds/vm-Cust4.gsm
+libdata/asterisk/sounds/vm-Cust5.gsm
+libdata/asterisk/sounds/vm-Family.gsm
+libdata/asterisk/sounds/vm-Friends.gsm
+libdata/asterisk/sounds/vm-INBOX.gsm
+libdata/asterisk/sounds/vm-Old.gsm
+libdata/asterisk/sounds/vm-Work.gsm
+libdata/asterisk/sounds/vm-advopts.gsm
+libdata/asterisk/sounds/vm-and.gsm
+libdata/asterisk/sounds/vm-calldiffnum.gsm
+libdata/asterisk/sounds/vm-changeto.gsm
+libdata/asterisk/sounds/vm-delete.gsm
+libdata/asterisk/sounds/vm-deleted.gsm
+libdata/asterisk/sounds/vm-dialout.gsm
+libdata/asterisk/sounds/vm-enter-num-to-call.gsm
+libdata/asterisk/sounds/vm-extension.gsm
+libdata/asterisk/sounds/vm-first.gsm
+libdata/asterisk/sounds/vm-for.gsm
+libdata/asterisk/sounds/vm-forwardoptions.gsm
+libdata/asterisk/sounds/vm-from-extension.gsm
+libdata/asterisk/sounds/vm-from-phonenumber.gsm
+libdata/asterisk/sounds/vm-from.gsm
+libdata/asterisk/sounds/vm-goodbye.gsm
+libdata/asterisk/sounds/vm-helpexit.gsm
+libdata/asterisk/sounds/vm-incorrect-mailbox.gsm
+libdata/asterisk/sounds/vm-incorrect.gsm
+libdata/asterisk/sounds/vm-instructions.gsm
+libdata/asterisk/sounds/vm-intro.gsm
+libdata/asterisk/sounds/vm-isonphone.gsm
+libdata/asterisk/sounds/vm-isunavail.gsm
+libdata/asterisk/sounds/vm-last.gsm
+libdata/asterisk/sounds/vm-leavemsg.gsm
+libdata/asterisk/sounds/vm-login.gsm
+libdata/asterisk/sounds/vm-mailboxfull.gsm
+libdata/asterisk/sounds/vm-message.gsm
+libdata/asterisk/sounds/vm-messages.gsm
+libdata/asterisk/sounds/vm-mismatch.gsm
+libdata/asterisk/sounds/vm-msginstruct.gsm
+libdata/asterisk/sounds/vm-msgsaved.gsm
+libdata/asterisk/sounds/vm-newpassword.gsm
+libdata/asterisk/sounds/vm-next.gsm
+libdata/asterisk/sounds/vm-no.gsm
+libdata/asterisk/sounds/vm-nobodyavail.gsm
+libdata/asterisk/sounds/vm-nobox.gsm
+libdata/asterisk/sounds/vm-nomore.gsm
+libdata/asterisk/sounds/vm-nonumber.gsm
+libdata/asterisk/sounds/vm-num-i-have.gsm
+libdata/asterisk/sounds/vm-onefor.gsm
+libdata/asterisk/sounds/vm-options.gsm
+libdata/asterisk/sounds/vm-opts.gsm
+libdata/asterisk/sounds/vm-passchanged.gsm
+libdata/asterisk/sounds/vm-password.gsm
+libdata/asterisk/sounds/vm-press.gsm
+libdata/asterisk/sounds/vm-prev.gsm
+libdata/asterisk/sounds/vm-reachoper.gsm
+libdata/asterisk/sounds/vm-rec-busy.gsm
+libdata/asterisk/sounds/vm-rec-name.gsm
+libdata/asterisk/sounds/vm-rec-unv.gsm
+libdata/asterisk/sounds/vm-received.gsm
+libdata/asterisk/sounds/vm-reenterpassword.gsm
+libdata/asterisk/sounds/vm-repeat.gsm
+libdata/asterisk/sounds/vm-review.gsm
+libdata/asterisk/sounds/vm-saved.gsm
+libdata/asterisk/sounds/vm-savedto.gsm
+libdata/asterisk/sounds/vm-savefolder.gsm
+libdata/asterisk/sounds/vm-savemessage.gsm
+libdata/asterisk/sounds/vm-saveoper.gsm
+libdata/asterisk/sounds/vm-sorry.gsm
+libdata/asterisk/sounds/vm-star-cancel.gsm
+libdata/asterisk/sounds/vm-starmain.gsm
+libdata/asterisk/sounds/vm-then-pound.gsm
+libdata/asterisk/sounds/vm-theperson.gsm
+libdata/asterisk/sounds/vm-tocallback.gsm
+libdata/asterisk/sounds/vm-tocallnum.gsm
+libdata/asterisk/sounds/vm-tocancel.gsm
+libdata/asterisk/sounds/vm-tocancelmsg.gsm
+libdata/asterisk/sounds/vm-toenternumber.gsm
+libdata/asterisk/sounds/vm-toforward.gsm
+libdata/asterisk/sounds/vm-tohearenv.gsm
+libdata/asterisk/sounds/vm-tomakecall.gsm
+libdata/asterisk/sounds/vm-tooshort.gsm
+libdata/asterisk/sounds/vm-toreply.gsm
+libdata/asterisk/sounds/vm-torerecord.gsm
+libdata/asterisk/sounds/vm-undelete.gsm
+libdata/asterisk/sounds/vm-undeleted.gsm
+libdata/asterisk/sounds/vm-unknown-caller.gsm
+libdata/asterisk/sounds/vm-whichbox.gsm
+libdata/asterisk/sounds/vm-youhave.gsm
+libdata/asterisk/sounds/voicemail
+man/man8/asterisk.8
+sbin/asterisk
+sbin/astgenkey
+sbin/safe_asterisk
+share/examples/asterisk/adsi.conf
+share/examples/asterisk/adtranvofr.conf
+share/examples/asterisk/agents.conf
+share/examples/asterisk/alarmreceiver.conf
+share/examples/asterisk/alsa.conf
+share/examples/asterisk/asterisk.adsi
+share/examples/asterisk/asterisk.conf
+share/examples/asterisk/cdr_manager.conf
+share/examples/asterisk/cdr_odbc.conf
+share/examples/asterisk/cdr_pgsql.conf
+share/examples/asterisk/cdr_tds.conf
+share/examples/asterisk/enum.conf
+share/examples/asterisk/extconfig.conf
+share/examples/asterisk/extensions.conf
+share/examples/asterisk/features.conf
+share/examples/asterisk/festival.conf
+share/examples/asterisk/iax.conf
+share/examples/asterisk/iaxprov.conf
+share/examples/asterisk/indications.conf
+share/examples/asterisk/logger.conf
+share/examples/asterisk/manager.conf
+share/examples/asterisk/meetme.conf
+share/examples/asterisk/mgcp.conf
+share/examples/asterisk/modem.conf
+share/examples/asterisk/modules.conf
+share/examples/asterisk/musiconhold.conf
+share/examples/asterisk/osp.conf
+share/examples/asterisk/oss.conf
+share/examples/asterisk/phone.conf
+share/examples/asterisk/privacy.conf
+share/examples/asterisk/queues.conf
+share/examples/asterisk/res_config_odbc.conf
+share/examples/asterisk/res_odbc.conf
+share/examples/asterisk/rpt.conf
+share/examples/asterisk/rtp.conf
+share/examples/asterisk/sip.conf
+share/examples/asterisk/skinny.conf
+share/examples/asterisk/telcordia-1.adsi
+share/examples/asterisk/voicemail.conf
+share/examples/asterisk/vpb.conf
+share/examples/asterisk/zapata.conf
+@dirrm share/examples/asterisk
+@dirrm libdata/asterisk/sounds/phonetic
+@dirrm libdata/asterisk/sounds/letters
+@dirrm libdata/asterisk/sounds/digits
+@dirrm libdata/asterisk/sounds
+@dirrm libdata/asterisk/mohmp3
+@dirrm libdata/asterisk/keys
+@dirrm libdata/asterisk/images
+@dirrm libdata/asterisk/firmware/iax
+@dirrm libdata/asterisk/firmware
+@dirrm libdata/asterisk/agi-bin
+@dirrm libdata/asterisk
+@dirrm include/asterisk
diff --git a/comms/asterisk/PLIST.common_end b/comms/asterisk/PLIST.common_end
new file mode 100644
index 00000000000..63a7ceed76d
--- /dev/null
+++ b/comms/asterisk/PLIST.common_end
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST.common_end,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+@dirrm lib/asterisk/modules
+@dirrm lib/asterisk
+@dirrm include/asterisk
diff --git a/comms/asterisk/distinfo b/comms/asterisk/distinfo
new file mode 100644
index 00000000000..d61678edc76
--- /dev/null
+++ b/comms/asterisk/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+
+SHA1 (asterisk-1.0.7.tar.gz) = 7e91d6771901c34f6bbd8e0bbc3ca15173654c87
+RMD160 (asterisk-1.0.7.tar.gz) = bb738f0e3d100314fa7497c9ee81f8a022e536bb
+Size (asterisk-1.0.7.tar.gz) = 9591705 bytes
+SHA1 (patch-aa) = 98e7f9775381c2786b9ee50dff1cdc70a4cd2c0d
+SHA1 (patch-ab) = 435a76cd7bad98b0809fa47b5b79530767027aa9
+SHA1 (patch-ac) = e6aad8435be3c616112afec59b968c29721d98e3
+SHA1 (patch-ad) = c19da2acb25c8fe68882d222d4f5dcb1be75cf63
+SHA1 (patch-ae) = 9069d535ac150b1715694e45658540624d512583
diff --git a/comms/asterisk/files/asterisk.sh b/comms/asterisk/files/asterisk.sh
new file mode 100644
index 00000000000..2868810eb7e
--- /dev/null
+++ b/comms/asterisk/files/asterisk.sh
@@ -0,0 +1,28 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: asterisk.sh,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+#
+# PROVIDE: asterisk
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# You will need to set some variables in /etc/rc.conf to start Asterisk:
+#
+# asterisk=YES
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="asterisk"
+rcvar=$name
+command="@PREFIX@/sbin/asterisk"
+required_files="@PKG_SYSCONFDIR@/asterisk.conf"
+
+#start_cmd="asterisk_doit start"
+#stop_cmd="asterisk_doit stop"
+#restart_cmd="asterisk_doit restart"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/comms/asterisk/options.mk b/comms/asterisk/options.mk
new file mode 100644
index 00000000000..68e7c2731bb
--- /dev/null
+++ b/comms/asterisk/options.mk
@@ -0,0 +1,22 @@
+# $NetBSD: options.mk,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.asterisk
+PKG_SUPPORTED_OPTIONS= zaptel gtk
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mzaptel)
+# zaptel only supported under NetBSD at the moment
+. include "../../comms/zaptel-netbsd/buildlink3.mk"
+MAKE_FLAGS+= ASTERISK_USE_ZAPTEL=1
+PLIST_SUBST+= ZAPTEL=
+.else
+PLIST_SUBST+= ZAPTEL="@comment "
+.endif
+
+.if !empty(PKG_OPTIONS:Mgtk)
+. include "../../x11/gtk/buildlink3.mk"
+MAKE_FLAGS+= ASTERISK_USE_GTK=1
+PLIST_SUBST+= GTK=
+.else
+PLIST_SUBST+= GTK="@comment "
+.endif
diff --git a/comms/asterisk/patches/patch-aa b/comms/asterisk/patches/patch-aa
new file mode 100644
index 00000000000..57ad514d3f3
--- /dev/null
+++ b/comms/asterisk/patches/patch-aa
@@ -0,0 +1,88 @@
+$NetBSD: patch-aa,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+--- Makefile.orig 2005-03-10 00:15:05.000000000 -0800
++++ Makefile 2005-03-30 13:22:17.000000000 -0800
+@@ -122,6 +122,7 @@
+ ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
+ ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
+ ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
++ASTEXAMPLEDIR=${PREFIX}/share/examples/asterisk
+
+ MODULES_DIR=$(ASTLIBDIR)/modules
+ AGI_DIR=$(ASTVARLIBDIR)/agi-bin
+@@ -148,7 +149,7 @@
+
+ ifeq (${OSARCH},NetBSD)
+ CFLAGS+=-pthread
+-INCLUDE+=-I/usr/local/include -I/usr/pkg/include
++INCLUDE+=-I${PREFIX}/include
+ MPG123TARG=netbsd
+ endif
+
+@@ -159,8 +160,11 @@
+ #Uncomment this to use the older DSP routines
+ #CFLAGS+=-DOLD_DSP_ROUTINES
+
+-CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
+-CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
++#CFLAGS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
++#CFLAGS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "-DZAPTEL_OPTIMIZATIONS"; fi)
++ifdef ASTERISK_USE_ZAPTEL
++CFLAGS+=-DZAPTEL_OPTIMIZATIONS
++endif
+
+ LIBEDIT=editline/libedit.a
+
+@@ -200,7 +204,7 @@
+ LIBS+=-lcrypto
+ endif
+ ifeq (${OSARCH},NetBSD)
+-LIBS+=-lpthread -lcrypto -lm -L/usr/local/lib -L/usr/pkg/lib -lncurses
++LIBS+=-lpthread -lcrypto -lm -L${PREFIX}/lib -R${PREFIX}/lib -lncurses
+ endif
+ ifeq (${OSARCH},OpenBSD)
+ LIBS=-lcrypto -lpthread -lm -lncurses
+@@ -448,29 +452,29 @@
+ upgrade: all bininstall
+
+ adsi: all
+- mkdir -p $(DESTDIR)$(ASTETCDIR)
++ mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
+ for x in configs/*.adsi; do \
+- if ! [ -f $(DESTDIR)$(ASTETCDIRX)/$$x ]; then \
+- install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x` ; \
++ if ! [ -f $(DESTDIR)$(ASTEXAMPLEDIR)/$$x ]; then \
++ install -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x` ; \
+ fi ; \
+ done
+
+ samples: all datafiles adsi
+- mkdir -p $(DESTDIR)$(ASTETCDIR)
++ mkdir -p $(DESTDIR)$(ASTEXAMPLEDIR)
+ for x in configs/*.sample; do \
+- if [ -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ]; then \
+- mv -f $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample`.old ; \
++ if [ -f $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` ]; then \
++ mv -f $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample`.old ; \
+ fi ; \
+- install -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`basename $$x .sample` ;\
++ install -m 644 $$x $(DESTDIR)$(ASTEXAMPLEDIR)/`basename $$x .sample` ;\
+ done
+- echo "[directories]" > $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
+- echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTETCDIR)/asterisk.conf
++ echo "[directories]" > $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astetcdir => $(ASTETCDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astmoddir => $(MODULES_DIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astvarlibdir => $(ASTVARLIBDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astagidir => $(AGI_DIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astspooldir => $(ASTSPOOLDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astrundir => $(ASTVARRUNDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
++ echo "astlogdir => $(ASTLOGDIR)" >> $(DESTDIR)$(ASTEXAMPLEDIR)/asterisk.conf
+ for x in sounds/demo-*; do \
+ if grep -q "^%`basename $$x`%" sounds.txt; then \
+ install -m 644 $$x $(DESTDIR)$(ASTVARLIBDIR)/sounds ; \
diff --git a/comms/asterisk/patches/patch-ab b/comms/asterisk/patches/patch-ab
new file mode 100644
index 00000000000..5632b27258c
--- /dev/null
+++ b/comms/asterisk/patches/patch-ab
@@ -0,0 +1,17 @@
+$NetBSD: patch-ab,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+--- pbx/Makefile.orig 2003-10-26 10:50:49.000000000 -0800
++++ pbx/Makefile 2005-03-30 14:08:41.000000000 -0800
+@@ -16,9 +16,12 @@
+ PBX_LIBS=pbx_config.so pbx_wilcalu.so pbx_spool.so # pbx_gtkconsole.so pbx_kdeconsole.so
+
+ # Add GTK console if appropriate
+-PBX_LIBS+=$(shell gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so")
++#PBX_LIBS+=$(shell gtk-config --cflags >/dev/null 2>/dev/null && echo "pbx_gtkconsole.so")
+ # Add KDE Console if appropriate
+ #PBX_LIBS+=$(shell [ "$$QTDIR" != "" ] && echo "pbx_kdeconsole.so")
++ifdef ASTERISK_USE_GTK
++PBX_LIBS+=pbx_gtkconsole.so
++endif
+
+
+ GTK_FLAGS=`gtk-config --cflags gthread`
diff --git a/comms/asterisk/patches/patch-ac b/comms/asterisk/patches/patch-ac
new file mode 100644
index 00000000000..f946d432c10
--- /dev/null
+++ b/comms/asterisk/patches/patch-ac
@@ -0,0 +1,28 @@
+$NetBSD: patch-ac,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+--- res/Makefile.orig 2004-07-17 13:58:01.000000000 -0700
++++ res/Makefile 2005-03-30 12:48:37.000000000 -0800
+@@ -13,15 +13,18 @@
+
+ MODS=res_adsi.so res_features.so res_crypto.so res_musiconhold.so res_indications.so res_monitor.so \
+ res_agi.so
+-MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+-MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
+-MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
++#MODS+=$(shell if [ -f "/usr/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
++#MODS+=$(shell if [ -f "/usr/local/include/odbcinst.h" ]; then echo "res_odbc.so res_config_odbc.so"; fi)
++#MODS+=$(shell if [ -f "/usr/include/osp/osp.h" ]; then echo "res_osp.so"; fi)
+
+ CRYPTO_LIBS=-lssl -lcrypto
+
+-CFLAGS+=
+-CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo " -DZAPATA_MOH")
+-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo " -DZAPATA_MOH")
++#CFLAGS+=
++#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo " -DZAPATA_MOH")
++#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo " -DZAPATA_MOH")
++ifdef ASTERISK_USE_ZAPTEL
++CFLAGS+=-DZAPATA_MOH
++endif
+ #
+ # Work around buggy RedHat 9.0
+ #
diff --git a/comms/asterisk/patches/patch-ad b/comms/asterisk/patches/patch-ad
new file mode 100644
index 00000000000..dc6be8986fd
--- /dev/null
+++ b/comms/asterisk/patches/patch-ad
@@ -0,0 +1,88 @@
+$NetBSD: patch-ad,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+--- channels/Makefile.orig 2004-08-31 09:33:00.000000000 -0700
++++ channels/Makefile 2005-03-30 12:32:50.000000000 -0800
+@@ -38,11 +38,11 @@
+ #CHANNEL_LIBS+=chan_vofr
+
+ ifeq (${OSARCH},OpenBSD)
+-MYSQLLIB=-L/usr/local/lib/mysql -lmysqlclient
+-CFLAGS+=-I/usr/local/include
++MYSQLLIB=-L${PREFIX}/lib/mysql -lmysqlclient
++CFLAGS+=-I${PREFIX}/include
+ PTLIB=-lpt_OpenBSD_x86_r
+ H323LIB=-lh323_OpenBSD_x86_r
+-CHANH323LIB=-L/usr/local/lib
++CHANH323LIB=-L${PREFIX}/lib
+ endif
+ ifeq (${OSARCH},Linux)
+ MYSQLLIB=-L/usr/lib/mysql -lmysqlclient
+@@ -60,33 +60,36 @@
+ PTLIB=-lpt_FreeBSD_x86_r
+ H323LIB=-lh323_FreeBSD_x86_r
+ CHANH323LIB=-pthread
+-SOLINK+=-L/usr/local/lib
++SOLINK+=-L${PREFIX}/lib -R${PREFIX}/lib
+ endif
+ ifeq (${OSARCH},NetBSD)
+ PTLIB=-lpt_NetBSD_x86_r
+ H323LIB=-lh323_NetBSD_x86_r
+-SOLINK+=-L/usr/local/lib
++SOLINK+=-L${PREFIX}/lib -R${PREFIX}/lib
+ endif
+ ifneq (${OSARCH},Darwin)
+ CHANNEL_LIBS+=chan_oss.so
+ endif
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
+-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/ixjuser.h ] && echo chan_phone.so)
+-CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/ixjuser.h ] && echo chan_phone.so)
++CHANNEL_LIBS+=$(shell [ -f ${PREFIX}/include/ixjuser.h ] && echo chan_phone.so)
++#CHANNEL_LIBS+=$(shell [ -f h323/libchanh323.a ] && echo chan_h323.so)
+
+ CFLAGS+=-Wno-missing-prototypes -Wno-missing-declarations
+-CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
+-CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
+-CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
+-CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
+-ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
+-ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
+-CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
+-CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
+-CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
++#CFLAGS+=$(shell [ ! -f /usr/include/linux/if_wanpipe.h ] && echo " -DOLD_SANGOMA_API")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/alsa/asoundlib.h ] && echo "chan_alsa.so")
++#CFLAGS+=$(shell [ -f /usr/lib/libpri.so.1 ] && echo " -DZAPATA_PRI")
++#CFLAGS+=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo " -DZAPATA_R2")
++#CFLAGS+=$(shell [ -f alsa-monitor.h ] && echo " -DALSA_MONITOR")
++#ZAPPRI=$(shell [ -f /usr/lib/libpri.so.1 ] && echo "-lpri")
++#ZAPR2=$(shell [ -f /usr/lib/libmfcr2.so.1 ] && echo "-lmfcr2")
++#CFLAGS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "-DIAX_TRUNKING")
++#CFLAGS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "-DIAX_TRUNKING")
++ifdef ASTERISK_USE_ZAPTEL
++CFLAGS+= -DIAX_TRUNKING
++endif
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/vpbapi.h ] && echo "chan_vpb.so" )
++#CFLAGS+=$(shell [ -f /usr/include/vpbapi.h ] && echo " -DLINUX")
+
+ ALSA_SRC=chan_alsa.c
+ ALSA_SRC+=$(shell [ -f alsa-monitor.h ] && echo "alsa-monitor.h")
+@@ -106,10 +109,13 @@
+
+ ZAPDIR=/usr/lib
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
+-CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/linux/zaptel.h ] && echo "chan_zap.so")
++#CHANNEL_LIBS+=$(shell [ -f /usr/local/include/zaptel.h ] && echo "chan_zap.so")
++ifdef ASTERISK_USE_ZAPTEL
++CHANNEL_LIBS+=chan_zap.so
++endif
+
+-CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
++#CHANNEL_LIBS+=$(shell [ -f /usr/include/nbs.h ] && echo "chan_nbs.so" )
+
+ ifndef OPENH323DIR
+ OPENH323DIR=$(HOME)/openh323
diff --git a/comms/asterisk/patches/patch-ae b/comms/asterisk/patches/patch-ae
new file mode 100644
index 00000000000..cc3a3c9701c
--- /dev/null
+++ b/comms/asterisk/patches/patch-ae
@@ -0,0 +1,19 @@
+$NetBSD: patch-ae,v 1.1.1.1 2005/04/08 03:10:52 riz Exp $
+--- apps/Makefile.orig 2005-03-30 12:40:19.000000000 -0800
++++ apps/Makefile 2005-03-30 12:41:21.000000000 -0800
+@@ -39,9 +39,12 @@
+ #APPS+=app_sql_odbc.so
+ #APPS+=app_rpt.so
+
+-APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+-APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
+-APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
++#APPS+=$(shell if [ -f /usr/include/linux/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
++#APPS+=$(shell if [ -f /usr/local/include/zaptel.h ]; then echo "app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so" ; fi)
++#APPS+=$(shell if [ -f /usr/include/osp/osp.h ]; then echo "app_osplookup.so" ; fi)
++ifdef ASTERISK_USE_ZAPTEL
++APPS+= app_zapras.so app_meetme.so app_flash.so app_zapbarge.so app_zapscan.so
++endif
+
+ CFLAGS+=-fPIC
+