我最近使用给定的说明在一个新的Centos7上构建/安装了Asterisk14(我必须构建,因为我需要OOH323模块)。
在运行"make install“和"make config”(后者安装服务)后,星号服务似乎已安装并正在运行("systemctl status asterisk“显示服务已启动,ps -A显示正在运行的进程中的safe-asterisk )
但是,尝试使用asterisk -R连接到它时,会出现asterisk没有运行的错误,而且netstat --listen似乎没有任何sip侦听端口
asterisk配置文件似乎正常:当我从终端(> asterisk )手动运行asterisk时,一切正常,服务和web gui按预期运行。
我甚至试图在rc.local (chmod=777)中添加星号,但由于某种原因我无法理解,脚本中的所有命令都能成功运行,但星号不能运行。
有人能帮我弄明白我做错了什么吗?
谢谢
发布于 2018-06-19 03:28:30
检查/etc/asterisk/asterisk.conf以了解ctl文件路径和设置。
检查/var/log/asterisk/messages或/var/log/asterisk/full
如果你有selinux或者apparmor -可能也需要一些权限。
发布于 2018-06-19 12:08:52
谢谢!
Asterisk.conf:默认情况下,ctl path被注释掉,因此使用默认路径(当我手动运行asterisk时,我可以像正常一样使用asterisk -r连接,这意味着asterisk -r可以成功连接到默认ctl)。
var/ log /asterisk/ messages :如果作为服务运行,则不记录任何内容,但如果手动运行,则显示正常消息(有关模块或内容的一些警告,没有什么严重问题)
var/log/asterisk/full:根本不存在
这是我当前的"systemctl状态星号-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星号“:
52723 ? 00:00:00 safe_asteriskhttps://stackoverflow.com/questions/50908126
复制相似问题