From 8e5baaaeb3ce0775d6e205329010a6dedc198f6a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 26 Jan 2010 15:09:51 +0000 Subject: main/asterisk: upgrade to 1.6.2.0 (from testing) --- main/asterisk/103-rundir.patch | 11 -- main/asterisk/201-incomplete.patch | 121 --------------------- main/asterisk/301-libpri-autoconf.patch | 21 ---- main/asterisk/400-bug-227.patch | 15 +++ main/asterisk/400-destroy-no-response-234131.patch | 39 ------- main/asterisk/APKBUILD | 38 ++++--- 6 files changed, 39 insertions(+), 206 deletions(-) delete mode 100644 main/asterisk/103-rundir.patch delete mode 100644 main/asterisk/201-incomplete.patch delete mode 100644 main/asterisk/301-libpri-autoconf.patch create mode 100644 main/asterisk/400-bug-227.patch delete mode 100644 main/asterisk/400-destroy-no-response-234131.patch (limited to 'main/asterisk') diff --git a/main/asterisk/103-rundir.patch b/main/asterisk/103-rundir.patch deleted file mode 100644 index 367dc7163f..0000000000 --- a/main/asterisk/103-rundir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- asterisk-1.4.0/Makefile.orig 2006-12-24 03:07:19.000000000 +0000 -+++ asterisk-1.4.0/Makefile 2006-12-24 03:07:57.000000000 +0000 -@@ -109,7 +109,7 @@ - ASTSBINDIR=$(sbindir) - ASTSPOOLDIR=$(localstatedir)/spool/asterisk - ASTLOGDIR=$(localstatedir)/log/asterisk -- ASTVARRUNDIR=$(localstatedir)/run -+ ASTVARRUNDIR=$(localstatedir)/run/asterisk - ASTMANDIR=$(mandir) - ifeq ($(OSARCH),FreeBSD) - ASTVARLIBDIR=$(prefix)/share/asterisk diff --git a/main/asterisk/201-incomplete.patch b/main/asterisk/201-incomplete.patch deleted file mode 100644 index 2566134f38..0000000000 --- a/main/asterisk/201-incomplete.patch +++ /dev/null @@ -1,121 +0,0 @@ -Index: include/asterisk/pbx.h -=================================================================== ---- a/include/asterisk/pbx.h (revision 112598) -+++ b/include/asterisk/pbx.h (working copy) -@@ -42,6 +42,7 @@ - - /*! \brief Special return values from applications to the PBX { */ - #define AST_PBX_ERROR 1 /*!< Jump to the 'e' exten */ -+#define AST_PBX_INCOMPLETE 12 /*!< Return to PBX matching, allowing more digits for the extension */ - /*! } */ - - #define PRIORITY_HINT -1 /*!< Special Priority for a hint */ -Index: main/pbx.c -=================================================================== ---- a/main/pbx.c (revision 112598) -+++ b/main/pbx.c (working copy) -@@ -302,6 +302,7 @@ - static int pbx_builtin_background(struct ast_channel *, void *); - static int pbx_builtin_wait(struct ast_channel *, void *); - static int pbx_builtin_waitexten(struct ast_channel *, void *); -+static int pbx_builtin_incomplete(struct ast_channel *, void *); - static int pbx_builtin_resetcdr(struct ast_channel *, void *); - static int pbx_builtin_setamaflags(struct ast_channel *, void *); - static int pbx_builtin_ringing(struct ast_channel *, void *); -@@ -579,6 +580,16 @@ - "value.\n" - }, - -+ { "Incomplete", pbx_builtin_incomplete, -+ "returns AST_PBX_INCOMPLETE value", -+ " Incomplete([n]): Signals the PBX routines that the previous matched extension\n" -+ "is incomplete and that further input should be allowed before matching can\n" -+ "be considered to be complete. Can be used within a pattern match when\n" -+ "certain criteria warrants a longer match.\n" -+ " If the 'n' option is specified, then Incomplete will not attempt to answer\n" -+ "the channel first. Note that most channel types need to be in Answer state\n" -+ "in order to receive DTMF.\n" -+ }, - { "NoOp", pbx_builtin_noop, - "Do Nothing (No Operation)", - " NoOp(): This application does nothing. However, it is useful for debugging\n" -@@ -3539,6 +3551,8 @@ - char dst_exten[256]; /* buffer to accumulate digits */ - int pos = 0; /* XXX should check bounds */ - int digit = 0; -+ int invalid = 0; -+ int timeout = 0; - - /* loop on priorities in this context/exten */ - while ( !(res = ast_spawn_extension(c, c->context, c->exten, c->priority, c->cid.cid_num, &found,1))) { -@@ -3574,6 +3588,18 @@ - pos = 0; - dst_exten[pos++] = digit = res; - dst_exten[pos] = '\0'; -+ } else if (res == AST_PBX_INCOMPLETE) { -+ ast_debug(1, "Spawn extension (%s,%s,%d) exited INCOMPLETE on '%s'\n", c->context, c->exten, c->priority, c->name); -+ ast_verb(2, "Spawn extension (%s, %s, %d) exited INCOMPLETE on '%s'\n", c->context, c->exten, c->priority, c->name); -+ -+ /* Don't cycle on incomplete - this will happen if the only extension that matches is our "incomplete" extension */ -+ if (!ast_matchmore_extension(c, c->context, c->exten, c->priority, c->cid.cid_num)) { -+ invalid = 1; -+ } else { -+ ast_copy_string(dst_exten, c->exten, sizeof(dst_exten)); -+ digit = 1; -+ pos = strlen(dst_exten); -+ } - } else { - ast_debug(1, "Spawn extension (%s,%s,%d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name); - ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s'\n", c->context, c->exten, c->priority, c->name); -@@ -3610,7 +3636,7 @@ - * hangup. We have options, here. We can either catch the failure - * and continue, or we can drop out entirely. */ - -- if (!ast_exists_extension(c, c->context, c->exten, 1, c->cid.cid_num)) { -+ if (invalid || !ast_exists_extension(c, c->context, c->exten, 1, c->cid.cid_num)) { - /*!\note - * If there is no match at priority 1, it is not a valid extension anymore. - * Try to continue at "i" (for invalid) or "e" (for exception) or exit if -@@ -3654,11 +3680,13 @@ - - if (collect_digits(c, waittime, dst_exten, sizeof(dst_exten), pos)) - break; -- if (ast_exists_extension(c, c->context, dst_exten, 1, c->cid.cid_num)) /* Prepare the next cycle */ -+ if (res == AST_PBX_INCOMPLETE && ast_strlen_zero(&dst_exten[pos])) -+ timeout = 1; -+ if (!timeout && ast_exists_extension(c, c->context, dst_exten, 1, c->cid.cid_num)) /* Prepare the next cycle */ - set_ext_pri(c, dst_exten, 1); - else { - /* No such extension */ -- if (!ast_strlen_zero(dst_exten)) { -+ if (!timeout && !ast_strlen_zero(dst_exten)) { - /* An invalid extension */ - if (ast_exists_extension(c, c->context, "i", 1, c->cid.cid_num)) { - ast_verb(3, "Invalid extension '%s' in context '%s' on %s\n", dst_exten, c->context, c->name); -@@ -7315,6 +7343,26 @@ - return AST_PBX_KEEPALIVE; - } - -+static int pbx_builtin_incomplete(struct ast_channel *chan, void *data) -+{ -+ char *options = data; -+ int answer = 1; -+ -+ /* Some channels can receive DTMF in unanswered state; some cannot */ -+ if (!ast_strlen_zero(options) && strchr(options, 'n')) { -+ answer = 0; -+ } -+ -+ /* If the channel is hungup, stop waiting */ -+ if (ast_check_hangup(chan)) { -+ return -1; -+ } else if (chan->_state != AST_STATE_UP && answer) { -+ __ast_answer(chan, 0, 1); -+ } -+ -+ return AST_PBX_INCOMPLETE; -+} -+ - AST_APP_OPTIONS(resetcdr_opts, { - AST_APP_OPTION('w', AST_CDR_FLAG_POSTED), - AST_APP_OPTION('a', AST_CDR_FLAG_LOCKED), diff --git a/main/asterisk/301-libpri-autoconf.patch b/main/asterisk/301-libpri-autoconf.patch deleted file mode 100644 index 0893b0323a..0000000000 --- a/main/asterisk/301-libpri-autoconf.patch +++ /dev/null @@ -1,21 +0,0 @@ -Index: configure.ac -=================================================================== ---- a/configure.ac.orig Fri Nov 27 22:58:39 2009 -+++ b/configure.ac Sat Nov 28 00:14:40 2009 -@@ -261,11 +261,11 @@ - AST_EXT_LIB_SETUP([POPT], [popt], [popt]) - AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio]) - AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri]) --AST_EXT_LIB_SETUP_DEPENDENT([PRI_VERSION], [ISDN PRI get_version], [PRI], [pri]) --AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri]) --AST_EXT_LIB_SETUP_DEPENDENT([PRI_PROG_W_CAUSE], [ISDN progress with cause], [PRI], [pri]) --AST_EXT_LIB_SETUP_DEPENDENT([PRI_SERVICE_MESSAGES], [ISDN service messages], [PRI], [pri]) --AST_EXT_LIB_SETUP_DEPENDENT([PRI_REVERSE_CHARGE], [ISDN reverse charge], [PRI], [pri]) -+#AST_EXT_LIB_SETUP_DEPENDENT([PRI_VERSION], [ISDN PRI get_version], [PRI], [pri]) -+#AST_EXT_LIB_SETUP_DEPENDENT([PRI_INBANDDISCONNECT], [ISDN PRI set_inbanddisconnect], [PRI], [pri]) -+#AST_EXT_LIB_SETUP_DEPENDENT([PRI_PROG_W_CAUSE], [ISDN progress with cause], [PRI], [pri]) -+#AST_EXT_LIB_SETUP_DEPENDENT([PRI_SERVICE_MESSAGES], [ISDN service messages], [PRI], [pri]) -+#AST_EXT_LIB_SETUP_DEPENDENT([PRI_REVERSE_CHARGE], [ISDN reverse charge], [PRI], [pri]) - AST_EXT_LIB_SETUP([RESAMPLE], [LIBRESAMPLE], [resample]) - AST_EXT_LIB_SETUP([SPANDSP], [SPANDSP], [spandsp]) - AST_EXT_LIB_SETUP([SS7], [ISDN SS7], [ss7]) diff --git a/main/asterisk/400-bug-227.patch b/main/asterisk/400-bug-227.patch new file mode 100644 index 0000000000..f8187379e1 --- /dev/null +++ b/main/asterisk/400-bug-227.patch @@ -0,0 +1,15 @@ +Index: channels/chan_sip.c +=================================================================== +--- a/channels/chan_sip.c (revision 212243) ++++ b/channels/chan_sip.c (working copy) +@@ -3675,8 +3675,8 @@ + char method_str[31]; + ast_debug(3, "Re-scheduled destruction of SIP call %s\n", p->callid ? p->callid : ""); + append_history(p, "ReliableXmit", "timeout"); +- if (sscanf(p->lastmsg, "Tx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %30s", method_str) == 1) { +- if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str)) { ++ if (sscanf(p->lastmsg, "Tx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Rx: %30s", method_str) == 1 || sscanf(p->lastmsg, "Init: %30s", method_str) == 1) { ++ if (method_match(SIP_CANCEL, method_str) || method_match(SIP_BYE, method_str) || method_match(SIP_INVITE, method_str)) { + pvt_set_needdestroy(p, "autodestruct"); + } + } diff --git a/main/asterisk/400-destroy-no-response-234131.patch b/main/asterisk/400-destroy-no-response-234131.patch deleted file mode 100644 index 16eef51090..0000000000 --- a/main/asterisk/400-destroy-no-response-234131.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- 1.6.0/channels/chan_sip.c 2009/12/10 16:24:36 234130 -+++ 1.6.0/channels/chan_sip.c 2009/12/10 16:30:22 234131 -@@ -4523,6 +4523,9 @@ - ast_queue_control(p->owner, AST_CONTROL_CONGESTION); - ast_channel_unlock(p->owner); - } -+ -+ /* Give the channel a chance to act before we proceed with destruction */ -+ sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); - } - sip_pvt_unlock(p); - return 0; -@@ -5186,19 +5189,20 @@ - if (needcancel) { /* Outgoing call, not up */ - if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) { - /* stop retransmitting an INVITE that has not received a response */ -- struct sip_pkt *cur; -- for (cur = p->packets; cur; cur = cur->next) { -- __sip_semi_ack(p, cur->seqno, cur->is_resp, cur->method ? cur->method : find_sip_method(cur->data)); -- } -- - /* if we can't send right now, mark it pending */ - if (p->invitestate == INV_CALLING) { - /* We can't send anything in CALLING state */ - ast_set_flag(&p->flags[0], SIP_PENDINGBYE); -- /* Do we need a timer here if we don't hear from them at all? */ -+ __sip_pretend_ack(p); -+ /* Do we need a timer here if we don't hear from them at all? Yes we do or else we will get hung dialogs and those are no fun. */ - sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); - append_history(p, "DELAY", "Not sending cancel, waiting for timeout"); - } else { -+ struct sip_pkt *cur; -+ -+ for (cur = p->packets; cur; cur = cur->next) { -+ __sip_semi_ack(p, cur->seqno, cur->is_resp, cur->method ? cur->method : find_sip_method(cur->data)); -+ } - p->invitestate = INV_CANCELLED; - /* Send a new request: CANCEL */ - transmit_request(p, SIP_CANCEL, p->lastinvite, XMIT_RELIABLE, FALSE); diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index d76ed9567a..d416e778b0 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Timo Teras # Maintainer: Timo Teras pkgname=asterisk -pkgver=1.6.0.20 -pkgrel=1 +pkgver=1.6.2.1 +pkgrel=0 pkgdesc="Asterisk: A Module Open Source PBX System" url="http://www.asterisk.org/" license="GPL" @@ -12,21 +12,20 @@ makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev freetds-dev openssl-dev lua-dev alsa-lib-dev" install="$pkgname.pre-install $pkgname.pre-upgrade $pkgname.post-install" subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc - $pkgname-tds" + $pkgname-tds $pkgname-sample-config:sample" source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.gz 100-uclibc-daemon.patch 101-caps-uclibc.patch 102-gsm-pic.patch - 103-rundir.patch - 201-incomplete.patch - 301-libpri-autoconf.patch - 400-destroy-no-response-234131.patch + 400-bug-227.patch asterisk.initd asterisk.confd asterisk.logrotate" -build() { - cd "$srcdir/$pkgname-$pkgver" +_builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + cd "$_builddir" for i in ../[1-9]*.patch; do msg "Apply $i" patch -p1 < $i || return 1 @@ -36,6 +35,10 @@ build() { sed -i -e 's/PBX_ICONV=1/PBX_ICONV=0/g' configure.ac ./bootstrap.sh +} + +build() { + cd "$_builddir" ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ @@ -54,6 +57,10 @@ build() { rm menuselect.makeopts make menuselect.makeopts make -j1 || return 1 +} + +package() { + cd "$_builddir" make -j1 DESTDIR="$pkgdir" install install -d "$pkgdir"/var/run/asterisk @@ -91,14 +98,17 @@ tds() { _find_and_move '*_tds*' } -md5sums="649c905c897824cebcf9bc2cee1f9398 asterisk-1.6.0.20.tar.gz +sample() { + pkgdesc="Sample configuration files for asterisk" + cd "$_builddir" + make samples DESTDIR="$subpkgdir" +} + +md5sums="8fbc60f9d80e686c749ae95292e225d8 asterisk-1.6.2.1.tar.gz b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch 6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch 97b39fd9777a2521d4f9f095482b7ac2 102-gsm-pic.patch -5008f51c737ec91f5047519bc9f25b85 103-rundir.patch -57825b74526187075ff7cb6816c55467 201-incomplete.patch -5771a5ab34b187dbfe8e23950b04213b 301-libpri-autoconf.patch -e35d40d688f6e4e4034c7aca8f955f46 400-destroy-no-response-234131.patch +79e9634b5054bceb3b8dc246654bb243 400-bug-227.patch 0ce3219e05f55af884a7dc6b99c2b276 asterisk.initd ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd 3e65172275684373e1a25c8a11224411 asterisk.logrotate" -- cgit v1.2.3