0

On aws I cannot seem to start asterisk:

ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ systemctl status asterisk.service
● asterisk.service - Asterisk PBX
   Loaded: loaded (/lib/systemd/system/asterisk.service; enabled; vendor preset: enab
   Active: activating (auto-restart) (Result: exit-code) since Tue 2017-11-14 08:45:1
     Docs: man:asterisk(8)
  Process: 24907 ExecStart=/usr/sbin/asterisk -g -f -U asterisk (code=exited, status=
 Main PID: 24907 (code=exited, status=1/FAILURE)

Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Main process exited, co
Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Unit entered failed sta
Nov 14 08:45:14 ip-172-31-14-19 systemd[1]: asterisk.service: Failed with result 'exi
lines 1-10/10 (END)
ubuntu@ip-172-31-14-19:~$ 

To start the service, create a sudo user first?

ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ uptime
 22:05:27 up 0 min,  1 user,  load average: 2.44, 0.65, 0.22
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -rvvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ sudo asterisk -rvvvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ sudo asterisk -cvvvvvvvvvv
Asterisk already running on /var/run/asterisk/asterisk.ctl.  Use 'asterisk -r' to connect.
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -r
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ asterisk -rvv
Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?)
ubuntu@ip-172-31-14-19:~$ 
ubuntu@ip-172-31-14-19:~$ /etc/init.d/asterisk start
[....] Starting asterisk (via systemctl): asterisk.service==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'asterisk.service'.
Authenticating as: Ubuntu (ubuntu)
Password: 
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
==== AUTHENTICATION FAILED ===
Failed to start asterisk.service: Access denied
See system logs and 'systemctl status asterisk.service' for details.
 failed!
ubuntu@ip-172-31-14-19:~$ 

specific directions:

Step 10. Starting Asterisk

Now we can start Asterisk, run the following command to start the asterisk on the command line:

asterisk -cvvvvvvvvvv

If Asterisk starts ok, type:

core stop now

to shutdown Asterisk and exit the Asterisk console.

Then start asterisk as a daemon:

/etc/init.d/asterisk start

Then you can connect to the Asterisk console with the following command:

asterisk -rvvvvvvvvvv

unlike the local system, there's no known password for the default user on aws.

  • 1
    Can you please post the output of systemctl status asterisk.service. – NerdOfCode Nov 14 '17 at 0:46
  • @NerdOfCode added the output; hit ctrl-c to exit from that. – Thufir Nov 14 '17 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.