summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2010-06-07 12:45:28 +0000
committerTony Vroon <chainsaw@gentoo.org>2010-06-07 12:45:28 +0000
commit1e597064ed670a34e907f958f3119b1dbffe6e3d (patch)
treecec7bac9e5b0be98f74efc50f49633cc102c5a17 /net-misc
parentRemove old (diff)
downloadhistorical-1e597064ed670a34e907f958f3119b1dbffe6e3d.tar.gz
historical-1e597064ed670a34e907f958f3119b1dbffe6e3d.tar.bz2
historical-1e597064ed670a34e907f958f3119b1dbffe6e3d.zip
Version bump on the 1.6.1 branch. Please note that this branch is now in security maintenance mode only. Do upgrade to 1.6.2 where possible.
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/ChangeLog9
-rw-r--r--net-misc/asterisk/Manifest11
-rw-r--r--net-misc/asterisk/asterisk-1.6.1.20.ebuild319
-rw-r--r--net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch21
4 files changed, 355 insertions, 5 deletions
diff --git a/net-misc/asterisk/ChangeLog b/net-misc/asterisk/ChangeLog
index 86e832d068fc..ff928228ce10 100644
--- a/net-misc/asterisk/ChangeLog
+++ b/net-misc/asterisk/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/asterisk
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.258 2010/06/07 11:02:06 chainsaw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.259 2010/06/07 12:45:28 chainsaw Exp $
+
+*asterisk-1.6.1.20 (07 Jun 2010)
+
+ 07 Jun 2010; <chainsaw@gentoo.org> +asterisk-1.6.1.20.ebuild,
+ +files/1.6.1/asterisk-1.6.1.20-inband-progress.patch:
+ Version bump on the 1.6.1 branch. please note that this branch is now in
+ security maintenance mode only. Do upgrade to 1.6.2 where possible.
*asterisk-1.6.2.8 (07 Jun 2010)
diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
index 80853ef3fa51..2d87c6dbe950 100644
--- a/net-misc/asterisk/Manifest
+++ b/net-misc/asterisk/Manifest
@@ -20,6 +20,7 @@ AUX 1.6.1/asterisk-1.6.1.12-parallel-make-v2.patch 6871 RMD160 3ad7f4d4131e59c37
AUX 1.6.1/asterisk-1.6.1.14-graceful-restart-segfault.patch 2731 RMD160 ac56df1f3112064b1ae2865b280985b33335ace9 SHA1 0898dc30a2a52cebfd9c3c7ae2b5a0fa5b741e87 SHA256 a062bf624b12745e5eb71799d71cdd33fb5c9262be4d50d3d015ff82e5c75050
AUX 1.6.1/asterisk-1.6.1.14-parallel-make.patch 846 RMD160 bd38bc83d2ae39ee21ba84fbd495b87d40e05bfd SHA1 19b27ec8b0591469094c000c8739895cf68a82f1 SHA256 e3f0d870a835bb253762b8100b8f12cd381f9fd988a24c45f580b108da60c62a
AUX 1.6.1/asterisk-1.6.1.19-gsm-pic.patch 2257 RMD160 54fb0a813ebb882da2778f60db281af4e63c46fc SHA1 6f6cfce3896b18f37790c5100ea61fa914c44eb5 SHA256 5f01521c76d3d4b1d83b661037a8ef0715b7ad8979b6f35a35c101264a358ea7
+AUX 1.6.1/asterisk-1.6.1.20-inband-progress.patch 553 RMD160 ca015c6c02bb009640e2635d759f3435d242487c SHA1 23d2653a0a528191ef986ec84a4f28299d439e26 SHA256 151753e46d235cd3247934059544ff6bdc3b609a38e1c3705584481d3c9e1c0e
AUX 1.6.1/asterisk-1.6.1.6-bt-line-test.patch 1743 RMD160 38eca46597dbcfa234cbddbcb336f4bc814162da SHA1 6db9c9214f8ad18f50ae0f25c67ee4425f0d4734 SHA256 45d1a6e5af9fbdb9f499354eb56f0a8a3cb4bc4e34e41d6ef288c0ac03059b88
AUX 1.6.1/asterisk-1.6.1.6-fxsks-hookstate.patch 1074 RMD160 eaefb4ff9bb3f022c1d3ec0e2ef3dc3fd0b604b9 SHA1 6c4f233ddd4efd0471796b83813ba6e4aed15cdc SHA256 8c777f4e5e6a5dfcacb4534cf8c4f7cd81e4bedb16811abfbfcf96289cf6eb68
AUX 1.6.1/asterisk-1.6.1.6-lua-includes.patch 527 RMD160 975a19f9c1094f08a23de21ba05517ba1ba4039e SHA1 b799ca44054e6dc5397d7904709f85350db019a6 SHA256 67aea66105c054fe0eefb8117ef9fc81f612c1b6d26dbd21764a84c9a4c4ef4a
@@ -44,6 +45,7 @@ DIST asterisk-1.2.37.tar.gz 29899629 RMD160 1de7ff96d3b1fd8d89f3ef7b3bb9e35bedcc
DIST asterisk-1.2.40.tar.gz 29903514 RMD160 dc3da60756c82c98a055e49b068eb6760a01948e SHA1 4b4b794e858a3436bc35bdd2f4edf824c2885b68 SHA256 61dc745b12f6dc2998404e77747a964db56df8efae84a666c4ccddf016c9c06d
DIST asterisk-1.6.1.18.tar.gz 23585542 RMD160 ca6647cce5a176526ba1cb9dcb0e1e227986b268 SHA1 99871bc2257185437c22b7f0e44a09c356ffe027 SHA256 f3dab39190c7c938099e8961eb9917d5cf15570180dc0e613e7bb2562a621e5b
DIST asterisk-1.6.1.19.tar.gz 23600478 RMD160 df5ba06911f76cc54646c516c65c5e4ec4692f3d SHA1 a97f8f37b768fef88bc73ee066a0743978672a87 SHA256 a0a3f0c0d6eed2f7ca40474d67ea1ec40a0146f086966b369911ae8a9884646f
+DIST asterisk-1.6.1.20.tar.gz 23601410 RMD160 ccb504292e9d5e93d79456ede212b1697e3c213e SHA1 7d92f9de5ed6de10e34c8e6039f91b45884e46f8 SHA256 12b4a1290569d03fd53c8794ceba7b8cf7b385731d33695018bb5fe26370391b
DIST asterisk-1.6.2.6.tar.gz 23265995 RMD160 35c724b968a00abdc5bbb07e63ec9004872cdef8 SHA1 93c25c30fbe2003955362d9ce173367ecc6e5b49 SHA256 2c724a53c40d12fc37100c1daa8312fd99eee26920907e3094c7c2b7d0e7eb61
DIST asterisk-1.6.2.7.tar.gz 23283195 RMD160 d3298a22679c93e565e9f8f371d4abb158a0ee73 SHA1 da14520b918ae7ab5a8b47d8f3a4e7fd95f66ab3 SHA256 217f5fecd2a032c39f401ccdeb8fcdc31a94b44a504d1c567807a527bfacf117
DIST asterisk-1.6.2.8.tar.gz 23565401 RMD160 4d49c0e664ca89b4178857022be48f3d07bd503a SHA1 7dd7823f0698ff509509fe6e29e8d9bdb9e85570 SHA256 115418e02b77335e9c1dd439852d7373d37150b587eadfca2cefc8b2b1c9d76d
@@ -51,15 +53,16 @@ EBUILD asterisk-1.2.37.ebuild 10640 RMD160 82f1d14082b607402146bd8f7950ea32ee255
EBUILD asterisk-1.2.40.ebuild 10647 RMD160 7b267ebc801d87ad4a1433454cf64b36227647b4 SHA1 949f14d1e7fce52b8a09af12aa5283aafe479450 SHA256 2d96cf3daddf083c3094780a97e6699869e7ad9fc8c82f1a4fb17cee520b96c6
EBUILD asterisk-1.6.1.18.ebuild 10481 RMD160 67b58c7c3cef4861bb0e1b9664b77a35e28a9fb4 SHA1 12c06fec5595d4d14783ec47dce166c4a97d385f SHA256 80b633d3361a2cb00b3dd2849d15f41f8e9fd5c0c5ebaa579745ffff3ed9fb52
EBUILD asterisk-1.6.1.19.ebuild 8266 RMD160 e41e7238bd6c98b88715a97d024fb80def54f996 SHA1 11dbe9bb8d3c90aa6abd78d6c614418d3c360d20 SHA256 89d529c87a11e75ebebcf0ea33bd353d14695574ceffc1e63ebd7d3caf17a612
+EBUILD asterisk-1.6.1.20.ebuild 8324 RMD160 4742624496c1c3a4b95fadeaa4abb9649e4e93fa SHA1 e0f2a891f0131184dd40d726afd58197f61a48e8 SHA256 9edf936563559bdbdc31efc969c13f20aab81f45c6f83707c8c2b094545558f8
EBUILD asterisk-1.6.2.6.ebuild 9213 RMD160 e2b7a225465c40aa6918c49ec70cbeace348c0cf SHA1 05779eb142f09aad35f246a3f5476ad06bf5d4fe SHA256 e7f7581cfc7fe4bd1093f2372e3689a96d7db1b82d6a9d0c44a769e4a1a62cdf
EBUILD asterisk-1.6.2.7.ebuild 8533 RMD160 a492f050c1d83b2c73ba14a8ec66802235523e6f SHA1 548eb8beb4036524dbdbce912165546d6df41dd4 SHA256 bedc535776fd541fe8a18293db2e0177fb6fac91bfa578624ae5c96bfafa44c5
EBUILD asterisk-1.6.2.8.ebuild 8628 RMD160 56cf994eae4979544210a2fe98b9ebdc36c030a1 SHA1 c84ccbd54bb45df44277b90d60c3f3561265d581 SHA256 ea92d0ed7889c9bfa7eb7845bf5a0eddc8c08801db34c6c0de8406b955319b40
-MISC ChangeLog 58146 RMD160 4ad2652972463ee3eab2653ca6974657e5676315 SHA1 acaa6a2e5a4f46bc89e37c03eceeca0db77a9087 SHA256 7365aebe90f163f8e8b59c9dfb853006aef94683f410f00136d844f09946db42
+MISC ChangeLog 58446 RMD160 2de5d27320b7d39fa8849ac50e0e443f993ece8b SHA1 7fbfbdc62756c6d5ec975fcf4ec767c8ac5a14a5 SHA256 600942b07cc2fb113576097c94d27763cd46c7d8d8db7f64cd399df16d0816ab
MISC metadata.xml 1194 RMD160 eb5bd4c2f4ca0a72b9c8240ca8b418b571a9fbc6 SHA1 9879daac2d99f61402611c074189d40e7b7686eb SHA256 5cc63816f6f4cbb85c45ceee1621eab11fc2f2b40be963af0c7d834dcbb7959d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
-iEYEARECAAYFAkwM0bgACgkQp5vW4rUFj5r2VACdEnzwt/dcFjsO+zAaTDkjdDHK
-+zMAniePB9bHw1/KkzQdoglqFsrpPmQs
-=Ln/8
+iEYEARECAAYFAkwM6fEACgkQp5vW4rUFj5reUACgvtC91gLbau7VJCZOfpXrzCVn
+4vEAoMH9RtbGh/4bg7esDks+pa+AH/9Y
+=ALm7
-----END PGP SIGNATURE-----
diff --git a/net-misc/asterisk/asterisk-1.6.1.20.ebuild b/net-misc/asterisk/asterisk-1.6.1.20.ebuild
new file mode 100644
index 000000000000..381420a4c80d
--- /dev/null
+++ b/net-misc/asterisk/asterisk-1.6.1.20.ebuild
@@ -0,0 +1,319 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.20.ebuild,v 1.1 2010/06/07 12:45:28 chainsaw Exp $
+
+EAPI=3
+inherit autotools base eutils linux-info
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Asterisk: A Modular Open Source PBX System"
+HOMEPAGE="http://www.asterisk.org/"
+SRC_URI="http://downloads.digium.com/pub/telephony/asterisk/releases/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt +samples oss postgres radius snmp span speex ssl sqlite static vorbis"
+
+RDEPEND="sys-libs/ncurses
+ dev-libs/popt
+ sys-libs/zlib
+ alsa? ( media-libs/alsa-lib )
+ caps? ( sys-libs/libcap )
+ curl? ( net-misc/curl )
+ dahdi? ( >=net-libs/libpri-1.4.7
+ net-misc/dahdi-tools )
+ freetds? ( dev-db/freetds )
+ iconv? ( virtual/libiconv )
+ jabber? ( dev-libs/iksemel )
+ ldap? ( net-nds/openldap )
+ misdn? ( net-dialup/misdnuser )
+ newt? ( dev-libs/newt )
+ postgres? ( virtual/postgresql-base )
+ radius? ( net-dialup/radiusclient-ng )
+ snmp? ( net-analyzer/net-snmp )
+ span? ( media-libs/spandsp )
+ speex? ( media-libs/speex )
+ sqlite? ( dev-db/sqlite )
+ ssl? ( dev-libs/openssl )
+ vorbis? ( media-libs/libvorbis )"
+
+DEPEND="${RDEPEND}
+ !<net-misc/asterisk-addons-1.6
+ !net-misc/asterisk-chan_unistim
+ !net-misc/zaptel"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/1.6.1/${PN}-1.6.1-var_rundir.patch"
+ "${FILESDIR}/1.6.1/${PN}-1.6.1.19-gsm-pic.patch"
+ "${FILESDIR}/1.6.1/${PN}-1.6.1-uclibc.patch"
+ "${FILESDIR}/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch"
+ "${FILESDIR}/1.6.1/${P}-inband-progress.patch"
+ "${FILESDIR}/1.6.2/${PN}-1.6.2.2-nv-faxdetect.patch"
+)
+
+get_available_modules() {
+ local modules mod x
+
+ # build list of available modules...
+ for x in app cdr codec format func pbx res; do
+
+ for mod in $(find "${S}" -type f -name "${x}_*.c*" -print)
+ do
+ modules="${modules} $(basename ${mod/%.c*})"
+ done
+ done
+
+ echo "${modules}"
+}
+
+pkg_setup() {
+ if [[ -n "${ASTERISK_MODULES}" ]] ; then
+ ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage."
+ fi
+ CONFIG_CHECK="~!NF_CONNTRACK_SIP"
+ local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is a module written for a single SIP client talking to a
+ remote server. It is not able to track multiple remote SIP clients registering with
+ a local server. Critical SIP packets may be dropped."
+ check_extra_config
+
+ # parse modules list
+ if [[ -n "${ASTERISK_MODULES}" ]]; then
+ local x modules="$(get_available_modules)"
+
+ einfo "Custom list of modules specified, checking..."
+
+ use debug && {
+ einfo "Available modules: ${modules}"
+ einfo " Selected modules: ${ASTERISK_MODULES}"
+ }
+
+ for x in ${ASTERISK_MODULES}; do
+ if [[ "${x}" = "-*" ]]; then
+ MODULES_LIST=""
+ else
+ if has ${x} ${modules}
+ then
+ MODULES_LIST="${MODULES_LIST} ${x}"
+ else
+ eerror "Unknown module: ${x}"
+ fi
+ fi
+ done
+
+ export MODULES_LIST
+ fi
+}
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR=autoconf eautoreconf
+}
+
+src_configure() {
+ econf \
+ --libdir="/usr/$(get_libdir)" \
+ --localstatedir="/var" \
+ --with-gsm=internal \
+ --with-popt \
+ --with-z \
+ $(use_with alsa asound) \
+ $(use_with caps cap) \
+ $(use_with curl) \
+ $(use_with dahdi pri) \
+ $(use_with dahdi tonezone) \
+ $(use_with dahdi) \
+ $(use_with freetds tds) \
+ $(use_with iconv) \
+ $(use_with jabber iksemel) \
+ $(use_with misdn isdnnet) \
+ $(use_with misdn suppserv) \
+ $(use_with misdn) \
+ $(use_with newt) \
+ $(use_with oss) \
+ $(use_with postgres) \
+ $(use_with radius) \
+ $(use_with snmp netsnmp) \
+ $(use_with span spandsp) \
+ $(use_with speex) \
+ $(use_with speex speexdsp) \
+ $(use_with sqlite sqlite3) \
+ $(use_with ssl crypto) \
+ $(use_with ssl) \
+ $(use_with vorbis ogg) \
+ $(use_with vorbis) || die "econf failed"
+
+ #
+ # custom module filter
+ # run menuselect to evaluate the list of modules
+ # and rewrite the list afterwards
+ #
+ if [[ -n "${MODULES_LIST}" ]]
+ then
+ local mod category tmp_list failed_list
+
+ ###
+ # run menuselect
+
+ emake menuselect.makeopts || die "emake menuselect.makeopts failed"
+
+ ###
+ # get list of modules with failed dependencies
+
+ failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)"
+
+ ###
+ # traverse our list of modules
+
+ for category in app cdr codec format func pbx res; do
+ tmp_list=""
+
+ # search list of modules for matching ones first...
+ for mod in ${MODULES_LIST}; do
+ # module is from current category?
+ if [[ "${mod/%_*}" = "${category}" ]]
+ then
+ # check menuselect thinks the dependencies are met
+ if has ${mod} ${failed_list}
+ then
+ eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!"
+ else
+ tmp_list="${tmp_list} ${mod}"
+ fi
+ fi
+ done
+
+ use debug && echo "${category} tmp: ${tmp_list}"
+
+ # replace the module list for $category with our custom one
+ if [[ -n "${tmp_list}" ]]
+ then
+ category="$(echo ${category} | tr '[:lower:]' '[:upper:]')"
+ sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \
+ menuselect.makeopts || die "failed to set list of ${category} applications"
+ fi
+ done
+ fi
+}
+
+src_compile() {
+ ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed"
+}
+
+src_install() {
+ # setup directory structure
+ #
+ mkdir -p "${D}"usr/lib/pkgconfig
+
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ if use samples; then
+ emake DESTDIR="${D}" samples || die "emake samples failed"
+ for conffile in "${D}"etc/asterisk/*.*
+ do
+ fowners asterisk:asterisk $conffile
+ fperms 0660 $conffile
+ done
+ einfo "Sample files have been installed"
+ else
+ einfo "Skipping installation of sample files..."
+ rm -f "${D}"var/lib/asterisk/mohmp3/*
+ rm -f "${D}"var/lib/asterisk/sounds/demo-*
+ rm -f "${D}"var/lib/asterisk/agi-bin/*
+ rm -f "${D}"etc/asterisk/*
+ fi
+ rm -rf "${D}"var/spool/asterisk/voicemail/default
+
+ # keep directories
+ diropts -m 0770 -o asterisk -g asterisk
+ keepdir /etc/asterisk
+ keepdir /var/lib/asterisk
+ keepdir /var/run/asterisk
+ keepdir /var/spool/asterisk
+ keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
+ diropts -m 0750 -o asterisk -g asterisk
+ keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
+
+ newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk
+ newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk
+
+ # some people like to keep the sources around for custom patching
+ # copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there
+ if use keepsrc
+ then
+ dodir /usr/src
+
+ ebegin "Copying sources into /usr/src"
+ cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources"
+ eend $?
+
+ ebegin "Cleaning source tree"
+ emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources"
+ eend $?
+
+ einfo "Clean sources are available in "${ROOT}"usr/src/${PF}"
+ fi
+
+ # install the upgrade documentation
+ #
+ dodoc README UPGRADE* BUGS CREDITS
+
+ # install snmp mib files
+ #
+ if use snmp
+ then
+ insinto /usr/share/snmp/mibs/
+ doins doc/digium-mib.txt doc/asterisk-mib.txt
+ fi
+}
+
+pkg_preinst() {
+ enewgroup asterisk
+ enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
+}
+
+pkg_postinst() {
+ #
+ # Announcements, warnings, reminders...
+ #
+ einfo "Asterisk has been installed"
+ echo
+ elog "If you want to know more about asterisk, visit these sites:"
+ elog "http://www.asteriskdocs.org/"
+ elog "http://www.voip-info.org/wiki-Asterisk"
+ echo
+ elog "http://www.automated.it/guidetoasterisk.htm"
+ echo
+ elog "Gentoo VoIP IRC Channel:"
+ elog "#gentoo-voip @ irc.freenode.net"
+ echo
+ echo
+}
+
+pkg_config() {
+ einfo "Do you want to reset file permissions and ownerships (y/N)?"
+
+ read tmp
+ tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')"
+
+ if [[ "$tmp" = "y" ]] ||\
+ [[ "$tmp" = "yes" ]]
+ then
+ einfo "Resetting permissions to defaults..."
+
+ for x in spool run lib log; do
+ chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk
+ done
+
+ chown -R root:asterisk "${ROOT}"etc/asterisk
+ chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk
+
+ einfo "done"
+ else
+ einfo "skipping"
+ fi
+}
diff --git a/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch
new file mode 100644
index 000000000000..1dad8ca6faea
--- /dev/null
+++ b/net-misc/asterisk/files/1.6.1/asterisk-1.6.1.20-inband-progress.patch
@@ -0,0 +1,21 @@
+diff -uNr asterisk-1.6.1.20.ORIG//main/channel.c asterisk-1.6.1.20/main/channel.c
+--- asterisk-1.6.1.20.ORIG//main/channel.c 2010-06-07 12:13:50.000000000 +0100
++++ asterisk-1.6.1.20/main/channel.c 2010-06-07 12:14:25.000000000 +0100
+@@ -1987,6 +1987,8 @@
+ chan->generator->release(chan, chan->generatordata);
+ chan->generatordata = NULL;
+ }
++
++ ast_prod(chan);
+ if (gen->alloc && !(chan->generatordata = gen->alloc(chan, params))) {
+ res = -1;
+ }
+@@ -1996,8 +1998,6 @@
+ }
+ ast_channel_unlock(chan);
+
+- ast_prod(chan);
+-
+ return res;
+ }
+