Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net/asterisk16/Makefile,v retrieving revision 1.126 diff -u -p -r1.126 Makefile --- Makefile 27 Nov 2009 22:27:12 -0000 1.126 +++ Makefile 9 Jan 2010 21:53:02 -0000 @@ -61,12 +61,12 @@ OPTIONS= OGGVORBIS "Enable Ogg Vorbis su .include -#.if ${ARCH} == "i386" || ${ARCH} == "amd64" -#OPTIONS+= ZAPTEL "Enable Zaptel support" off +.if ${ARCH} == "i386" || ${ARCH} == "amd64" +OPTIONS+= DAHDI "Enable DAHDI support" on # Include this since we have altered OPTIONS. -#.include "$(PORTSDIR)/Mk/bsd.port.options.mk" -#.endif +.include "$(PORTSDIR)/Mk/bsd.port.options.mk" +.endif .if !defined(WITH_H323) PLIST_SUB+= WITH_H323="@comment " @@ -78,16 +78,16 @@ LIB_DEPENDS+= pt_r.1:${PORTSDIR}/devel/p h323_r.1:${PORTSDIR}/net/openh323 .endif -.if !defined(WITH_ZAPTEL) -PLIST_SUB+= WITH_ZAPTEL="@comment " -CONFIGURE_ARGS+= --without-zaptel -.else -PLIST_SUB+= WITH_ZAPTEL="" -CONFIGURE_ARGS+= --with-zaptel -BUILD_DEPENDS+= libpri>=1.2.0:${PORTSDIR}/misc/libpri \ - ${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel +.if !defined(WITH_DAHDI) +PLIST_SUB+= WITH_DAHDI="@comment " +CONFIGURE_ARGS+= --without-dahdi +.else +PLIST_SUB+= WITH_DAHDI="" +CONFIGURE_ARGS+= --with-dahdi +BUILD_DEPENDS+= libpri>=1.4.10:${PORTSDIR}/misc/libpri \ + ${LOCALBASE}/include/dahdi/user.h:${PORTSDIR}/misc/dahdi LIB_DEPENDS+= pri.1:${PORTSDIR}/misc/libpri -RUN_DEPENDS+= ${LOCALBASE}/include/zaptel/zaptel.h:${PORTSDIR}/misc/zaptel +RUN_DEPENDS+= ${LOCALBASE}/lib/dahdi/dahdi.ko:${PORTSDIR}/misc/dahdi .endif # Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/net/asterisk16/pkg-plist,v retrieving revision 1.43 diff -u -p -r1.43 pkg-plist --- pkg-plist 27 Nov 2009 22:27:12 -0000 1.43 +++ pkg-plist 3 Jan 2010 11:17:38 -0000 @@ -963,16 +963,17 @@ share/asterisk/static-http/ajamdemo.html share/asterisk/static-http/astman.css share/asterisk/static-http/astman.js share/asterisk/static-http/prototype.js -%%WITH_ZAPTEL%%lib/asterisk/modules/app_flash.so -%%WITH_ZAPTEL%%lib/asterisk/modules/app_meetme.so -%%WITH_ZAPTEL%%lib/asterisk/modules/app_page.so -%%WITH_ZAPTEL%%lib/asterisk/modules/app_dahdibarge.so -%%WITH_ZAPTEL%%lib/asterisk/modules/app_dahdiras.so -%%WITH_ZAPTEL%%lib/asterisk/modules/app_dahdiscan.so +%%WITH_DAHDI%%lib/asterisk/modules/app_flash.so +%%WITH_DAHDI%%lib/asterisk/modules/app_meetme.so +%%WITH_DAHDI%%lib/asterisk/modules/app_page.so +%%WITH_DAHDI%%lib/asterisk/modules/app_dahdibarge.so +%%WITH_DAHDI%%lib/asterisk/modules/app_dahdiras.so +%%WITH_DAHDI%%lib/asterisk/modules/app_dahdiscan.so %%WITH_ODBC%%lib/asterisk/modules/cdr_odbc.so %%WITH_FREETDS%%lib/asterisk/modules/cdr_tds.so %%WITH_H323%%lib/asterisk/modules/chan_h323.so -%%WITH_ZAPTEL%%lib/asterisk/modules/chan_dahdi.so +%%WITH_DAHDI%%lib/asterisk/modules/chan_dahdi.so +%%WITH_DAHDI%%lib/asterisk/modules/codec_dahdi.so %%WITH_ODBC%%lib/asterisk/modules/res_config_odbc.so %%WITH_ODBC%%lib/asterisk/modules/res_odbc.so %%DOCSDIR%%/WARNINGS Index: files/patch-channels-chan_dahdi.c =================================================================== RCS file: files/patch-channels-chan_dahdi.c diff -N files/patch-channels-chan_dahdi.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-channels-chan_dahdi.c 3 Jan 2010 11:17:38 -0000 @@ -0,0 +1,32 @@ +--- channels/chan_dahdi.c.orig 2009-10-22 17:19:21.568250985 +0000 ++++ channels/chan_dahdi.c 2009-10-22 17:26:26.261584076 +0000 +@@ -1997,13 +1997,17 @@ + return; + } + if (p->echocancel.head.tap_length) { ++ struct dahdi_echocanparams *pecp; ++ + if ((p->sig == SIG_BRI) || (p->sig == SIG_BRI_PTMP) || (p->sig == SIG_PRI) || (p->sig == SIG_SS7)) { + x = 1; + res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &x); + if (res) + ast_log(LOG_WARNING, "Unable to enable audio mode on channel %d (%s)\n", p->channel, strerror(errno)); + } +- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &p->echocancel); ++ ++ pecp = &p->echocancel.head; ++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp); + if (res) { + ast_log(LOG_WARNING, "Unable to enable echo cancellation on channel %d (%s)\n", p->channel, strerror(errno)); + } else { +@@ -2037,8 +2041,9 @@ + + if (p->echocanon) { + struct dahdi_echocanparams ecp = { .tap_length = 0 }; ++ struct dahdi_echocanparams *pecp = &ecp; + +- res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp); ++ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp); + + if (res) + ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));