Просмотр сообщений

В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.


Темы - nakamuro

Страницы: [1]
1
Телефония / Интеграция Asterisk и Битрикс24
« : 28 августа 2018, 09:23:45 »
Вопрос по теме: Интеграция Asterisk и Битрикс24 https://habr.com/post/349316/
Возможно ктото реализовал.

Споткнулся на настройке supervisor'a. Имеется FreePBX 12.0.76.2(CenOS 6.5).
Многократно переустанавливал supervisor, текущая версия 3.2.

Скрипт воркера :
Спойлер для скрыто:
[program:callme]
command=php /var/www/html/callme/CallMeIn.php
directory=/var/www/html/callme
autostart=true
autorestart=true
user=root

Конфиг supervisor:
Спойлер для скрыто:
[unix_http_server]
file=/tmp/supervisor.sock   ; (the path to the socket file)

[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB        ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10           ; (num of main logfile rotation backups;default 10)
loglevel=debug                ; (log level;default info; others: debug,warn,trace)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false               ; (start in foreground if true;default false)
minfds=1024                  ; (min. avail startup file descriptors;default 1024)
minprocs=200                 ; (min. avail process descriptors;default 200)
user=root                 ; (default is current user, required if root)
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
user=root              ; should be same as http_username if set
[include]
files = /etc/supervisord.d/*.conf

При запуске Supervisor получаю следующие сообщение:
Starting supervisord: /usr/lib/python2.6/site-packages/supervisor-3.2.0-py2.6.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.   'Supervisord is running as root and it is searching ' [  OK  ]

Команда supervisorctl status показывает:
callme                           FATAL     Exited too quickly (process log may have details)

В логах(дебаг) идет:
Спойлер для скрыто:
2018-08-24 16:39:59,530 CRIT Set uid to user 0
2018-08-24 16:39:59,530 WARN Included extra file "/etc/supervisord.d/callme.conf" during parsing
2018-08-24 16:39:59,604 INFO RPC interface 'supervisor' initialized
2018-08-24 16:39:59,604 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-08-24 16:39:59,607 INFO daemonizing the supervisord process
2018-08-24 16:39:59,608 INFO supervisord started with pid 15218
2018-08-24 16:40:00,612 INFO spawned: 'callme' with pid 15225
2018-08-24 16:40:00,693 DEBG 'callme' stderr output:
PHP Parse error:  syntax error, unexpected '[' in /var/www/html/callme/classes/Globals.php on line 13

2018-08-24 16:40:00,694 DEBG fd 9 closed, stopped monitoring <POutputDispatcher at 169857484 for <Subprocess at 169645516 with name callme in state STARTING> (stderr)>
2018-08-24 16:40:00,694 DEBG fd 7 closed, stopped monitoring <POutputDispatcher at 169742732 for <Subprocess at 169645516 with name callme in state STARTING> (stdout)>
2018-08-24 16:40:00,701 INFO exited: callme (exit status 255; not expected)
2018-08-24 16:40:00,702 DEBG received SIGCLD indicating a child quit
2018-08-24 16:40:01,704 INFO spawned: 'callme' with pid 15295
2018-08-24 16:40:01,827 DEBG 'callme' stderr output:
PHP Parse error:  syntax error, unexpected '[' in /var/www/html/callme/classes/Globals.php on line 13

При попытке выполнить скрпит php /var/www/html/callme/CallMeIn.php получаю:
PHP Parse error:  syntax error, unexpected '[' in /var/www/html/callme/classes/Globals.php on line 13

Дальше пройти не удается, прошу совета уважаемого FessAectan, писавшего сей мануал, либо у кого получилось реализовать интеграцию Asterisk и Битрикс24.


Страницы: [1]