我aws
似乎無法開始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:~$
要開始服務,先創建一個sudo用戶?
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:~$
具體方向:
步驟 10. 啟動 Asterisk
現在我們可以啟動Asterisk了,在命令列中執行以下命令來啟動Asterisk:
星號-cvvvvvvvvvv
如果 Asterisk 啟動正常,請輸入:
核心立即停止
關閉 Asterisk 並退出 Asterisk 控制台。
然後將 asterisk 作為守護程式啟動:
/etc/init.d/星號啟動
然後您可以使用以下命令連接到 Asterisk 控制台:
星號-rvvvvvvvvvv
不像當地的系統中,預設使用者沒有已知的密碼aws
。