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..
Search Criteria
Package Details: asterisk 22.0.0-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/asterisk.git (read-only, click to copy) |
---|---|
Package Base: | asterisk |
Description: | A complete PBX solution |
Upstream URL: | https://www.asterisk.org |
Keywords: | sip, telephony, voip |
Licenses: | GPL-2.0-only |
Submitter: | pressh |
Maintainer: | nkukard (alerque) |
Last Packager: | nkukard |
Votes: | 112 |
Popularity: | 0.046397 |
First Submitted: | 2008-01-27 13:42 (UTC) |
Last Updated: | 2024-10-18 07:11 (UTC) |
Dependencies (21)
- alsa-lib
- curl (curl-quiche-gitAUR, curl-http3-ngtcp2AUR, curl-gitAUR, curl-c-aresAUR)
- jansson (jansson-gitAUR)
- libedit
- libvorbis (libvorbis-aotuvAUR, libvorbis-aotuv-lancerAUR, libvorbis-gitAUR)
- libxml2 (libxml2-gitAUR, libxml2-2.9AUR)
- libxslt (libxslt-gitAUR)
- opus (opus-gitAUR)
- popt (popt-gitAUR)
- speex (speex-gitAUR)
- gsm (make)
- sqlite3 (sqlite) (make)
- dahdi (dahdi-linux-gitAUR, dahdi-linuxAUR) (optional)
- gsm (optional)
- libpriAUR (optional)
- libsrtp (libsrtp-gitAUR) (optional)
- libss7AUR (optional)
- lua51 (luajit-symlinksAUR) (optional)
- openr2 (openr2-gitAUR) (optional)
- postgresql (postgresql-12AUR, postgresql13AUR, postgresql15-docsAUR, postgresql15AUR, postgresql17-docsAUR, postgresql17AUR, postgresql-gitAUR) (optional)
- Show 1 more dependencies...
Required by (8)
Sources (5)
Latest Comments
« First ‹ Previous 1 .. 13 14 15 16 17 18 19 20 21 22 23 24 Next › Last »
aalexanderr commented on 2013-03-03 20:20 (UTC)
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.
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....
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 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 (UTC)
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 (UTC)
[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.
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.