0

I've recently built/installed Asterisk 14 on a fresh Centos7 (I had to build since I need OOH323 module), using the given instructions.

After running "make install" and "make config" (latter installs the service), the asterisk service seems to be installed and running ("systemctl status asterisk" shows the service started, and ps -A shows safe-asterisk as a running process)

However, trying to connect to it using asterisk -R gives me an error that asterisk is NOT running, and also netstat --listen does not seem to have any listening ports for sip

The asterisk config files seem to OK: when I manually run asterisk from terminal (>asterisk), everything goes fine, service and web gui operate as intended.

I even tried to add asterisk in rc.local (chmod=777), but for some reason I can't understand, all commands inside the script run successfully but asterisk doesn't run.

Can anyone help me understand what I'm doing wrong?

Thanks

Siavash
  • 1
  • 1
  • 1

2 Answers2

0

Check /etc/asterisk/asterisk.conf for ctl file path and settings.

Check /var/log/asterisk/messages or /var/log/asterisk/full

If you have selinux or apparmor - may need some permissions too.

arheops
  • 15,544
  • 1
  • 21
  • 27
0

Thanks!

Asterisk.conf: ctl path is commented out by default, thus uses the default path (when I run asterisk manually I can connect using asterisk -r as normal, meaning asterisk -r can successfuly connect to default ctl).

var/log/asterisk/messages: doesn't log anything if run as service, but shows normal messages if run manually (some warnings about modules or stuff, nothing serious there)

var/log/asterisk/full: does not exist at all

and this is my current "systemctl status asterisk -l":

 asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
   Active: active (running) since Mon 2018-06-18 23:58:35 EDT; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 52696 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)
 Main PID: 52727
   CGroup: /system.slice/asterisk.service
           ├─52723 /bin/sh /usr/sbin/safe_asterisk
           └─53556 sleep 4

Jun 18 23:58:34 localhost.localdomain systemd[1]: Starting LSB: Asterisk PBX...
Jun 18 23:58:34 localhost.localdomain asterisk[52696]: Starting asterisk:
Jun 18 23:58:34 localhost.localdomain systemd[1]: PID file /var/run/asterisk/asterisk.pid not readable (yet?) after start.
Jun 18 23:58:35 localhost.localdomain systemd[1]: asterisk.service: Supervising process 52727 which is not our child. We'll most likely not notice when it exits.
Jun 18 23:58:35 localhost.localdomain systemd[1]: Started LSB: Asterisk PBX.

"ps -A | grep asterisk":

52723 ?        00:00:00 safe_asterisk
Siavash
  • 1
  • 1
  • 1