Commit 4ec760f2 authored by Timo Teräs's avatar Timo Teräs
Browse files

main/asterisk: upgrade to 12.1.0

ASTERISK-19109, rebased against 12.x (untested)
ASTERISK-19499, cherry picked from upstream
parent a263b96c
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
pkgver=11.7.0
pkgrel=1
pkgver=12.1.0
pkgrel=0
pkgdesc="Asterisk: A Module Open Source PBX System"
pkgusers="asterisk"
pkggroups="asterisk"
......@@ -10,11 +10,11 @@ url="http://www.asterisk.org/"
arch="all"
license="GPL2"
depends=
makedepends="autoconf automake libtool ncurses-dev popt-dev newt-dev zlib-dev
postgresql-dev unixodbc-dev dahdi-tools-dev libpri-dev tar
freetds-dev openssl-dev lua-dev alsa-lib-dev spandsp-dev tiff-dev
libresample sqlite-dev wget speex-dev libogg-dev bluez-dev curl-dev
libedit-dev libsrtp-dev util-linux-dev"
makedepends="autoconf automake libtool tar wget ncurses-dev popt-dev newt-dev
zlib-dev pjproject-dev jansson-dev libedit-dev dahdi-tools-dev libpri-dev
sqlite-dev postgresql-dev unixodbc-dev freetds-dev openssl-dev lua-dev
alsa-lib-dev spandsp-dev tiff-dev libresample speex-dev libogg-dev
bluez-dev curl-dev libsrtp-dev util-linux-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc
$pkgname-tds $pkgname-fax $pkgname-sample-config:sample
......@@ -35,10 +35,11 @@ source="$_download/asterisk-$_xy.0.tar.gz
$_patches
100-uclibc-daemon.patch
101-caps-uclibc.patch
musl-cdefs.patch
musl-includes.patch
musl-glob-compat.patch
musl-pjsip-mutex.patch
musl-outofmem-handling.patch
ASTERISK-18995.patch
ASTERISK-19499.patch
ASTERISK-19109.patch
ASTERISK-20527.patch
asterisk.initd
......@@ -235,38 +236,41 @@ sound_en() {
chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk
}
md5sums="f0c6b577f1efd8dc2de1f259b95a8d66 asterisk-11.7.0.tar.gz
md5sums="87a7894f47d4420c4f4e1a3618a0259d asterisk-12.1.0.tar.gz
837fc3bc835699462a8d2a7a16b9b6a3 100-uclibc-daemon.patch
6e1129e30c4fd2c25c86c81685a485a9 101-caps-uclibc.patch
735e5ae1e2121878a55eb2f5c6946ee2 musl-cdefs.patch
b4211313aae31efa8c3c1931ba47dbf9 musl-includes.patch
9b3e6cb75464a6ef4c40d191bdfdf7ea musl-glob-compat.patch
dfbd596ac95f52e3e668ade2c38147b1 musl-pjsip-mutex.patch
10b84632764a6f05ec9973c31f5e82fb musl-outofmem-handling.patch
bc6713f5434e07b79d3afdd155461d72 ASTERISK-18995.patch
146befabe95798a67c58d8ac00d397a6 ASTERISK-19109.patch
823856836230ed657ed11e6d895c23ed ASTERISK-19499.patch
b06ae4aecf862769158b60bd6b2e9cb0 ASTERISK-19109.patch
676ca42ee1859d8a7bae4345ede5eb89 ASTERISK-20527.patch
74cd25a5638a94ef51e9f4ede2fd28f2 asterisk.initd
ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd
3e65172275684373e1a25c8a11224411 asterisk.logrotate"
sha256sums="4fb283b96447f5d871632a14069f35643c8c34d08d6ec5fedf0ae3df30e0c397 asterisk-11.7.0.tar.gz
sha256sums="879bbd2bbf68ef76eb77406ba3309b8515db0a662408af991d694fbba99c0b9e asterisk-12.1.0.tar.gz
6f56ea997513c10fa39835e8dd11fbfb4ec0bb23f4b771963e56691b15a5c003 100-uclibc-daemon.patch
c2ef786e9a8082fe8ba7b4eb2f130925cb823d100ec567909ad465c279e335bf 101-caps-uclibc.patch
ad2506945246a6c2010bf39c1b3a8b10a6a635f02b56cbfa3014dcb2257298ff musl-cdefs.patch
e3b7128813d0452b152d3af5015da927b07849e7f33de9f80f1d10f65907d268 musl-includes.patch
c6a5c32646b767f09ebffccc49cac6a4ff9181498499e4453300775e75284b52 musl-glob-compat.patch
84e8d17572ee362c411bb641ae339eb42cb4542c32b0d1f41b7ac5f22b3328cb musl-pjsip-mutex.patch
235b9c339793c02d1d80ac37d308cf14dc3e86fe8ccbe757e9855b186d9c164b musl-outofmem-handling.patch
7a7140156ae7fc7e833035db1e428db8d90159579cd2678c4b5cc829ded47485 ASTERISK-18995.patch
d657634d4c96f42ac1a8b7103104185e8cd9d5a59e5214cc1658e01805975ce8 ASTERISK-19109.patch
798e550e637917d66a8fce31d85f64fd31f4255b3addf5dd46a19ca9e7ac5282 ASTERISK-19499.patch
62c6f6f254a0ca83fb7e13d16779121b4de0ecf7a1268c14d27d4463f5631420 ASTERISK-19109.patch
1f822e618554e9962fe4599975bdcc24413e087dbd7ea4ce0305ecb7ea9bef94 ASTERISK-20527.patch
13bcc98f2a78d4dd41e810232979eb83044e9166302bfb5b971315f2a82af36f asterisk.initd
d221148583b57f9c37d7160f2493f0d204ad11f7abb17e3a3534e108ad5452d7 asterisk.confd
77b253b6db71460acf9a51e87ad4c8582027a46db01a4c50fb048bada58c19d1 asterisk.logrotate"
sha512sums="cd7ee59f9133fbd088b30c0495ac4d94cb0ca273015681340eeb4192ee1c510b59c8290255fc2df81f070369ff2ca56073fdee3f39e0b0186d95bb85f9ad1bd6 asterisk-11.7.0.tar.gz
sha512sums="690b952b9685220cd53419b5fdcf7aad96f01f8d66144fe53aa4a0456c1b000d71981a446e21187c13dc68dd067f540e169e59dcb2626741ac9de7837980e50d asterisk-12.1.0.tar.gz
24a0d3c0ae86117ead8d2e35fc9a5945e04b9f80f3baf122337c8361c015e5ad904c206579962aefe3eb35a1fbf269515228ae5f34a801d7725d73dc235cf831 100-uclibc-daemon.patch
601681b9a33e77b33a0393a494c4140aa6c1f174c514093242a4081661bb7f78b6af867100996c97f3bf12e8dd10873dd3e116b61e2a0e04832f4ee470664368 101-caps-uclibc.patch
29c74eee1df4826a8b63a049b57cc1a3d898b6e54bc32f4895e8e4e0ed88aece0061755ec1294fd6fb3d1cc4b2fd4de56ee5a8f036230609b0b08d2213c2d1cf musl-cdefs.patch
878b8cddc5af338a07658c388d42a7f9ddf3edcf302ca8b294adcf278b6ceacd463d279cb716b0b6b059f47eb287803bc15a7f36a403c66697f466ff3cd5a6e4 musl-includes.patch
edf65eba44e8f1f0e78671aba312bcff2090134cf94e89ebb4b6beef7b2d57b24381ae9511cbf9fffe6b555e695a3dbe2cedcd04f1d237df822fa742bd5092ac musl-glob-compat.patch
33f376cf37ff6a916a4ca67edc686b4afbfaecd74fdc7ef08ed19bf3fb01f4e6a604ff2de3b2a14b4313c91037e6587b85917111998b5166eeccab5317601f11 musl-pjsip-mutex.patch
7cbbad2c16d89b0b4ea45257a44c25ea96ca6ecb1f5bf7707656dfa3957cae34d1dca404b3d62baca8b55cea6f9fa39819bef48a1f4dad0124da95d6c80a294e musl-outofmem-handling.patch
42b2385d88e72473fe34c63e1be8cdf7f37688649fe5bf033b5ba17627008b771aec8f0a583e9ad483a20f9e1f7c33922cb42bf5b73adc68aa43fd46c5da1daa ASTERISK-18995.patch
a9a0a4199291a6ef5ebdf07daee07293d96a16a38116f6afdea61d68b167235d63b5a54e3ae45b7e11be0b9dc82863fdced1ad45110dcac29b353ddcc1d6337a ASTERISK-19109.patch
3bddb216c3902354f2bb41bab0a2392b01933a82736cb4ad4cecbc70739fd716fc2fa1cbd250fa669d529763cd4ad192e573283376e0c746209cc0607edc24e3 ASTERISK-19499.patch
1dbf0f63e5e1721e90fdd5ff0956753958a2c7eb5f710afd5ebf6d871c9b894d698d0f019f8876b5427be0b4c40497edb97ba1f64f214c9a6f8ef4478764ca74 ASTERISK-19109.patch
6edd8e0a1dce326aadf659c8bf8ed34083e8247b6c0f032d097c77df25feb93107375ba505e9076c084fe80676336d6c863e04c3c6808a850e24257fd7a7702d ASTERISK-20527.patch
e29477aa57d88fedc96d13751f68f302d3892c70b5ea5b5a8cc85d0439335fc1a6847648447b443a074c0877718f23295e3752056a108301d340d1e2919465b1 asterisk.initd
ab6b6f08ff43268cbb1abb7ed7d678949991ba495682a644bbaeb017d6adbff0a43297905fd73ae8db1786a28d5b5904f1bc253209a0e388c8a27f26c6ce14ed asterisk.confd
......
This diff is collapsed.
From d025bba965381549a5411cf008b0a519a8a1937f Mon Sep 17 00:00:00 2001
From: kharwell <kharwell@f38db490-d61c-443f-a65b-d21fe96a405b>
Date: Fri, 21 Feb 2014 15:44:55 +0000
Subject: [PATCH] channel.c: MOH is not working for transferee after attended
transfer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Updated the code to check to see if MOH is playing on the transferor and if
so then start it on the channel that replaces it during a masquerade.
Example scenario of the problem:
Alice calls Bob and then Bob begins the attended transfer process into a queue.
Upon going on hold Alice hears music and so does Bob once he is in the queue.
Bob then transfers Alice into the queue and then music for Alice stops even
though she should be hearing it since has now replaced Bob in the queue.
The problem that was occurring is that once the channel was masqueraded the app
(queues, confbridge, etc...) had no way of knowing that the channel had just
been swapped out thus it did not start music for the present channel.
Credit to Olle Johansson for pointing me in the right direction on this issue.
(closes issue ASTERISK-19499)
Reported by: Timo Teräs
Review: https://reviewboard.asterisk.org/r/3226/
........
Merged revisions 408642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 408643 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: http://svn.digium.com/svn/asterisk/branches/12@408644 f38db490-d61c-443f-a65b-d21fe96a405b
---
main/channel.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/main/channel.c b/main/channel.c
index a9f0fbb..da4f794 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -6406,6 +6406,7 @@ static void channel_do_masquerade(struct ast_channel *original, struct ast_chann
unsigned int clone_disablestatecache;
int visible_indication;
int clone_hold_state;
+ int moh_is_playing;
struct ast_frame *current;
const struct ast_channel_tech *t;
void *t_pvt;
@@ -6452,6 +6453,8 @@ static void channel_do_masquerade(struct ast_channel *original, struct ast_chann
ao2_unlink(channels, original);
ao2_unlink(channels, clonechan);
+ moh_is_playing = ast_test_flag(ast_channel_flags(original), AST_FLAG_MOH);
+
/*
* Stop any visible indication on the original channel so we can
* transfer it to the clonechan taking the original's place.
@@ -6753,6 +6756,12 @@ static void channel_do_masquerade(struct ast_channel *original, struct ast_chann
}
}
+ /* if moh is playing on the original channel then it needs to be
+ maintained on the channel that is replacing it. */
+ if (moh_is_playing) {
+ ast_moh_start(original, NULL, NULL);
+ }
+
ast_channel_lock(original);
/* Signal any blocker */
--
1.9.0
......@@ -18,3 +18,25 @@
#include <sys/types.h>
#include <stdio.h>
--- asterisk-12.1.0.orig/include/asterisk/compat.h
+++ asterisk-12.1.0/include/asterisk/compat.h
@@ -68,7 +68,7 @@
#endif
#ifndef AST_POLL_COMPAT
-#include <sys/poll.h>
+#include <poll.h>
#else
#include "asterisk/poll-compat.h"
#endif
--- asterisk-12.1.0.orig/include/asterisk/poll-compat.h
+++ asterisk-12.1.0/include/asterisk/poll-compat.h
@@ -83,7 +83,7 @@
#ifndef AST_POLL_COMPAT
-#include <sys/poll.h>
+#include <poll.h>
#define ast_poll(a, b, c) poll(a, b, c)
--- asterisk-12.1.0.orig/include/asterisk/utils.h
+++ asterisk-12.1.0/include/asterisk/utils.h
@@ -25,7 +25,6 @@
#include "asterisk/network.h"
-#include <execinfo.h>
#include <time.h> /* we want to override localtime_r */
#include <unistd.h>
#include <string.h>
@@ -480,25 +479,13 @@
#define ast_free free
#define ast_free_ptr ast_free
-/*
- * This buffer is in static memory. We never intend to read it,
- * nor do we care about multiple threads writing to it at the
- * same time. We only want to know if we're recursing too deep
- * already. 60 entries should be more than enough. Function
- * call depth rarely exceeds 20 or so.
- */
-#define _AST_MEM_BACKTRACE_BUFLEN 60
-extern void *_ast_mem_backtrace_buffer[_AST_MEM_BACKTRACE_BUFLEN];
-
-/*
- * Ok, this sucks. But if we're already out of mem, we don't
- * want the logger to create infinite recursion (and a crash).
- */
#define MALLOC_FAILURE_MSG \
do { \
- if (backtrace(_ast_mem_backtrace_buffer, _AST_MEM_BACKTRACE_BUFLEN) < _AST_MEM_BACKTRACE_BUFLEN) { \
- ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file); \
- } \
+ extern int __thread _ast_out_of_memory; \
+ if (_ast_out_of_memory) break; \
+ _ast_out_of_memory = 1; \
+ ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file); \
+ _ast_out_of_memory = 0; \
} while (0)
/*!
--- asterisk-12.1.0.orig/main/hashtab.c
+++ asterisk-12.1.0/main/hashtab.c
@@ -44,7 +44,7 @@
#ifndef __AST_DEBUG_MALLOC
-void *_ast_mem_backtrace_buffer[_AST_MEM_BACKTRACE_BUFLEN];
+int __thread _ast_out_of_memory;
#endif
#if (defined(MALLOC_DEBUG) && !defined(STANDALONE))
--- asterisk-11.7.0.orig/res/pjproject/pjlib/src/pj/os_core_unix.c
+++ asterisk-11.7.0/res/pjproject/pjlib/src/pj/os_core_unix.c
@@ -1091,8 +1091,7 @@
return PJ_RETURN_OS_ERROR(rc);
if (type == PJ_MUTEX_SIMPLE) {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
- defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+#if defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
@@ -1101,8 +1100,7 @@
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
#endif
} else {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
- defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+#if (defined(PJ_LINUX) && PJ_LINUX!=0) && defined(__GLIBC__)
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment