[asterisk-users] Having problem getting Asterisk to work on CentOS 7
Eric Wieling
ewieling at nyigc.com
Tue Mar 14 13:33:18 CDT 2017
This is what I hacked up for my CentOS 7 Asterisk server. It does NOT act
like safe_asterisk.
[Unit]
Description=Asterisk PBX and telephony daemon
Documentation=man:asterisk(8)
After=network-online.target multi-user.target
[Service]
Type=simple
User=root
Group=root
Environment=HOME=/var/lib/asterisk
WorkingDirectory=/var/lib/asterisk
ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf
ExecStop=/usr/sbin/asterisk -rx 'core stop now'
ExecReload=/usr/bin/asterisk -rx 'core reload'
[Install]
WantedBy=multi-user.target
On Tue, Mar 14, 2017 at 2:18 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com>
wrote:
> On Tue, Mar 14, 2017 at 05:09:17PM +0000, Dan Cropp wrote:
> > Thank you Tzafrir.
> >
> > I had been using different users in earlier attempts to make this work.
> Decided to try everything where root is the only user, simply to verify
> it's working.
> >
> > For problem 2, where asterisk is writing to the log but doesn't seem to
> receive the SIP packets even though tcpdump indicates they are making it to
> the box on 5060, I am starting asterisk while logged in as root.
> > /usr/sbin/asterisk -vvvvvvvvdddddddc
> >
> >
> > For problem 1, where it seems to be stuck when running as a service, I
> simply reboot the machine. Then I log it as root and notice it's not
> writing to the log.
> >
> > When running it as a service (after restart). Here is what the output
> from strace -p $PID_OF_ASTERISK
> >
> > [root at localhost ~]# strace -p 1470
>
> pkill? nice? That is not asterisk. Are you sure you got the right
> process? Maybe you got safe_asterisk instead? If it is safe_asterisk:
>
> 1. That script is pointless now that you have systemd. Replace it with a
> simple systemd unit (hint: Restart=on-failure gets you most of the way
> there).
>
> Isn't there one already included with Asterisk by now?
>
> 2. Use the option -f of strace to see the exact error message. What is
> error status 34 of asterisk? ERANGE?
>
> --
> Tzafrir Cohen
> icq#16849755 jabber:tzafrir.cohen at xorcom.com
> +972-50-7952406 mailto:tzafrir.cohen at xorcom.com
> http://www.xorcom.com
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
> https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
GMail: Making MS Outlook look good since 2007
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170314/403c3b60/attachment.html>
More information about the asterisk-users
mailing list