Package Details: asterisk 13.8.0-1

Git Clone URL: https://aur.archlinux.org/asterisk.git (read-only)
Package Base: asterisk
Description: A complete PBX solution
Upstream URL: http://www.asterisk.org
Licenses: GPL
Submitter: pressh
Maintainer: xdevla
Last Packager: xdevla
Votes: 81
Popularity: 1.264757
First Submitted: 2008-01-27 13:42
Last Updated: 2016-04-03 22:34

Dependencies (21)

Required by (2)

Sources (4)

Latest Comments

johny77 commented on 2016-04-02 21:01

@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

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

@Aleksandrs: just note:

When you enable mp3 support with:
$ ./contrib/scripts/get_mp3_source.sh

... 'svn' should be in makedepends array:
makedepends=('sqlite3' 'gsm' 'svn')

dpunkt commented on 2015-10-28 21:52

@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

@xdevla: What happened to module chan_dahdi.so? 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

## Adding some function to the PKGBUILD
## If needed MP3 support uncomment MP3

build() {
cd ${srcdir}/${pkgname}-${pkgver}
./bootstrap.sh ## Generating asterisk config it's needed for patch opus/vp8
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin

## MP3 support
##./contrib/scripts/get_mp3_source.sh

make menuselect ## This line gives asterisk menu
make
}

## If needed Opus/VP8 support
## download Asterisk Opus/VP8 patch
## URL: https://github.com/meetecho/asterisk-opus

nofxx commented on 2015-08-07 18:29

==> 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

Will wait till 13.4.0 is out.

robertoaall commented on 2015-06-07 15:43

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 (http://pastebin.com/SyYjw6ZH)

robertoaall commented on 2015-06-07 15:35

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'.

erichowey commented on 2015-05-31 23:41

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

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 https://issues.asterisk.org/jira/browse/ASTERISK-24932.

This is fixed in 13.4.0-rc1, which built fine for me after updating PKGBUILD.

calzon65 commented on 2015-02-08 21:14

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

calzon65 commented on 2015-01-29 04:22

Looks like version 13.1.1 is out, thanks again for this great project.

calzon65 commented on 2014-07-18 19:24

Thank you for your good work magicrhesus. Asterisk 13 is expected in a few months, so I suggest we have two projects. Rename this project to asterisk12 and name the new project asterisk13.

xdevla commented on 2014-07-17 09:27

Updated, thanks for the heads up

calzon65 commented on 2014-07-16 18:08

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-16 17:09

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. sha256 is '6c72d0060d1ce7a7d09f510d91d588f269aac0032de6a4464d5449b0d5600a72'

calzon65 commented on 2014-07-16 16:42

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.

calzon65 commented on 2014-07-10 19:53

I love this project and thank the hard work. I have a suggestion about project naming. This project uses the current version of Asterisk, Asterisk-12, but the most recent long term supported version of Asterisk is Asterisk-11 and eventually (in about six to nine months) Asterisk-13 will become the next long term supported version. Just like Office 2010 and Office 2012 coexist or Windows 7 and Windows 8 coexist, there are going to be major version's of Asterisk supported at the same time. I suggest this project be called asterisk12, when asterisk 13 comes out, a new AUR for asterisk13 should be created and it may also be smart to have an asterisk11. This makes it easier for a person to choose their applicable package via pacman (e.g., pacman -Sy asterisk12 or pacman -Sy asterisk11)

calzon65 commented on 2014-07-05 21:10

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')

calzon65 commented on 2014-07-04 23:37

Both libxslt and pjproject are required for runtime (ArchLinux ARM).

depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'pjproject')
makedepends=('sqlite3' 'gsm' 'pjproject' 'libxslt')

calzon65 commented on 2014-07-04 23:36

It turns out that both libxslt and pjproject are required for runtime (ArchLinux ARM). It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) includes all the necessary dependencies.

depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'pjproject')
makedepends=('sqlite3' 'gsm' 'pjproject' 'libxslt')

calzon65 commented on 2014-07-04 23:36

It turns out that both libxslt and pjproject are required for runtime (ArchLinux ARM). It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) grabs all the necessary dependencies.

depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'pjproject')
makedepends=('sqlite3' 'gsm' 'pjproject' 'libxslt')

calzon65 commented on 2014-07-04 23:35

It turns out that both libxslt and pjproject are required for runtime. It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) grabs all the necessary dependencies.

depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'pjproject')
makedepends=('sqlite3' 'gsm' 'pjproject' 'libxslt')

calzon65 commented on 2014-06-27 00:13

It turns out that both libxslt and pjproject are required for runtime. It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) grabs all the necessary dependencies.

calzon65 commented on 2014-06-25 16:18

It turns out that both libxslt and pjproject are required for runtime. It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) grabs all the necessary dependencies.

calzon65 commented on 2014-06-25 16:15

It turns out that both libxslt and pjproject are required for runtime. It would be nice to have the pacman dependencies updated to include those two packages so (pacman -Sy asterisk) grabs all the necessary dependencies.

calzon65 commented on 2014-06-25 16:13

It turns out that both libxslt and pjproject are required for runtime (pacman -Sy asterisk libxclt pjproject). Would be nice to have the dependencies updated when downloading/installing asterisk.

adlerweb commented on 2014-06-24 08:13

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

calzon65 commented on 2014-06-10 13:55

I am running Arch Linux ARM (Alarm), so I am not sure if I am posting in the correct location, but from what I understand about Alarm, they simply recompile ARM versions from the AUR. Anyway, in reading the official Asterisk website and other searching, it appears that the current version of Asterisk (12.X.X), which is the version currently in the AUR, requires libxslt and pjproject. I am not sure if I am saying this correctly, but to me doing a "pacman -Sy asterisk" should include the minimum dependencies to operate.

calzon65 commented on 2014-06-10 13:49

I am running Arch Linux ARM (Alarm), so I am not sure if I am posting in the correct location, but from what I understand about Alarm, they simply recompile from the AUR. Anyway, in reading the official Asterisk website and other searching, it appears that the current version of Asterisk (12.X.X) which is the version currently in the AUR, libxslt and pjproject are mandatory for the 12.X.X version of Asterisk. So I strongly hope these will be included in the dependencies. To me doing a "pacman -Sy asterisk" should at least include the minimum dependencies to operate.

calzon65 commented on 2014-06-10 13:47

I am running Arch Linux ARM (Alarm), so I am not sure if I am posting in the correct location, but from what I understand about Alarm, they simply recompile from the AUR. Anyway, in reading the official Asterisk website and other searching, it appears that the current version of Asterisk (12.X.X) which is the version currently in the AUR, libxslt and pjproject are mandatory for the 12.X.X version of Asterisk. So I hope these will be included in the dependencies.

calzon65 commented on 2014-06-10 05:10

I am running Arch Linux ARM, so I am not sure if I am posting in the correct location, but I also suggest adding libxslt as well as pjproject to the dependencies. I recently installed Asterisk from the AUR (pacman -Sy asterisk) onto my Arch Linux ARM system and had to separately install libxslt and pjproject just to setup a basic asterisk configuration

calzon65 commented on 2014-06-10 05:07

I am running Arch Linux ARM, so I am not sure if I am posting in the correct location, but I also suggest adding libxslt as well as pjproject to the dependencies. I recently installed Asterisk from the AUR onto my Arch Linux ARM system and had to separately install libxslt and pjproject just to setup a basic asterisk configuration.

whiskerz007 commented on 2014-05-21 11:38

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.

Anonymous comment on 2014-04-28 15:25

2014-04-23 Asterisk Development Team <asteriskteam@digium.com>
* Asterisk 12.2.0 Released.

manterola commented on 2014-04-07 23:47

Hello, I am trying to use and config asterisk 12.1.0-2, but chan_motif.so and res_xmpp.so 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

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

I'm not able to build this package with a latest up-to-date system:

[LD] cdr_manager.o -> cdr_manager.so
collect2: error: ld returned 1 exit status
/tmp/yaourt-tmp-bp/aur-asterisk/src/asterisk-12.0.0/Makefile.rules:134: recipe for target 'cdr_manager.so' failed
make[1]: *** [cdr_manager.so] 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?

frederik commented on 2014-02-10 20:14

And jansson too....

mfyahya commented on 2014-02-08 18:38

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

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

luismanolo commented on 2013-11-13 15:32

And dont work...
sorry

luismanolo commented on 2013-11-13 14:03

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

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

Anonymous comment on 2013-09-18 15:30

Thank you very much for accepting my request.

Anonymous comment on 2013-09-15 18:18

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

Should be ok now. Thanks for the fix.

mbroemme commented on 2013-08-19 13:30

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

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

Anonymous comment on 2013-06-16 03:42

there's a bug in the 11.4.0-3 version: https://issues.asterisk.org/jira/browse/ASTERISK-18827

they said its fixed but i got the same issue.

xdevla commented on 2013-06-04 15:30

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

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

rpodgorny commented on 2013-05-28 11:50

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

tritron commented on 2013-05-26 15:53

can you pleas add this patch to asterisk src https://issues.asterisk.org/jira/secure/attachment/46880/gareth-11.3.0.patch
and can you add make menuselect

rpodgorny commented on 2013-05-16 21:48

...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

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

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

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

The following PKGBUILD works for me (version bump to 11.4.0-rc1)

# Contributor: Alessio Biancalana <dottorblaster@gmail.com>

pkgname=asterisk
pkgver=11.4.0_rc1
_realpkgver=${pkgver/_/-}

pkgrel=1
pkgdesc="A complete PBX solution"
arch=('i686' 'x86_64')
url="http://www.asterisk.org"
license=('GPL')
depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl')
makedepends=('postgresql' 'unixodbc' 'sqlite3')
optdepends=('libpri' 'libss7' 'openr2' 'iksemel')
backup=(etc/asterisk/asterisk.conf)
source=(http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$_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
}

Anonymous comment on 2013-03-31 14:42

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
https://issues.asterisk.org/jira/browse/ASTERISK20362?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel

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.

Anonymous comment on 2013-03-29 00:41

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

Anonymous comment on 2013-03-29 00:36

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

moonman commented on 2013-03-08 05:00

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').

https://github.com/archlinuxarm/PKGBUILDs/tree/master/aur/asterisk

moonman commented on 2013-03-08 04:59

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

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

aalexanderr commented on 2013-03-04 23:12

Provide log.

lutoma commented on 2013-03-04 22:19

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

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

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

Yes, sorry it's my fault. But i just rewrite start script like this:

[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[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]
WantedBy=multi-user.target

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....

aalexanderr commented on 2013-02-26 15:34

Yes, sorry it's my fault. But i just rewrite start script like this:

[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[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]
WantedBy=multi-user.target

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.

johny77 commented on 2013-02-26 13:17

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

aalexanderr commented on 2013-02-26 12:35

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


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

You also need to make:
chmod asterisk:asterik /var/run/asterisk

or asterisk with User and Group asterisk never create asterisk.pid 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

You will also need to add: RemainAfterExit=yes
otherwise process will be killed by systemd.
----------------------------------------------
[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=simple
RemainAfterExit=yes
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
User=asterisk
Group=asterisk
PIDFile=/run/asterisk/asterisk.pid
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]
WantedBy=multi-user.target

Cinelli commented on 2013-02-17 16:57

[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=simple
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
PIDFile=/run/asterisk/asterisk.pid
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]
WantedBy=multi-user.target

this service unit should work.

PieterDeBruijn commented on 2013-01-23 05:56

11.2.1 has been released

PieterDeBruijn commented on 2013-01-03 06:55

11.1.1 Has been released. This is a security release:
http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11-current

ticpu commented on 2012-12-19 02:43

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

PieterDeBruijn commented on 2012-12-18 09:39

11.1.0 Has been released. This is a mayor bugfix release:
http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11-current

PieterDeBruijn commented on 2012-12-07 14:49

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

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

A refined service file for systemd users:

[Unit]
Description=Asterisk PBX and telephony daemon.
After=network.target

[Service]
Type=simple
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
User=asterisk
Group=asterisk
PIDFile=/run/asterisk/asterisk.pid
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]
WantedBy=multi-user.target

chetwisniewski commented on 2012-11-25 02:45

/etc/tmpfiles.d/asterisk:

D /run/asterisk 755 - - -

chetwisniewski commented on 2012-11-25 02:16

Proposed asterisk.service derived from the one for Fedora 15:

[Unit]
Description=Asterisk PBX and telephony daemon.
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/run/asterisk/asterisk.pid
User=asterisk
Group=asterisk
EnvironmentFile=/etc/conf.d/asterisk
ExecStart=/usr/sbin/asterisk $ASTARGS $AST_EXTRA_ARGS
ExecReload=/usr/sbin/asterisk -rx 'module reload'

[Install]
WantedBy=multi-user.target

PieterDeBruijn commented on 2012-11-14 11:39

Asterisk 11.0.1 has also been released:
http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11-current

fernando_ccs17 commented on 2012-10-26 13:44

Asterisk 11 is out !

gdamjan commented on 2012-10-19 08:55

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.

Anonymous comment on 2012-10-16 02:42

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

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

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

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

asterisk 10 is out since 4 days

Anonymous comment on 2011-12-05 10:44

Updated and added iksemel as optdepend. Thanks guys :)

gdw commented on 2011-11-14 04:51

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

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

Anonymous comment on 2011-06-16 17:02

I seem to be having the problem described here:

https://issues.asterisk.org/view.php?id=19250

Can you tell me if your package includes this patch? The source link shows 1.8.4.

thanks

dave

Anonymous comment on 2011-05-31 22:56

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

Anonymous comment on 2011-05-31 22:48

I will update, thanks for the tip :)

thiagoc commented on 2011-05-19 02:03

@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

Thanks dottorblaster! :)

Anonymous comment on 2011-05-14 11:50

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

thiagoc commented on 2011-05-14 02:25

Done:

http://aur.archlinux.org/packages.php?ID=49029
http://aur.archlinux.org/packages.php?ID=49030

thiagoc commented on 2011-05-13 20:46

@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.

Anonymous comment on 2011-05-13 17:35

@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

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.

Anonymous comment on 2011-05-13 15:09

@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

@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-1.8.3.3]: 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/libopenr2.la
openr2 /usr/lib/libopenr2.so
openr2 /usr/lib/libopenr2.so.3
openr2 /usr/lib/libopenr2.so.3.1.0
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-1.8.3.3]: 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.so
libss7-trunk /usr/lib/libss7.so.1
libss7-trunk /usr/lib/libss7.so.1.0

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.

Anonymous comment on 2011-05-04 21:13

@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

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

Anonymous comment on 2011-04-30 09:36

There is a problem with building chan_dahdi.so 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

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
...

Anonymous comment on 2011-04-07 20:35

1.8.3.2 now
can you update?
http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8.3.2.tar.gz

Anonymous comment on 2011-03-29 20:33

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

Anonymous comment on 2011-02-17 11:23

>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?

Anonymous comment on 2011-02-15 18:43

Is it possible to have postgresql be an optional dependency?

Anonymous comment on 2011-01-30 22:53

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

I have the following error when building this in a chroot: http://pastebin.com/nnLZFRLz

Anonymous comment on 2010-12-19 13:08

Updated to the latest release :)

Anonymous comment on 2010-11-11 11:09

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

net147 commented on 2010-11-11 10:49

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: http://aur.archlinux.org/packages/asterisk16/asterisk16/asterisk16.install

Anonymous comment on 2010-11-11 10:40

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

Anonymous comment on 2010-11-11 10:37

yes.. i run it as root

net147 commented on 2010-11-11 10:07

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

Anonymous comment on 2010-11-11 10:05

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?

Anonymous comment on 2010-10-13 20:06

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

Anonymous comment on 2010-09-13 19:06

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.

Anonymous comment on 2010-09-08 13:12

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

Anonymous comment on 2010-08-06 00:08

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

Anonymous comment on 2010-08-01 17:44

updated :)

honzor commented on 2010-05-27 22:11

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

Ravenman commented on 2010-05-01 15:41

What is the difference between this package and this package: http://aur.archlinux.org/packages.php?ID=24357 ?