Package Details: asterisk 19.5.0-1

Git Clone URL: (read-only, click to copy)
Package Base: asterisk
Description: A complete PBX solution
Upstream URL:
Keywords: sip, telephony, voip
Licenses: GPL
Submitter: pressh
Maintainer: nkukard (alerque)
Last Packager: nkukard
Votes: 111
Popularity: 0.078166
First Submitted: 2008-01-27 13:42 (UTC)
Last Updated: 2022-07-06 20:10 (UTC)

Pinned Comments

alerque commented on 2020-02-22 06:10 (UTC) (edited on 2020-02-22 06:34 (UTC) by alerque)

PSA: I've started hosting this and all its dependencies as prebuilt packages (x86_86 only) in my repository for those that want to install them using pacman without messing around with building from the AUR.

Latest Comments

Astroturf commented on 2022-06-11 18:28 (UTC) (edited on 2022-06-11 18:28 (UTC) by Astroturf)

Since Asterisk 19 the log file has been renamed to "messages.log". Logrotate should be updated accordingly.

diff --git a/asterisk.logrotated b/asterisk.logrotated
index f03d0ac..4bf367b 100644
--- a/asterisk.logrotated
+++ b/asterisk.logrotated
@@ -1,4 +1,4 @@
-/var/log/asterisk/*_log /var/log/asterisk/messages {
+/var/log/asterisk/*_log /var/log/asterisk/messages.log {
   create 640 asterisk asterisk

Marc_Eberhard commented on 2022-06-07 07:36 (UTC)

@fs_developer I'm using the repo from alerque and both systemd and systemd-libs are installed:

alerque/asterisk 19.3.1-1 [installed] A complete PBX solution alerque/asterisk-g729 1:1.4.3.r4.3855cec2ef26-3 [installed] G.729 codec for Asterisk open source PBX

core/systemd 251.2-1 [installed] system and service manager core/systemd-libs 251.2-1 [installed] systemd client libraries

So, it must be something else that's missing... question is how can I narrow this down?

fs_developer commented on 2022-06-07 06:08 (UTC)

@Marc_Eberhard I had the same problem when building in a clean chroot without systemd and systemd-libs package installed. The asterisk autoconfig script tries to detect if systemd is installed and only enables systemd-notify support if it is found at buildtime. Maybe it would be better to add systemd to the list of dependencies.

Marc_Eberhard commented on 2022-06-06 15:58 (UTC)

It seems that Type=notify in /usr/lib/systemd/system/asterisk.service is not working properly. I see the Asterisk process being restarted every 90 seconds. Changing it to type simple solves the issue. I'm running Asterisk as user asterisk, e.g. not as root, which might be the reason notify isn't working for me, but I'm not a systemd expert... Would it make sense to change to type simple instead of notify or am I doing something really stupid and it should work?

nkukard commented on 2022-05-27 13:38 (UTC)

@ectospasm I took a quick look and there are some good suggestions, I'll see what I can do.

ectospasm commented on 2022-05-27 01:52 (UTC)

I've been developing asterisk-lts-18, which is based on this asterisk PKGBUILD. The first comment on my post from loqs suggests some changes to improve the PKGBUILD.

I realize that this package has been maintained since 2008, so it is very likely to contain some very old ways of doing things. Before I go hacking up my PKGBUILD, I wanted to get the opinions of the maintainers/contributors of this asterisk PKGBUILD.

jwh commented on 2022-04-19 13:29 (UTC)

@nkukard fair enough, it's fine in isolation and/or if you know what you're doing (and I think modules conf still has noload by default) but I understand, thanks

nkukard commented on 2022-03-30 02:50 (UTC)

@jwh You're more than welcome to adjust your copy of the PKGBUILD, but I do not think this is in the best interest of the users of this package. chan_sip was deprecated due to having no maintainer (as the deprecation message said since 17.0). This poses a grave security risk (if you keep up with the changelog you will see). I am not comfortable enabling it, sorry.

jwh commented on 2022-03-29 15:09 (UTC)

Any chance you can add --enable chan_sip? Some of us still live in the past and/or have issues with pjsip, but its disabled by default in 19

nkukard commented on 2022-03-27 09:02 (UTC)

You have a good idea there. I think "asterisk-lts-18" would be the best naming scheme. Generally I'd say people would use the LTS version for long term support of other software and integrations (I certainly would), they may not want a major version change in the case of "asterisl-lts" and then have to figure out how to install the previous version. Lets see if alerque has any input.

ectospasm commented on 2022-03-26 15:25 (UTC)

What are the plans when Asterisk 20 is released, sometime around the third week of October, 2022? I've modified the main asterisk PKGBUILD to use Asterisk 18 (the current LTS version), but I haven't published it yet. I'm calling my package asterisk-lts, but when 20 is released I'd think that asterisk would be the LTS release. I'd think that the asterisk-lts package would be renamed asterisk-lts-18 or something similar when Asterisk 20 LTS is released. The asterisk package would be 20 until 21 is released, sometime in October 2023 if I'm reading correctly.

I don't want to step on any toes by submitting my asterisk-lts PKGBUILD, it looks like a lot of work has gone into the asterisk PKGBUILD, and I've merely modified it to work with Asterisk 18 LTS.

Astroturf commented on 2022-02-05 22:49 (UTC)

Fix for broken PKGBUILD

diff --git a/PKGBUILD b/PKGBUILD
index 28df614..c106727 100644
@@ -163,7 +163,7 @@ build() {
        --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
-       --sbindir=/usr/bin \
+       --sbindir=/usr/bin
    make menuselect.makeopts
    ./menuselect/menuselect --disable BUILD_NATIVE

alerque commented on 2021-12-21 17:27 (UTC)

@nimrod_mack Those files serve as both the examples and as the default config. It's pretty standard on Arch to dump default configs in place. Instead of just deleting them (which as you note just means they come back) you should edit them to your liking. For the ones you don't want to load change the import commands or blank them out, but keep them in place. That way pacman will handle the configs using the backup mechanism and prompt you to handle pacnew files for any that changed (and only ones that changed) since the last package update.

nimrod_mack commented on 2021-12-21 16:03 (UTC)

@alerque Currently, this package installs example configurations files in /etc/asterisk. As I don't need many of the modules, I also delete many of these files again. They would be installed again during upgrades, though. Therefore, I usually modify the PKGBUILD to install the provided config files to /usr/share/doc/asterisk/examples instead.

alerque commented on 2021-12-21 09:42 (UTC) (edited on 2021-12-21 09:43 (UTC) by alerque)

@tosie That patch does look useful, but per Arch packaging guidelines adding features & fixing bugs is something we try to avoid in packages except for urgent security things or if something won't actually build or run without the fix. That patch looks like something you need to submit upstream for inclusion. Please consider doing that so everybody can benefit.

I'll look into the imap voicemail app.

tosie commented on 2021-12-21 09:09 (UTC)

In my own build I usually add the two things below. Maybe that would be helpful for others.

  • Make queues support the device state "BUSY" (see diff regarding app_queue.c, applied via patch -Np1 < "${srcdir}/12-app_queue.c.patch" in the prepare() function of PKGBUILD)
  • Enable app_voicemail_imap (via ./menuselect --disable BUILD_NATIVE --enable app_voicemail_imap, depends on c-client)
--- $pkgname-$pkgver/apps/app_queue.c
+++ $pkgname-$pkgver/apps/app_queue.c
@@ -2323,6 +2323,13 @@
            goto default_case;
+       // This has been added as this device state is reported by PJSIP when a device is in a call.
+       case AST_DEVICE_BUSY:
+           if (conditions & QUEUE_EMPTY_INUSE) {
+               ast_debug(4, "%s is unavailable because his device state is 'busy'\n", member->membername);
+               break;
+           }
+           goto default_case;
        case AST_DEVICE_RINGING:
            if (conditions & QUEUE_EMPTY_RINGING) {
                ast_debug(4, "%s is unavailable because his device state is 'ringing'\n", member->membername);

alerque commented on 2021-12-21 09:09 (UTC)

By the way, get your votes in on your favorite asterisk codec packages on the AUR too, if licenses are in order I might be able to bring in some of those to [community] as well but having more votes on the packages helps justify the move.

alerque commented on 2021-12-21 09:01 (UTC) (edited on 2021-12-21 09:02 (UTC) by alerque)

I'm going to track this package for migration to the official [community] repositories. If anybody knows anything that should be done differently for prebuilt packages please speak up now, it's easier to iterate here before it moves than after.

The biggest change for those of you with this in production will probably be the location of temporary files to fit better with official systemd stuff.

@nkukard I'll be tweaking the coding style a bit prior to moving — not to step on your toes (I try to match style when I'm co-maintainer) but since it will be my responsibility in the official repos I'll use my style.

alerque commented on 2021-11-18 00:04 (UTC)

@JerryXiao Can you confirm that it is possible to build asterisk on a system without gsm and later use it with the gsm module working on a system that does have the dependency?

JerryXiao commented on 2021-11-16 03:19 (UTC)

"gsm" is not a makedep, it is at least a optdepend as it is required for the asterisk gsm module to work.

alerque commented on 2021-07-26 09:20 (UTC)

@C0rn3j Thanks for the extra feedback, and I think I agree with your conclusion.

C0rn3j commented on 2021-07-25 09:06 (UTC) (edited on 2021-07-25 09:07 (UTC) by C0rn3j)

I am not familiar with anything Asterisk, but building chan_mobile adds 0.12MB to the package.

But it probably requires some BT dependencies. And unfortunately does not work with Bluez 5, it has to be ran in --compat mode for Bluez 4 stuff to work.

I am not sure how useful it would be to others, but I would be certainly be grateful if I didn't have to keep rebuilding from my own PKGBUILD, but if it adds a hard BT dependency, maybe it's not the best idea since I assume chan_mobile is a fringe use case.

alerque commented on 2021-07-24 21:29 (UTC)

@C0rn3j Thanks for the info, hopefully it helps somebody. Out of curiosity (since I'm not familiar with it), is chan_mobile perhaps something we should be enabling by default?

C0rn3j commented on 2021-07-24 20:27 (UTC) (edited on 2021-07-24 20:28 (UTC) by C0rn3j)

make menuselect does not work on zsh for whatever reason (does not affect packaging, just when trying to configure things manually), had to switch to bash temporarily

I wanted to build/compile, and for that I had to add

./menuselect/menuselect --enable chan_mobile below the existing menuselect line.

Hope this helps someone.

nimrod_mack commented on 2021-04-03 07:19 (UTC)

Many plugins have additional dependencies not listed here - is there a specific reason those are not included as depends/optdepends? I had to install libvpx gsm lua53 neon to get the modules I need running.

I guess, lua51 can therefore be dropped as it seems they have switched to lua53. Also, gsm is already listed as a makedepends, but is (at least in my case) also needed for running it.

tosie commented on 2020-12-17 15:59 (UTC)

@brackenhill-mob Upon further investigation it seems like archlinux c-client does not include imap/linkage.c. You can manually build a package that includes it like this (maybe the paths might not be right, but you should be able to follow along):

mkdir -p ~/builds
cd ~/builds
git clone --single-branch -b packages/imap ~/builds/c-client
cd ~/builds/c-client/trunk
# Add the following line to PKGBUILD at the end of the `package_c-client` function:
# install -D -m644 c-client/c-client.a $pkgdir/usr/lib/c-client.a
sudo pacman -U c-client-2007f-*.tar.xz

The last line installs the newly build package including the linkage.c file.

I had to change the PKGBUILD of the asterisk package, too:


./menuselect/menuselect --disable BUILD_NATIVE


./menuselect/menuselect --disable BUILD_NATIVE --enable app_voicemail_imap

I guess as long as getting imap/linkage.c is a manual process it won't be possible for the asterisk package to officially enable the IMAP support.

This has been added as a bug report:

tosie commented on 2020-12-17 15:03 (UTC)

@brackenhill-mob You might want to try the c-client package. It includes imap/linkage.h.

brackenhill-mob commented on 2020-12-15 19:37 (UTC)

@nkukard I "borrowed" linkage.c from my Ubuntu server - I now have a working build. I can't find which package contains this file on Ubuntu - many moons ago it was in the uw-imap source code from Uni of Washington but I could find their repository to download it.

nkukard commented on 2020-12-15 16:10 (UTC)

@brackenhill-mob You have a very good point there, I wrongly assumed just enabling imap support with --with-imap=system sorted it out :(

I get the same build error as you, missing imap/linkage.c

brackenhill-mob commented on 2020-12-15 15:21 (UTC)

@nkukard OK I've just looked at my scripts for Ubuntu. --with-imap=system is required.

But my build fails with a missing /usr/lib/imap/linkage.c which is not in the c-client nor imap packages (it exists in Ubuntu).

Please can you set app_voicemail_imap in menuselect and try your build to see if it completes.

brackenhill-mob commented on 2020-12-15 12:25 (UTC)

@nkukard I downloaded the snapshot for 18.1.0-2 as it hadn't hit the repositories at the time, and app_voicemail_imap is not checked in menuselect so the .so is still not being built


brackenhill-mob commented on 2020-12-15 11:03 (UTC) (edited on 2020-12-15 11:12 (UTC) by brackenhill-mob)

@nkukard I'm new to running Asterisk under Arch (coming from Ubuntu Server) so I may not understand how the Arch system works in this case. So at the risk of telling you stuff you already know... ;)

The 3 voice mail options if you run make menuselect manually create 3 different .so files. With your 18.1.0 package, only was created but the /etc/asterisk/modules.conf file told the server to load which didn't exist. I've always built Asterisk from source and used make menuselect to setup the system for my needs, so in this case I would check all 3 options to generate the 3 .so files and let the user decide what to load in modules.conf. If you check those settings do you need a build dependency?


nkukard commented on 2020-12-15 06:32 (UTC)

@Astroturf, thanks for the link. Updated to use bundled version.

@brackenhill-mob, please see As far as I can see "imap" was never a build dependency, nor could of of worked due to the imap linking issue. Nonetheless, I've added imap as a build dep and fixed the linker options. Not sure I like it though. Willing to take improvement suggestions.

brackenhill-mob commented on 2020-12-14 18:07 (UTC)

Agree with @Astroturf re pjproject (especially as it would not compile for me!).

So I downloaded v18.1 from your repository and you appear to have compiled the wrong app_voicemail - I've got when it should be

If you've renamed the .so file for some reason, then /etc/modules.conf is wrong.


Astroturf commented on 2020-12-05 19:16 (UTC) (edited on 2020-12-05 19:17 (UTC) by Astroturf)

What is the reason the bundled version of pjproject is not used? It is the recommended default since Asterisk 15. Asterisk crashes for me when using the pjproject dependency. It works just fine when removing --with-pjproject-bundled=no from PKGBUILD. The bundled version of pjproject also has a very specific config_site.h & a few extra patches (

romainhumbert commented on 2020-08-26 07:49 (UTC) (edited on 2020-08-26 07:51 (UTC) by romainhumbert)

I post here but it's not because of the package upload here it's more the asterisk source related, if it can help someone .

checking for pkg-config... no
checking for LIBEDIT... no
checking for history_init in -ledit... no
configure: error: *** Please install the 'libedit' development package.
==> ERROR: A failure occurred in build().
error making: asterisk

But i install # git sudo binutils make gcc fakeroot wget patch libedit gettext

in reality without the package ' pkg-config ', the compilation fail and say

' Please install the 'libedit' development package '

Maybe i do something wrong, but the error message is misleading

hytrax commented on 2020-07-16 12:42 (UTC)

@caleb afaik sadly they are not. The use the "DIGIUM END-USER LICENSE AGREEMENT ". I think this is also why they do not just bundle them with asterisk per default but download them every time you build it.

alerque commented on 2020-07-15 12:07 (UTC)

@hytrax If the extra files are GPL licensed we could add them to the package sources array, place them where they need to be as part of prepare(), then build.

hytrax commented on 2020-07-15 09:24 (UTC)

After some searching around, I found: a) Asterisk support Opus upstream. b) when one uses the graphical menuconfig to select Opus support it the downloads some files necessary from Digium. If you download those files for a normal installation and put them in the appropriate places then Opus works (that is what I did) c) no menuselect.makeopts flag I could find made it download the files while building. At least, none that I found.

I might look into this more at a later point in time.

alerque commented on 2020-05-03 13:55 (UTC)

@hytrax Does upstream Asterisk support opus transcoding at all? If so there may be an extra option that needs to be set at build time. I'm happy to consider adding it if it doesn't incur more dependencies than the default. Let me know if you figure out what it is.

hytrax commented on 2020-05-03 10:48 (UTC)

@caleb I have built it with the PKGBUILD and Opus passthrough support seems to be there but it cannot transcode from, say, G.722 to Opus. "core show translation" does not list it.

alerque commented on 2020-05-02 20:36 (UTC)

@hytrax The build in my user repository is compiled with the PKGBUILD exactly as posted here (most recently updated by me). There is a dependency on opus so I would have expected it to be found at build time and support to be built in. Do you get something different when you build this PKGBUILD yourself?

It's possible they changed something in recent releases and we need to explicitly enable support now, but I missed anything about that in the change logs.

hytrax commented on 2020-05-02 13:44 (UTC)

Is it not compiled with opus enabled? If I use the package form the alerque repo the opus modules are missing and thus transcoding does not work.

alerque commented on 2020-05-01 11:23 (UTC)

@post-factum Thanks for the heads up. It's building now, if it looks like it runs alright I'll post the update shortly.

alerque commented on 2020-02-27 11:01 (UTC)

Thanks for the heads up @Thulinma, updated package coming shortly.

Thulinma commented on 2020-02-26 17:31 (UTC)

Hey there! Asterisk no longer installs headers by default, but dependent packages expects them to be installed. To re-enable headers, simply add the line:

make DESTDIR="${pkgdir}" install-headers

after the existing line

make DESTDIR="${pkgdir}" install

And that'll do the trick.

nkukard commented on 2020-02-26 13:16 (UTC)

@nkukard Have you ever messed with fixing this build so it works with Lua 5.3 instead of 5.1? Asterisk supports it, their just detects it in the wrong order. I messed with patching it some but didn't get it quite working. I wondered if you'd tried to go down that road before.

I've not tired that myself, I'd prefer to stick with what Asterisk detects, but as you say its in the wrong order, so I think it should be fine to change it if you want.

Also I don't think that should be an optdepend because it cannot be added or removed by installing Lua after the fact, it has to be build in, which means it has to be there at build time. I think it should be a makedepend, and the Arch configuration should just support it out of the box. This is consistent with the way many many other packages that optionally have Lua support handle are handled. Would you mind if I flip that around like that?

Agreed, feel free to flip that around :)

alerque commented on 2020-02-26 13:10 (UTC)

@nkukard Have you ever messed with fixing this build so it works with Lua 5.3 instead of 5.1? Asterisk supports it, their just detects it in the wrong order. I messed with patching it some but didn't get it quite working. I wondered if you'd tried to go down that road before.

Also I don't think that should be an optdepend because it cannot be added or removed by installing Lua after the fact, it has to be build in, which means it has to be there at build time. I think it should be a makedepend, and the Arch configuration should just support it out of the box. This is consistent with the way many many other packages that optionally have Lua support handle are handled. Would you mind if I flip that around like that?

alerque commented on 2020-02-26 10:25 (UTC)

Thanks for the add @nkukard. I've also added you to pjproject as it is the only other required dependency for this that is in the AUR. That way any future absence I make have won't hold up updates to this package ;-)

alerque commented on 2020-02-22 06:10 (UTC) (edited on 2020-02-22 06:34 (UTC) by alerque)

PSA: I've started hosting this and all its dependencies as prebuilt packages (x86_86 only) in my repository for those that want to install them using pacman without messing around with building from the AUR.

alerque commented on 2020-02-22 05:44 (UTC)

@nkukard Would you consider adding me as a co-maintainer on this. I was the maintainer at some point until a period of extended travel where I wasn't around to bump it got it orphaned. I am the maintainer of pjproject (which this depends on) and I would now like to start hosting prebuild x86_64 packages for asterisk in my package repository. It would be nice to be able to bump this and fix issue without having to keep a fork around and possibly having miss-matches between the version in my repository and the AUR.

nkukard commented on 2020-01-23 05:28 (UTC)

@isundil, can you perhaps post the error you're getting?

isundil commented on 2020-01-22 13:18 (UTC)


There is a missing dependency reference to community/bcg729

GNUtoo commented on 2019-06-22 20:23 (UTC)


Here's a patch:


From 0b8eb034c73e858af14db5b9b3dd28da9114bd6d Mon Sep 17 00:00:00 2001
From: Denis 'GNUtoo' Carikli
Date: Tue, 8 Jan 2019 16:00:50 +0100
Subject: [PATCH] Fix most illegal instructions when shipping asterisk.

While this works in AUR, because users are building the PKGBUILD, distributions wanting to use this PKGBUILD as-is and ship packages produced with it will result in illegal instructions at runtime.

Without that fix, if you build this packages on a machine with a processor that supports avx (Advanced Vector Extensions), ended up with vpxor instructions that were also executed on machines with a processor that did not have such extension, which resulted in an illegal instruction at asterisk startup if the machine running it didn't have AVX.

Though for some reason, with this patch, building asterisk on a machine with avx still results in having one vpxor instruction.

Hopefully even with that, asterisk can still start on machines that do not have AVX.

To fix most illegal instructions: - Native builds were disabled by using the ChangeLog documentation: "Those who need different -march= values, please, go for ./configure make menuselect.makeopts or make menuselect ./menuselect/menuselect --disable BUILD_NATIVE" - The build configuration was changed to use an external pjproject library. The AUR PKGBUILD for pjproject also had several fixes to prevent it from causing illegal instructions.

On x86_64 I verified that most asterisk ELF files did not have vpxor instructions anymore with: $ pacman -Q -l asterisk | \ awk '{print $2}' | xargs file | grep ELF | \ sed 's#:.*##' | xargs objdump -D | grep vpxor

Signed-off-by: Denis 'GNUtoo' Carikli

PKGBUILD | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD index d2fa84e..037bdcd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,10 +3,11 @@ # Contributor: Xavier Devlamynck # Contributor: Alessio Biancalana # Contributor: Maik Broemme +# Contributor: Denis 'GNUtoo' Carikli

pkgname=asterisk pkgver=16.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="A complete PBX solution" arch=('i686' 'x86_64' 'aarch64' 'armv7h') backup=('etc/asterisk/acl.conf' @@ -120,7 +121,7 @@ backup=('etc/asterisk/acl.conf' 'etc/asterisk/xmpp.conf') url='' license=('GPL') -depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'opus' 'libedit') +depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'opus' 'libedit' 'pjproject') makedepends=('sqlite3' 'gsm') optdepends=('lua51' 'libsrtp' 'postgresql' 'unixodbc' 'libpri' 'libss7' 'openr2' 'iksemel' 'radiusclient-ng' 'dahdi') install=${pkgname}.install @@ -135,7 +136,9 @@ sha256sums=('d870711299089d0b1f01708534b0e139c4e83d828cbb79dfc90ec59774be83fa'

build() { cd ${pkgname}-${pkgver} - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin --with-pjproject-bundled=no + make menuselect.makeopts + ./menuselect/menuselect --disable BUILD_NATIVE make }

-- 2.21.0

DragonX256 commented on 2019-03-31 13:42 (UTC)

@tigran pkgconf lies in base-devel group. You should have installed this group in order to build packages from AUR.

tigran commented on 2019-03-30 20:36 (UTC)

A weird error in build macros: it gives message demanding libedit, while really it needs pkgconf.

You get that "please install libedit development package" configure message, you install it, and still keep getting the same message each time you try to build *, and you get driven crazy.

Just installing pkgconf sets the things.

DragonX256 commented on 2019-02-20 13:22 (UTC)

@emersonjr @Thulinma I've tested 16.2.0 building in clean chroot. pjproject builts correct, and there's no dependency on uriparser for asterisk.

Thulinma commented on 2019-02-19 10:09 (UTC)

Hi! It looks like "uriparser" is an unlisted dependency.

emersonjr commented on 2019-01-31 15:22 (UTC) (edited on 2019-01-31 15:26 (UTC) by emersonjr)

Just insert the following command sed -i 's/,5,/,10,/g' third-party/Makefile.rules into PKGBUILD above the ./configure ... line, which succesfully corrects the problem.

The file should now be like below:

build() {
  cd ${pkgname}-${pkgver}
  sed -i 's/,5,/,10,/g' third-party/Makefile.rules
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin

Please @DragonX256 do the amendments

emersonjr commented on 2019-01-30 16:38 (UTC)

It seems there's problem again with pjproject 2.8

checking for RAII support... checking for gcc -fnested-functions... no
checking for clang strsep/strcmp optimization... no
checking for embedded pjproject (may have to download)... configuring
[pjproject]  Downloading to /tmp/pjproject-2.8.tar.bz2
[pjproject]  Retrying download
[pjproject]  Downloading to /tmp/pjproject-2.8.tar.bz2
make: *** [Makefile:90: /tmp/pjproject-2.8.tar.bz2] Error 4
make: *** Deleting file '/tmp/pjproject-2.8.tar.bz2'
configure: Unable to configure third-party/pjproject
configure: error: Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.
==> ERRO: Uma falha ocorreu em build().

How can it be solved?

DragonX256 commented on 2018-12-29 11:12 (UTC)

Fixed problems which were described by @jeremyvisser.

nimbius commented on 2018-12-21 15:48 (UTC)

the systemd service type for asterisk needs to be changed to basic. notify type causes errors when executing the dialplan application System() with bash redirections, or dialplan variables.

in addition, executed System() calls can report success when unable to create a file on the system.

jeremyvisser commented on 2018-12-19 11:07 (UTC) (edited on 2018-12-19 11:08 (UTC) by jeremyvisser)

When I try to install the package, I get these errors:

chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ error: command failed to execute correctly

I suspect this is because the post-install script is executed before the sysusers.d configuration is loaded.

Also, I noticed the post-remove script does a "killall -q asterisk". However, it's possible to get Asterisk to spawn subprocesses, so it would be better to do a "systemctl stop asterisk.service" in the post-remove script instead.

br3schweiz commented on 2018-10-29 21:50 (UTC) (edited on 2018-10-30 09:52 (UTC) by br3schweiz)

if you sideloaded opus-support from Digium, remember to update it too. Otherwise you'll get a segfault and won't be able to start asterisk again (what, for whatever reason doesn't happen with 16.0.0-rc3)...

post-factum commented on 2018-10-09 18:44 (UTC)

FYI, starting from 16.0.0 Asterisk requires libedit.

post-factum commented on 2018-09-08 15:31 (UTC)

systemd .service file can be used from the contrib folder now. Also, I'm not sure why termcap is needed.

Next, it seems, it won't work with pjproject v2.8, so it would be better to switch to bundled one.

Also, consider using sysusers feature to avoid creating users manually in the post-inst hook.

linuxuserarch commented on 2018-09-06 20:55 (UTC)

Since supports TLS, might be sensible to switch PKGBUILD source to "${pkgname}-${pkgver}.tar.gz".

alerque commented on 2018-02-28 07:29 (UTC) (edited on 2018-02-28 07:31 (UTC) by alerque)

That's an interesting idea @bberlin, if I'd manually compiled it at some point and left scraps on the system I could see that happening, but I've tested this on systems that didn't have asterisk and wouldn't have ever had libsrtp and am getting the same results.

Here is from my production Asterisk server:

❯❯❯ find /usr/lib -iname '*srtp*' -exec pacman -Qo {} \;
/usr/lib/libsrtp2.a is owned by libsrtp 1:2.1.0-1
/usr/lib/ is owned by libsrtp 1:2.1.0-1
/usr/lib/pkgconfig/libsrtp2.pc is owned by libsrtp 1:2.1.0-1
/usr/lib/ is owned by libsrtp 1:2.1.0-1
/usr/lib/asterisk/modules/ is owned by asterisk 15.2.0-1

I don't see anything amiss there do you?

bberlin commented on 2018-02-15 12:31 (UTC)

@caleb, it is possible to have both versions of libsrtp installed, the latest gets installed as libsrtp2. Check /usr/lib and see if you have both. You may already have the older one from something else.

alerque commented on 2018-02-15 10:06 (UTC)

@bberline Thanks for responding, but I'm more mystified than before. I have not tried with libsrtp0 because none of the errors I'm getting seem to be related to that at all, but I have libsrtp-1:2.1.0-1 (from the extra repo, I'm assuming this is also the one that doesn't work for you) and that does work for me. Also I've tried with and without bcg729.

bberlin commented on 2018-02-14 21:28 (UTC)

@caleb, I was able to get it to compile with your argument after installing libsrtp0 from AUR. Looks like it wants libsrtp version 1.x on there like @albertvaka says and doesn't need the latest 1:2.1.0. I hadn't noticed his comment before. I have pjproject 2.7.1-1 like you and I do not have bcg729 installed, not sure why you wouldn't be able to compile the other way.

alerque commented on 2018-02-14 19:41 (UTC)

@bberlin and @d9jWbb42kC3 just a thought, what versions of pjproject do you have installed when you tried and failed to build the way I have this packaged? Maybe a version needs to be added to that dependency. I've got pjproject 2.7.1-1 out of the current AUR.

alerque commented on 2018-02-14 09:30 (UTC) (edited on 2018-02-14 09:33 (UTC) by alerque)

@bberlin and @d9jWbb42kC3 I am following your comments but unsure what to do here. I have tried and tried again to compile this package without that flag and can't do it across any of my 4 systems. I get this error:

   [LD] abstract_jb.o acl.o adsi.o alaw.o alertpipe.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o astobj2_container.o astobj2_hash.o astobj2_rbtree.o audiohook.o autochan.o autoservice.o backtrace.o bridge.o bridge_after.o bridge_basic.o bridge_channel.o bridge_roles.o bucket.o callerid.o ccss.o cdr.o cel.o channel.o channel_internal_api.o chanvars.o cli.o codec.o codec_builtin.o config.o config_options.o conversions.o core_local.o core_unreal.o crypt.o datastore.o db.o devicestate.o dial.o dns.o dns_core.o dns_naptr.o dns_query_set.o dns_recurring.o dns_srv.o dns_system_resolver.o dns_test.o dns_tlsa.o dnsmgr.o dsp.o endpoints.o enum.o event.o features.o features_config.o file.o fixedjitterbuf.o format.o format_cache.o format_cap.o format_compatibility.o frame.o framehook.o fskmodem.o global_datastores.o hashtab.o heap.o http.o image.o indications.o io.o iostream.o jitterbuf.o json.o loader.o lock.o logger.o manager.o manager_bridges.o manager_channels.o manager_endpoints.o  manager_mwi.o manager_system.o max_forwards.o md5.o media_cache.o media_index.o message.o mixmonitor.o named_acl.o named_locks.o netsock.o netsock2.o optional_api.o parking.o pbx.o pbx_app.o pbx_builtins.o pbx_functions.o pbx_hangup_handler.o pbx_ignorepat.o pbx_include.o pbx_sw.o pbx_switch.o pbx_timing.o pbx_variables.o pickup.o plc.o poll.o presencestate.o privacy.o rtp_engine.o say.o sched.o sdp.o sdp_options.o sdp_srtp.o sdp_state.o sdp_translator.o security_events.o sem.o sha1.o sip_api.o slinfactory.o smoother.o sorcery.o sounds_index.o srv.o stasis.o stasis_bridges.o stasis_cache.o stasis_cache_pattern.o stasis_channels.o stasis_endpoints.o stasis_message.o stasis_message_router.o stasis_system.o stdtime/localtime.o strcompat.o stream.o stringfields.o strings.o stun.o syslog.o taskprocessor.o tcptls.o tdd.o term.o test.o threadpool.o threadstorage.o timing.o translate.o udptl.o ulaw.o uri.o utils.o uuid.o version.o xml.o xmldoc.o  -> asterisk
./ undefined reference to `initBcg729EncoderChannel' 
./ undefined reference to `bcg729Decoder'
./ undefined reference to `bcg729Encoder'
./ undefined reference to `initBcg729DecoderChannel'
./ undefined reference to `closeBcg729EncoderChannel'
./ undefined reference to `closeBcg729DecoderChannel'

I have the same version of libsrtp as you do, and I've tried it with and without the AUR packages for bcg729 and pjproject.

Any ideas on what other packages or system configs might be playing into this? Perhaps we should be comparing full outputs from ./configure?

bberlin commented on 2018-02-14 01:25 (UTC)

Same exact situation as @d9jWbb42kC3 with libsrtp 1:2.1.0-1. Also took out --without-pjproject-bundled to get it to compile.

d9jWbb42kC3 commented on 2018-02-14 00:31 (UTC) (edited on 2018-02-14 00:32 (UTC) by d9jWbb42kC3)

   [CC] pjsip/dialplan_functions.c -> pjsip/dialplan_functions.o
   [CC] pjsip/cli_commands.c -> pjsip/cli_commands.o
   [LD] chan_pjsip.o pjsip/dialplan_functions.o pjsip/cli_commands.o ->
/usr/bin/ld: cannot find -lsrtp
collect2: error: ld returned 1 exit status
make[1]: *** [/build/yaourt-tmp-admin/aur-asterisk/src/asterisk-15.2.0/Makefile.rules:178:] Error 1
make: *** [Makefile:377: channels] Error 2
==> ERROR: A failure occurred in build().
==> ERROR: Makepkg was unable to build asterisk.

If I compile asterisk without flag --without-pjproject-bundled, everything is ok. Installed extra/libsrtp is 1:2.1.0-1. Arch: x86_64

alerque commented on 2018-02-13 12:10 (UTC) (edited on 2018-02-13 12:10 (UTC) by alerque)

I've successfully compiled 15.2 for my systems, but only with something that looks like a regression in packaging. I'm not sure it's actually a bad thing or not, but it's the only way I can get 15.2 up and running. I added pjproject back to the dependency list and compiled with --without-pjproject-bundled.

If anybody has a problem with this arrangement and/or knows why the internal version throws bcg729 errors when compiling then I'm happy to hear it.

alerque commented on 2018-02-11 15:21 (UTC)

@albertvaka Could you contact me with any more details on how you got this to work. I have a production phone system that's offline with a broken asterisk install and am trying to get this fixed up. I also just adopted this package and will try to get it working better for everybody. I updated it to the last version, but I'm getting compile time errors ... the error you link to I get with 15.1.x, but on 15.2.x I'm seeing a different problem related to pj and/or bcg729. I'd be interested in hearing about what worked for you, either here, via email or if you want to collaborate I just mirrored this to Github:

albertvaka commented on 2018-02-06 05:18 (UTC)

The current version only builds with libsrtp version 1.

If you have the latest libsrtp installed, it fails with this:

aztec102 commented on 2017-11-02 16:09 (UTC)

{standard input}: Assembler messages: {standard input}: Fatal error: can't write 159 bytes to section .debug_macro of sip/route.o because: 'No space left on device' {standard input}: Fatal error: can't close sip/route.o: No space left on device

xdevla commented on 2017-10-09 11:48 (UTC)

Was on my todo to remove it. Might be something wrong on my side but I still get the same build error as in 14.x when using internal libedit.

johny77 commented on 2017-10-09 11:07 (UTC)

Could You please remove dependency for "pjproject" as it is bundled since ver.15. And also remove "termcap" and use "--with-libedit=internal".

oksijun commented on 2017-08-07 13:19 (UTC)

Could you please add the following patch: Without it, psjip modules fail to load with the following errors : > WARNING[7405] loader.c: Error loading module '': /usr/lib/asterisk/modules/ undefined symbol: ast_sip_get_contact_status_label > WARNING[7405] loader.c: Error loading module '': /usr/lib/asterisk/modules/ undefined symbol: ast_sip_unregister_authenticator > WARNING[7405] loader.c: Error loading module '': /usr/lib/asterisk/modules/ undefined symbol: ast_sip_presence_xml_create_node > WARNING[7405] loader.c: Error loading module '': /usr/lib/asterisk/modules/ undefined symbol: ast_sip_get_sorcery [...] More information here:

rakotomandimby commented on 2017-07-25 17:02 (UTC)

I had to install (AUR) "termcap" and comment out the ./configure option "--with-libedit=internal" within PKGBUILD to make it compile.

7FW84 commented on 2017-05-01 18:53 (UTC)

Thanks, @Drazi! This worked for me.

Drazi commented on 2017-05-01 17:31 (UTC) (edited on 2017-05-01 17:32 (UTC) by Drazi)

Asterisk 14.4.0 works. I changed the pkgver to 14.4.0 and pkgrel to 0 in the PKGBUILD, and was able to build and install. Also needed to disable integrity checking, makepkg --skipinteg

7FW84 commented on 2017-04-27 07:52 (UTC)

Hi, asterisk is not compiling on my machine anymore. It fails with with the following error: > Generating embedded module rules ... > [CC] tcptls.c -> tcptls.o > tcptls.c: In function ‘tcptls_stream_close’: > tcptls.c:405:20: error: dereferencing pointer to incomplete type ‘SSL {aka struct ssl_st}’ > if (!stream->ssl->server) { Is suppose this is due to the recent change of the openssl-libraries.

Ami commented on 2017-03-12 11:44 (UTC)

Hello. On my machine, the makepg failed to link the Asterisk with complain "undefined reference to `tgoto'". After commenting-out the ./configure option "--with-libedit=internal" within PKGBUILD, the package was succesfully created. Maybe someone can find it useful.

johny77 commented on 2016-10-28 06:55 (UTC)

If You are using pjsip stack and have a problem with asterisk which is falling down when somebody want to make a call on unregistered phone, then do a downgrade of pjproject package form 2.5.5 to 2.5.1. I found out that version 2.5.5 has a horrible bug which will be solved in next release.

das-ich commented on 2016-08-24 08:02 (UTC)

please add arch='armv7h' to PKGBUILD

johny77 commented on 2016-04-02 21:01 (UTC)

@chetwisniewski: the problem with compilation has simple solution. You have to rebuild pjproject package in your system.

chetwisniewski commented on 2016-03-07 19:41 (UTC)

Fails to build with the following error: res_pjsip/pjsip_distributor.c: In function ‘find_request_serializer’: res_pjsip/pjsip_distributor.c:114:21: error: ‘pjsip_transaction {aka struct pjsip_transaction}’ has no member named ‘mutex’ pj_mutex_unlock(tsx->mutex); ^ res_pjsip/pjsip_distributor.c: In function ‘find_dialog’: res_pjsip/pjsip_distributor.c:230:21: error: ‘pjsip_transaction {aka struct pjsip_transaction}’ has no member named ‘mutex’ pj_mutex_unlock(tsx->mutex);

seberm commented on 2015-11-06 23:25 (UTC)

@Aleksandrs: just note: When you enable mp3 support with: $ ./contrib/scripts/ ... 'svn' should be in makedepends array: makedepends=('sqlite3' 'gsm' 'svn')

dpunkt commented on 2015-10-28 21:52 (UTC)

@xdevla: The File "pjsip_wizard.conf" should not be overwritten during a update. Please add it to the list of files to backup.

mbroemme commented on 2015-10-05 01:19 (UTC) (edited on 2015-10-05 09:53 (UTC) by mbroemme)

@xdevla: What happened to module After building 13.5.0 it is no longer included? You can ignore it as I forgot to install DAHDI before compilation. :)

Aleksandrs commented on 2015-09-07 17:14 (UTC)

## Adding some function to the PKGBUILD ## If needed MP3 support uncomment MP3 build() { cd ${srcdir}/${pkgname}-${pkgver} ./ ## Generating asterisk config it's needed for patch opus/vp8 ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin ## MP3 support ##./contrib/scripts/ make menuselect ## This line gives asterisk menu make } ## If needed Opus/VP8 support ## download Asterisk Opus/VP8 patch ## URL:

nofxx commented on 2015-08-07 18:29 (UTC)

==> Making package: asterisk 13.4.0-1 /tmp/yaourt-tmp-nofxx/aur-asterisk/./PKGBUILD: line 135: /tmp/yaourt-tmp-nofxx/aur-asterisk/src/gcc5.patch: No such file or directory Thanks for the package!

xdevla commented on 2015-06-08 07:13 (UTC)

Will wait till 13.4.0 is out.

robertoaall commented on 2015-06-07 15:43 (UTC)

I've been having this problem for more than a week now. Thanks for sharing the solution DrTph. I would suggest that the maintainer updated the PKGBUILD according to the 13.4.0-rc1 version. I had to add the -rc1 manually to the PKGBUILD as it's not possible to add '-' to the pkgver variable. Any fix for that? Also, the SHA256 of 13.4.0-rc1 is 'a202ba2e426e4ae062a189d9b133fe57b5491d5046ec5facf5fbbbdc8ea549f2'. Here is my edited PKGBUILD (

erichowey commented on 2015-05-31 23:41 (UTC)

The asterisk.service file needs to be updated. Asterisk will need to be ended from the CLI at times. A good example of this would be using the "core stop gracefully" command. Systemd will automatically relaunch Asterisk even when a desired stop is invoked. Here's a better safe_asterisk emulation: # safe_asterisk emulation Restart=on-failure RestartSec=10 RestartPreventExitStatus=0

DrTph commented on 2015-05-29 20:08 (UTC)

I had problems building this, getting "recipe for target 'channels' failed" and such. This is a known issue in asterisk 13.3.2 and earlier relating to gcc 5.0. See This is fixed in 13.4.0-rc1, which built fine for me after updating PKGBUILD.

calzon65 commented on 2015-02-08 21:14 (UTC)

Looks like version 13.2 is now available, thanks again magicrhesus for this great project :)

xdevla commented on 2014-07-17 09:27 (UTC)

Updated, thanks for the heads up

calzon65 commented on 2014-07-16 18:08 (UTC)

There have been several improvements made to Asterisk over the past two months, Asterisk 12.4.0 is now released. Please update the PKGBUILD to version 12.4.0, the sha256 is '6c72d0060d1ce7a7d09f510d91d588f269aac0032de6a4464d5449b0d5600a72'

calzon65 commented on 2014-07-05 21:10 (UTC)

Both libxslt and pjproject are required for runtime (ArchLinux ARM). Please update PKGBUILD to reflect the correct dependencies depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'pjproject') makedepends=('sqlite3' 'gsm' 'pjproject' 'libxslt')

adlerweb commented on 2014-06-24 08:13 (UTC)

libxslt is also needed on runtime, not only for make, otherwise it will not start (x86_64)

whiskerz007 commented on 2014-05-21 11:38 (UTC)

After install a base install of Arch, compiling Asterisk 12.2.0, then running Asterisk in the console, there was an error complaining about not having XSLT support. After installing libxslt from the extra repo, performing another makepkg, and installing the package, the error went away. I strongly suggest that you add libxslt to the dependencies.

commented on 2014-04-28 15:25 (UTC)

2014-04-23 Asterisk Development Team <> * Asterisk 12.2.0 Released.

manterola commented on 2014-04-07 23:47 (UTC)

Hello, I am trying to use and config asterisk 12.1.0-2, but and are not included in the current package. Maybe I am doing something wrong, but I tried to install asterisk-lts instead but pacman cannot find it. BTW, My arch linux is running on a Pogoplug Linux alarm 3.13.6-1-ARCH #1 PREEMPT Sat Mar 8 02:06:17 MST 2014 armv5tel GNU/Linux. Thanks, Mauro

xdevla commented on 2014-02-25 10:02 (UTC)

I just rebuilt it without any issue with an up-to-date system. Try to build it without yaourt.

bparker commented on 2014-02-25 05:02 (UTC)

I'm not able to build this package with a latest up-to-date system: [LD] cdr_manager.o -> collect2: error: ld returned 1 exit status /tmp/yaourt-tmp-bp/aur-asterisk/src/asterisk-12.0.0/Makefile.rules:134: recipe for target '' failed make[1]: *** [] Error 1 Makefile:380: recipe for target 'cdr' failed make: *** [cdr] Error 2 I cannot figure out how to get it to show more verbose information, I tried make V=1, V=99, VERBOSE=1, etc etc., nothing helps. Ideas?

freswa commented on 2014-02-10 20:14 (UTC)

And jansson too....

mfyahya commented on 2014-02-08 18:38 (UTC)

libxml2 should be added as dependency configure: *** XML documentation will not be available because the 'libxml2' development package is missing. configure: *** Please run the 'configure' script with the '--disable-xmldoc' parameter option configure: *** or install the 'libxml2' development package.

encbladexp commented on 2013-11-29 08:21 (UTC)

Should also depends on "gsm" Package, because some Providers make only GSM with SIP :/

luismanolo commented on 2013-11-13 15:32 (UTC)

And dont work... sorry

luismanolo commented on 2013-11-13 14:03 (UTC)

Im installing it on raspberry pi, and this my method: 1) install libxml2 2) change PKGBUILD with arch=('armv6h') thanks for your work, and sorry about my english.

privong commented on 2013-10-12 23:56 (UTC)

Accidentally flagged out of date. Missed that the 11.6 was just a release candidate, not a final version. Sorry about that.

commented on 2013-09-18 15:30 (UTC)

Thank you very much for accepting my request.

commented on 2013-09-15 18:18 (UTC)

Dear Sir, please add /etc/asterisk/extensions.lua to backup files, and lua51 and libsrtp to optional dependencies. Also - if I am correct - neither postgresql nor unixodbc is required so, if I may, I would suggest moving them to optional dependencies. Thank you for your attention.

xdevla commented on 2013-08-22 11:07 (UTC)

Should be ok now. Thanks for the fix.

mbroemme commented on 2013-08-19 13:30 (UTC)

There is a bug in this package which result in wrong behavior after reboot of the server because /run is on tmpfs and cleaned-up during reboot. Can you please add the following to PKGBUILD in package() section: install -D -m 644 ${srcdir}/asterisk.conf ${pkgdir}/usr/lib/tmpfiles.d/asterisk.conf The 'asterisk.conf' should have the following content: d /run/asterisk 0755 asterisk asterisk -

JoKoT3 commented on 2013-06-25 17:29 (UTC)

There is a typo in systemd file : [/usr/lib/systemd/system/asterisk.service:3] Unknown lvalue 'Documentationm' in section 'Unit'

commented on 2013-06-16 03:42 (UTC)

there's a bug in the 11.4.0-3 version: they said its fixed but i got the same issue.

xdevla commented on 2013-06-04 15:30 (UTC)

Updated to last version Added a systemd unit file Support for backup files Fixed /sbin -> /usr/bin Fixed /var/run -> /run

xdevla commented on 2013-05-28 12:06 (UTC)

@rpodgorny It'll be fixed at some point, a bit busy these days

rpodgorny commented on 2013-05-28 11:50 (UTC)

please, either fix or orphan this package. thank you...

tritron commented on 2013-05-26 15:53 (UTC)

can you pleas add this patch to asterisk src and can you add make menuselect

rpodgorny commented on 2013-05-16 21:48 (UTC)

...experiencing the same thing as call-151: +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ ==> Entering fakeroot environment... ==> Starting package()... Installing modules from pbx... Installing modules from channels... Installing modules from codecs... Installing modules from apps... Installing modules from cdr... Installing modules from cel... Installing modules from formats... Installing modules from bridges... Installing modules from tests... Installing modules from funcs... Installing modules from addons... make[2]: warning: -jN forced in submake: disabling jobserver mode. Installing modules from main... make[1]: Entering directory `/home/radek/pkgbuilds-old/asterisk/src/asterisk-11.3.0' make[3]: warning: -jN forced in submake: disabling jobserver mode. .pjlib-x86_64-unknown-linux-gnu.depend:605: *** missing separator. Stop. make[4]: *** [depend] Error 2 make[3]: *** [dep] Error 1 make[2]: *** [pjproject] Error 2 make[1]: *** [res] Error 2 make[1]: Leaving directory `/home/radek/pkgbuilds-old/asterisk/src/asterisk-11.3.0' make: *** [_cleantest_all] Error 2 make: *** Waiting for unfinished jobs.... make[2]: warning: -jN forced in submake: disabling jobserver mode. Installing modules from res... ==> ERROR: A failure occurred in package(). Aborting... ...x86_64 system here.

pedosb commented on 2013-04-09 18:18 (UTC)

For my system there was a typo in the PKGBUILD. Here is the diff. $ diff asterisk/PKGBUILD asterisk-mine/PKGBUILD 36c36 < sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf --- > sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/asterisk/etc/asterisk/asterisk.conf

cbuehler commented on 2013-04-06 10:06 (UTC)

This should be updated to use systemd instead of rc.d: $/etc/rc.d/asterisk start /etc/rc.d/asterisk: line 4: /etc/rc.conf: No such file or directory /etc/rc.d/asterisk: line 5: /etc/rc.d/functions: No such file or directory /etc/rc.d/asterisk: line 10: stat_busy: command not found /etc/rc.d/asterisk: line 13: stat_fail: command not found

net147 commented on 2013-04-06 02:34 (UTC)

I have disowned asterisk16, dahdi, dahdi-tools if you would like to adopt them as I don't use them anymore.

itsjapie commented on 2013-04-05 13:05 (UTC)

The following PKGBUILD works for me (version bump to 11.4.0-rc1) # Contributor: Alessio Biancalana <> pkgname=asterisk pkgver=11.4.0_rc1 _realpkgver=${pkgver/_/-} pkgrel=1 pkgdesc="A complete PBX solution" arch=('i686' 'x86_64') url="" license=('GPL') depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl') makedepends=('postgresql' 'unixodbc' 'sqlite3') optdepends=('libpri' 'libss7' 'openr2' 'iksemel') backup=(etc/asterisk/asterisk.conf) source=($_realpkgver.tar.gz \ asterisk \ asterisk.logrotated) install=$pkgname.install md5sums=('51c8a95d1e0c5af162ad146b6eaf274c' '59146273738605f1e011d8e7bed3561a' '486e07a0a1405ea25ec5b1736034653e') build() { cd ${srcdir}/${pkgname}-${_realpkgver} ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var make || return 1 } package(){ cd ${srcdir}/${pkgname}-${_realpkgver} make DESTDIR=${pkgdir} install make DESTDIR=${pkgdir} samples (cd ${pkgdir}/etc/asterisk # for i in `ls`; do [ $i = "asterisk.conf" ] || mv $i $i.default; done ls -I asterisk.conf | xargs -I '{}' mv '{}' '{}.default') # cp ${srcdir}/modules.conf modules.conf sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/asterisk/etc/asterisk/asterisk.conf install -D -m 755 ${srcdir}/asterisk ${pkgdir}/etc/rc.d/asterisk install -D -m 644 ${srcdir}/asterisk.logrotated ${pkgdir}/etc/logrotate.d/asterisk }

commented on 2013-03-31 14:42 (UTC)

Think you have a similar error as this one ¨pjlib-test-x86_64-unknown-linux-gnu.depend:484: *** missing separator. Stop¨ This should be related to ¨make -jN". See However, it seems that /tmp/yaourt/aur-asterisk/src/asterisk-11.3.0/res/Makefile already has alread been patched. So not sure what else needs to be done? Dottorblaster, might be worth taking a look at the Asterisk forum as there are similar compile issues to investigate this further.

commented on 2013-03-29 00:41 (UTC)

Updated. Let me know if it builds correctly, I'm still getting an error about separators but I suspect about my machine bug.

commented on 2013-03-29 00:36 (UTC)

Trying to build 11.3.0 but getting errors. I'll inform you ASAP.

moonman commented on 2013-03-08 05:00 (UTC)

I have made PKGBUILD that incldes service file, tmpfiles and gsm. It is for arm, but just change arch=('arm') to arch=('i686' 'x86_64').

encbladexp commented on 2013-03-08 04:14 (UTC)

You should depend on "gsm" also, because some ISPs only speak gsm ;-)

aalexanderr commented on 2013-03-04 23:12 (UTC)

Provide log.

lutoma commented on 2013-03-04 22:19 (UTC)

I'm getting »./configure: line 47559: 2*10000+10*100+9 ((major<<24)|(minor<<16)|build) >=: syntax error in expression (error token is "((major<<24)|(minor<<16)|build) >=")« during build().

aalexanderr commented on 2013-03-03 20:20 (UTC)

I try both service - oneshot and simple. It's doesn't matter: after i correctly reboot server, asterisk can't register on ext provider. Even if use safe_asterisk. I think it's doesn't work correctly coz i use dhcpd to get ip. request to register send before i get dynamic ip so it's never become registered..

JoKoT3 commented on 2013-02-28 16:07 (UTC)

Shouldn't you use safe_asterisk in ExecStart (with type oneshot) ? It provides a watchdog that restarts asterisk on nonzero exit, and sets some limits (which this service file does not do)

aalexanderr commented on 2013-02-26 16:13 (UTC)

Yes, sorry it's my fault. But i just rewrite start script like this: [Unit] Description=Asterisk PBX and telephony daemon. [Service] Type=simple RemainAfterExit=yes Environment=HOME=/var/lib/asterisk WorkingDirectory=/var/lib/asterisk ExecStart=/usr/sbin/asterisk -U asterisk -G asterisk -C /etc/asterisk/asterisk.conf ExecStop=/usr/sbin/asterisk -rx 'core stop now' ExecReload=/usr/sbin/asterisk -rx 'core reload' [Install] Now it's normal start, but "sip show registry" show me what channels in "Request Sent" state.. If i kill asterisk and start it once again channel state become registered. Can't understand why, but after i change: Type=oneshot and add ExecStart=/usr/bin/sleep 10 all become to normal start.. it's seems like asterisk try to send information via socket before network finaly initialization....

johny77 commented on 2013-02-26 13:17 (UTC)

AFAIK directory /var/run is linked to /run and is dynamic. that is all.

aalexanderr commented on 2013-02-26 12:35 (UTC)

Why you think so ? System doesn't not delete or recreate folder with other rights. So you just need setup by hands new owner to folder /var/run/asterisk и фсё.

johny77 commented on 2013-02-26 06:30 (UTC)

But after reboot your changes will be lost. So, You will need to change the permissions by another way. You need to create a new file: /etc/tmpfiles.d/asterisk.conf with this content: d /run/asterisk 0775 root asterisk

aalexanderr commented on 2013-02-25 23:02 (UTC)

You also need to make: chmod asterisk:asterik /var/run/asterisk or asterisk with User and Group asterisk never create and asterisk.ctl and you can't correctly run it, connect to console and user ExecStop/ExecReload options. May be it's only my trouble, but in my system /var/run/asterisk was chown by root:root.

johny77 commented on 2013-02-21 09:32 (UTC)

You will also need to add: RemainAfterExit=yes otherwise process will be killed by systemd. ---------------------------------------------- [Unit] Description=Asterisk PBX and telephony daemon. [Service] Type=simple RemainAfterExit=yes Environment=HOME=/var/lib/asterisk WorkingDirectory=/var/lib/asterisk User=asterisk Group=asterisk PIDFile=/run/asterisk/ ExecStart=/usr/sbin/asterisk -C /etc/asterisk/asterisk.conf ExecStop=/usr/sbin/asterisk -rx 'core stop now' ExecReload=/usr/sbin/asterisk -rx 'core reload' PrivateTmp=true [Install]

Cinelli commented on 2013-02-17 16:57 (UTC)

[Unit] Description=Asterisk PBX and telephony daemon. [Service] Type=simple Environment=HOME=/var/lib/asterisk WorkingDirectory=/var/lib/asterisk PIDFile=/run/asterisk/ ExecStart=/usr/sbin/asterisk -C /etc/asterisk/asterisk.conf ExecStop=/usr/sbin/asterisk -rx 'core stop now' ExecReload=/usr/sbin/asterisk -rx 'core reload' PrivateTmp=true [Install] this service unit should work.

PieterDeBruijn commented on 2013-01-23 05:56 (UTC)

11.2.1 has been released

PieterDeBruijn commented on 2013-01-03 06:55 (UTC)

11.1.1 Has been released. This is a security release:

ticpu commented on 2012-12-19 02:43 (UTC)

It should depend on iksemel so that xmpp and motif (gtalk/gvoice) support is enabled.

PieterDeBruijn commented on 2012-12-18 09:39 (UTC)

11.1.0 Has been released. This is a mayor bugfix release:

PieterDeBruijn commented on 2012-12-07 14:49 (UTC)

11.0.2 released. Single bug fix, don't know if it's really of any use: "chan_local: Fix local_pvt ref leak in local_devicestate(). Regression introduced by ASTERISK-20390 fix. (closes issue ASTERISK-20769)"

tredaelli commented on 2012-12-04 17:36 (UTC)

Please change that line sed -i -e "s/\/var\/run/\/var\/run\/asterisk/" $startdir/pkg/etc/asterisk/asterisk.conf

chetwisniewski commented on 2012-11-25 04:53 (UTC)

A refined service file for systemd users: [Unit] Description=Asterisk PBX and telephony daemon. [Service] Type=simple Environment=HOME=/var/lib/asterisk WorkingDirectory=/var/lib/asterisk User=asterisk Group=asterisk PIDFile=/run/asterisk/ ExecStart=/usr/sbin/asterisk -C /etc/asterisk/asterisk.conf ExecStop=/usr/sbin/asterisk -rx 'core stop now' ExecReload=/usr/sbin/asterisk -rx 'core reload' PrivateTmp=true [Install]

chetwisniewski commented on 2012-11-25 02:45 (UTC)

/etc/tmpfiles.d/asterisk: D /run/asterisk 755 - - -

PieterDeBruijn commented on 2012-11-14 11:39 (UTC)

Asterisk 11.0.1 has also been released:

fernando_ccs17 commented on 2012-10-26 13:44 (UTC)

Asterisk 11 is out !

gdamjan commented on 2012-10-19 08:55 (UTC)

Does anyone know, how to modify the PKGBUILD to enable the chan_mobile module? It comes bundled with Asterisk, but is not built by default.

commented on 2012-10-16 02:42 (UTC)

A systemd asterisk.service and tmpfiles.d/asterisk.conf should be added to work with systemd

fernando_ccs17 commented on 2012-09-01 12:55 (UTC)

Since there isn't BETA or ALPHA flag on it, i don't think it's unstable.

chetwisniewski commented on 2012-05-20 19:40 (UTC)

The current release 10.4.0 seems to fix a lot of issue with this package. I got this one to work, but Caller ID and a lot of other things were wonky. I modified the PKGBUILD to 10.4.0 and replaced the first MD5 sum with 9bd47fa42c998e290af4e3ef1275ab5a . Works much better, Caller ID is fixed, etc.

sp1d3rmxn commented on 2012-04-17 13:37 (UTC)

This is a highly UNSTABLE version of Asterisk. Should not even be packaged for use since it changes so frequently and (drum roll) isn't STABLE!!

xdevla commented on 2011-12-19 10:16 (UTC)

asterisk 10 is out since 4 days

commented on 2011-12-05 10:44 (UTC)

Updated and added iksemel as optdepend. Thanks guys :)

gdw commented on 2011-11-14 04:51 (UTC)

I agree with peplin. Please make add iksemel to the optdepends (or maybe even the dependencies). Install worked great.

peplin commented on 2011-10-29 17:13 (UTC)

I'm not sure if this is something you'd want to add to the optdepends, but the and modules (required for Google Voice integration) aren't built if iksemel isn't installed.

commented on 2011-06-16 17:02 (UTC)

I seem to be having the problem described here: Can you tell me if your package includes this patch? The source link shows 1.8.4. thanks dave

commented on 2011-05-31 22:56 (UTC)

Updated, thanks for the "patch" thiagoc! :D

commented on 2011-05-31 22:48 (UTC)

I will update, thanks for the tip :)

thiagoc commented on 2011-05-19 02:03 (UTC)

@dottorblaster can you add this change on asterisk initscript? @@ -8,7 +8,7 @@ case "$1" in start) stat_busy "Starting Asterisk" - [ -z "$PID" ] && /usr/sbin/asterisk -G asterisk -U asterisk + [ -z "$PID" ] && cd /var/lib/asterisk && /usr/sbin/asterisk -G asterisk -U asterisk if [ $? -gt 0 ]; then stat_fail else

thiagoc commented on 2011-05-16 17:47 (UTC)

Thanks dottorblaster! :)

commented on 2011-05-14 11:50 (UTC)

I will update the package soon with optdepends. Thanks for the great work!

thiagoc commented on 2011-05-14 02:25 (UTC)


thiagoc commented on 2011-05-13 20:46 (UTC)

@dottorblaster actually are three: libpri, libss7 and openr2. But these are needed just for chan_dahdi, so IMHO they can stay in optdepends. I will make some code cleanup and will upload libss7 and openr2 ASAP.

commented on 2011-05-13 17:35 (UTC)

@thiagoc so now those two packages are needed? I'll add them as you mail me that is fully functional, and then I will update the package.

thiagoc commented on 2011-05-13 16:31 (UTC)

Thanks woodenjesus, it works. BTW, libss7, openr2 e now libpri aren't compiling due a "all warnings being treated as errors". This is some new gcc feature or something? What is the best workaround to this? In libss7 and openr2 I'm doing: sed -i "s/-Werror/-Wno-error/" Makefile but I don't know if this is the right way.

commented on 2011-05-13 15:09 (UTC)

@thiagoc: you also need libpri (there is ebuild in AUR, but if I remember correctly it need to be patched). About this line: "Depends on: dahdi(E), tonezone(E), res_smdi(M), pri(E), ss7(E), openr2(E)" (E) means external dependency, (M) module, so it does not reflect your state of libraries.

thiagoc commented on 2011-05-13 14:05 (UTC)

@woodenjesus: I have installed both libss7 and openr2, but chan_dahdi still doesn't compile. I even created the PKGBUILDs for libss7 and openr2, I will upload it soon. zombie [11:04:09] [asterisk-]: pacman -Ql openr2 openr2 /etc/ openr2 /etc/r2proto.conf openr2 /etc/r2test.conf openr2 /usr/ openr2 /usr/bin/ openr2 /usr/bin/r2dtmf_detect openr2 /usr/bin/r2test openr2 /usr/include/ openr2 /usr/include/openr2.h openr2 /usr/include/openr2/ openr2 /usr/include/openr2/r2chan.h openr2 /usr/include/openr2/r2context.h openr2 /usr/include/openr2/r2log.h openr2 /usr/include/openr2/r2proto.h openr2 /usr/include/openr2/r2utils.h openr2 /usr/lib/ openr2 /usr/lib/libopenr2.a openr2 /usr/lib/ openr2 /usr/lib/ openr2 /usr/lib/ openr2 /usr/lib/ openr2 /usr/share/ openr2 /usr/share/man/ openr2 /usr/share/man/man5/ openr2 /usr/share/man/man5/r2test.conf.5.gz openr2 /usr/share/man/man8/ openr2 /usr/share/man/man8/r2test.8.gz zombie [11:04:14] [asterisk-]: pacman -Ql libss7-trunk libss7-trunk /usr/ libss7-trunk /usr/include/ libss7-trunk /usr/include/libss7.h libss7-trunk /usr/lib/ libss7-trunk /usr/lib/libss7.a libss7-trunk /usr/lib/ libss7-trunk /usr/lib/ libss7-trunk /usr/lib/ In ./configure I see this: checking for tone_zone_find_by_num in -ltonezone... yes checking for tone_zone_find in -ltonezone... yes checking dahdi/tonezone.h usability... yes checking dahdi/tonezone.h presence... yes checking for dahdi/tonezone.h... yes But in "make menuselect", on chan_dahdi section it complains about it too: DAHDI telephony Depends on: dahdi(E), tonezone(E), res_smdi(M), pri(E), ss7(E), openr2(E) I would apreciate if someone can help me.

commented on 2011-05-04 21:13 (UTC)

@thiagoc nope, I compiled them manually. If I have any free time this weekend I'll prepare PKGBUILD's (compilation is pretty straightforward so it should not take much time).

thiagoc commented on 2011-05-04 00:06 (UTC)

@woodenjesus I'm having this problem too. How you installed libss7 and openr2, do you have a PKGBUILD for these?

commented on 2011-04-30 09:36 (UTC)

There is a problem with building in this version, because of missing dependencies (libss7 and openr2). With those installed dahdi module is building just fine.

thiagoc commented on 2011-04-22 01:51 (UTC)

For those who are getting this messages on "/etc/rc.d/asterisk start": Unable to access the running directory (Permission denied). Changing to '/' for compatibility. Add "cd /var/lib/asterisk" in /etc/rc.d/asterisk: ... stat_busy "Starting Asterisk" [ -z "$PID" ] && cd /var/lib/asterisk && /usr/sbin/asterisk -G asterisk -U asterisk if [ $? -gt 0 ]; then ...

commented on 2011-04-07 20:35 (UTC) now can you update?

commented on 2011-03-29 20:33 (UTC)

This package is one of main reasons why I use ArchLinux..Thanx a lot for that..:)

commented on 2011-02-17 11:23 (UTC)

>Is it possible to have postgresql be an optional dependency? Yes it's. Just edit PKGBUILD and remove postgresql and sqlite3 from makedepend. Works fine. There no reason to include postgresql as mandatory dependance. For example I use realtime with DB on external server (MySQL, in my case). Is it possible to add make menuselect to PKGBUILD? To make user select what he/she wants to use in asterisk?

commented on 2011-02-15 18:43 (UTC)

Is it possible to have postgresql be an optional dependency?

commented on 2011-01-30 22:53 (UTC)

Thanks for the new version. I switched hardware for my server a couple of weeks back, and after that the previous version just told me 'Segmentation fault' when starting the daemon. I couldn't figure out the issue, but this new version seems to have fixed it.

td123 commented on 2011-01-10 04:25 (UTC)

I have the following error when building this in a chroot:

commented on 2010-12-19 13:08 (UTC)

Updated to the latest release :)

commented on 2010-11-11 11:09 (UTC)

tnk it work fine... dottorblaster can you upgrade the pkgbuild ? :D

net147 commented on 2010-11-11 10:49 (UTC)

oh right I keep forgetting i'm not the maintainer of this package. try running these commands: chown -R asterisk:asterisk /var/run/asterisk chown -R asterisk:asterisk /var/log/asterisk chown -R asterisk:asterisk /var/spool/asterisk chown -R asterisk:asterisk /var/lib/asterisk they should probably be added to asterisk.install in the post_upgrade function. see my package for reference:

commented on 2010-11-11 10:40 (UTC)

if i run (as root) asterisk (without arguments) the error not appears if ai run asterisk -U asterisk -G asterisk the error appears

commented on 2010-11-11 10:37 (UTC)

yes.. i run it as root

net147 commented on 2010-11-11 10:07 (UTC)

did you run as root? sudo /etc/rc.d/asterisk start

commented on 2010-11-11 10:05 (UTC)

when i start the rcscript i have this messages /etc/rc.d/asterisk start :: Starting Asterisk [BUSY] Unable to access the running directory (Permission denied). Changing to '/' for compatibility. [DONE] any ideas?

commented on 2010-10-13 20:06 (UTC)

The $startdir/pkg/usr/bin is missing, edit the PKGBUILD file and add the following line: mkdir -p -m 750 $startdir/pkg/usr/bin somewhere before the line: gcc $CXXFLAGS rawplayer.c -o $startdir/pkg/usr/bin/rawplayer

commented on 2010-09-13 19:06 (UTC)

If you edit the PKGBUILD file and add a '-p' to the two mkdir commands, it will get beyond that error. Now I'm seeing: /usr/bin/ld: cannot open output file /tmp/packerbuild-1001/asterisk/asterisk/pkg/usr/bin/rawplayer: No such file or directory Then if fails out of the build. has been claimed as fixed on the asterisk16 in the aur.

commented on 2010-09-08 13:12 (UTC)

I get exactly the same error that theslainman's post.

commented on 2010-08-06 00:08 (UTC)

I get this error +--------- Asterisk Build Complete ---------+ + Asterisk has successfully been built, and + + can be installed by running: + + + + make install + +-------------------------------------------+ mkdir: cannot create directory `/tmp/yaourt-tmp-hans/aur-asterisk/pkg/usr/sbin': No such file or directory

commented on 2010-08-01 17:44 (UTC)

updated :)

honzor commented on 2010-05-27 22:11 (UTC)

Please update to newest version, this one doesn't build anymore with latest sqlite

Ravenman commented on 2010-05-01 15:41 (UTC)

What is the difference between this package and this package: ?