FreePBX не видит запущенного asterisk
Странная проблема, установлен asterisk 1.8, установлен freepbx. Но, когда захожу в веб-морду вижу в Server Status Asterisk красный — ERROR. Asterisk is not running, this is a critical service!
При этом, из консоли спокойно получается зайти в командную строку астера:
Как быть? В какую сторону копать? ОСь — CentOS 5, freepbx и asterisk установлены из репозитория Diginum — http://www.asterisk.org/downloads/yum
Comments
Вобщем поставил всё из сорцов, freepbx — 2.9, картина та же самая, астериск не цепляется. Unable to connect to manager localhost:5038 (111): Connection refused
что-то странное творится с сервером: [root@corp
]# telnet localhost:5038 telnet: localhost:5038: Temporary failure in name resolution localhost:5038: Host name lookup failure [root@corp
]# nslookup localhost Server: 4.2.2.2 Address: 4.2.2.2#53
Name: localhost Address: 127.0.0.1
]# ping localhost PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost.localdomain (127.0.0.1): icmpseq=1 ttl=64 time=0.026 ms 64 bytes from localhost.localdomain (127.0.0.1): icmpseq=2 ttl=64 time=0.032 ms
Связь с локалхостом вроде есть, но телнет не пускает.
конфиги FreePBX точно перезаписались?
точно. из сорцов на чистую систему ставил.
4 Ответа
Сорри за некропостинг, но возможно кому-то поможет..
Проверьте если прописан localhost в /etc/hosts
Comments
Как вариант то FreePBX работает не от юзера астериск? Тобиш сам апач не от него загружен
Comments
ls /etc/selinux
ls: /etc/selinux: No such file or directory
cat /selinux/enforce
Чую что в Вашем центосе старая сборка FreePBX вот что-то подобное типа как он определяет работу астериска http://www.freepbx.org/forum/freepbx/general-help/what-would-make-dashboard-asterisk-in-error-state советую попробовать с исходиников установить FreePBX
да нет, судя по всему весьма свежая: freepbx.x8664 2.10.0rc1-1centos5 installed
Вобщем, подключится к астеру невозможно ниоткуда:
При этом сам астер запущен, работает
Куда копать уже не знаю. Сейчас установка чистая, из сорцов, настройки дефолтные.
Comments
Ну как вариант попробуйте asterisk-gui вместо фри-пи-би-екса
Всем привет! Пришлось и мне поковыряться с системой. И так по вопросу: РВХ не видит астера скорее всего из-за несовпадения паролей к менеджеру. Посмотрите конфиги: /etc/asterisk/manager.conf и /etc/amportal.conf пароль из manager.conf секция [admin] должен совпадать с паролем из amportal.conf Так же гляньте в сторону настроек хоста менеждера и РВХ
Unable to connect to remote Asterisk
Overview
When first learning Asterisk some users will find they are unable to connect to the Asterisk service.
First, let’s break down the message.
This is letting you know specifically what file is potentially missing or unable to be accessed.
Now let’s find out what asterisk.ctl is and investigate potential causes of this error.
The asterisk.ctl file
asterisk.ctl is a UNIX Domain Socket file. It is used to pass commands to an Asterisk process and it is how the Asterisk console («asterisk r» or any variation) communicates with the back-end Asterisk process.
The /var/run/asterisk/ directory
This directory is the default Asterisk run directory. Asterisk will create it the first time it is run. This location is defined in the Asterisk Main Configuration File. As is explained in the Directory and File Structure section; when Asterisk is running, you’ll see two files here, asterisk.ctl and asterisk.pid. These are the control socket and the PID(Process ID) files for Asterisk.
Potential Causes and Solutions
Cause 1: asterisk.ctl does exist. Your user does not have write permission for this file.
Cause 2: Permissions issue. Asterisk does not have write access to /var/run/asterisk or your user doesn’t have write access to asterisk.ctl.
Cause 3: asterisk.ctl does not exist because Asterisk isn’t running. When Asterisk is started it may run briefly and then quickly halt due to an error.
You need to find out what error is causing Asterisk to halt and resolve it.
This will start Asterisk in console mode with level 5 verbosity. That should give you plenty to look at.
Cause 4: SELinux enabled and not properly configured for Asterisk. SELinux not allowing asterisk.ctl to be created.
Configuring SELinux is outside the scope of this article.
Звездочка: Не удается подключиться к удаленной звездочке (существует ли/var/run/asterisk.ctl?)
Я изучаю звездочку.
После установки звездочки я попытался подключиться к ней с помощью
Но это дало мне следующее сообщение об ошибке:
Не удается подключиться к удаленной звездочке (существует ли /var/run/asterisk.ctl?)
Как я могу решить эту проблему?
ОТВЕТЫ
Ответ 1
Вероятно, звездочка не работает на вашем сервере.
Попробуйте запустить его с помощью этой команды:
Надеюсь, что это поможет, привет, Дюк.
Ответ 2
Есть две общие причины, почему это происходит:
Ответ 3
Эта команда должна работать, если другие не решили проблему:
Ответ 4
Если вы включили SELINUX, это предотвратит создание этого файла. Вам нужно отключить его.
Ответ 5
на самом деле это проблема собственности
вы увидите, что файл имеет право собственности на «root»
хотя вы изменили права собственности на:
После перезапуска сервера звездочки право собственности снова вернется к «корню»
они должны быть для пользователя и группы «asterisk: asterisk»
Ответ 6
Вы должны внести изменения в файл asterisk.conf, расположенный в /etc/asterisk
Перезагрузите свою систему и проверьте
Надеюсь, это поможет вам
Ответ 7
Ответ 8
Сначала проверьте, существует ли файл /var/run/asterisk/asterisk.ctl если это не так, то сервер asterisk не работает. Так начните его, как
Ответ 9
Это обычная проблема для звездочки, и это работает для меня
Если не работает, остановите его
Запустите его снова
Ответ 10
Он показывает сервер звездочки не работает.
Вы можете ввести следующие команды в cli:
выше команды работали для меня!
первая команда запускает звездочку
вторая команда доставит вам звездочку cli
Ответ 11
Тогда вам просто нужно использовать
Обратите внимание, что вам нужно запустить это как root, чтобы получить привилегии для подключения.
Ответ 12
Есть другое решение, если выше не помогло, добавьте:
noload => res_pjsip.so в /etc/asterisk/modules.conf
Ответ 13
Вам нужно только удалить каталог /tmp с помощью команды и нажать кнопку перезагрузить систему. теперь вы можете играть в CLI звездочки, что хотите.
Ответ 14
Возможно, он не работает.
попробуйте выполнить runnign /etc/init.d/asterisk status
Если он не работает, запустите его, используя:
Systemctl start asterisk
Ответ 15
Ответ 16
это bacause, как сказано здесь, я не работал как администратор. Итак, я сделал своего пользователя владельцем каталогов Asterisk.
Ответ 17
просто перейдите в папку установки
Ответ 18
Вы должны быть root.
Ответ 19
Если другие решения не сработают для вас, просто попробуйте (с правами root):
Ответ 20
У меня была аналогичная проблема, которая была связана с заполнением жесткого диска. Оказывается, проблема связана с повреждением таблицы cdr и исправлением в mysql, устраняющей проблему.
Ответ 21
Running Asterisk
Running Asterisk from the Command Line
By default, starting Asterisk will run it in the background:
To disconnect from a connected remote console, simply hit Ctrl+C:
To shut down Asterisk, issue core stop gracefully :
You can stop/restart Asterisk in many ways. See Stopping and Restarting Asterisk From The CLI for more information.
Adding Verbosity
Command line parameters can be combined. The previous command can also be invoked in the following way:
The VERBOSE message level set via the command line is only applicable if the asterisk.conf verbose setting is not set.
Remote Console Verbosity
This feature is only available in Asterisk 11 and later versions.
The verboseness of a remote console is set independently of the verboseness of other consoles and the core. A root console can be created with no verboseness:
While a remote console can be attached to that Asterisk process with a different verbosity:
Multiple remote consoles can be attached, each with their own verbosity:
Executing as another User
Do not run as root
Running Asterisk as root or as a user with super user permissions is dangerous and not recommended. There are many ways Asterisk can affect the system on which it operates, and running as root can increase the cost of small configuration mistakes.
For more information, see the README-SERIOUSLY.bestpractices.md file delivered with Asterisk.
When running Asterisk as another user, make sure that user owns the various directories that Asterisk will access:
More Options
Running Asterisk as a Service
Asterisk can be installed as a service using the make config target:
Asterisk can now be started as a service:
Supported Distributions
1 Child Page
Powered by a free Atlassian Confluence Open Source Project License granted to Asterisk Project. Evaluate Confluence today.
How to set up Asterisk in 10 minutes
Asterisk is an open-source IP PABX, meaning it lets you run a phone system over your computer network. Whilst IP telephony has been gaining the upper hand over traditional PABX’s for years, few people outside the industry realise just how easy it is to set up your own phone server.
With this guide, you can turn any Linux device into your own PABX for free. We’ll set up two SIP devices on a small network, so that they can dial each other.
Prepare the environment
First, you should get something with Linux. A virtual machine, a spare laptop, a Raspberry pi- anything.
Install asterisk with one of the following commands, depending on your distribution:
If you don’t have an IP phone handy, then you need a program on your computer which speaks SIP (Session Initiation Protocol). This guide uses Linphone (available for Linux and Windows among other platforms) and the Polycom 331 as examples, but any two SIP endpoints will work just as well for testing.
Make users on the server
Asterisk keeps its configuration in /etc/asterisk. The file we need to edit for this setup is users.conf. Open it up with your favourite text editor:
The syntax is similar to .ini files. Add two users to the bottom of the file:
What does this mean?
To activate these changes, save the file, and reload the configuration through the Asterisk console:
All of those v‘s stand for verbose, meaning that the asterisk console will give you more information.
Configure the clients
First you should find out your server’s IP address. From the terminal, you can find this with:
Setting up “Example Joe” on a Linphone instance only takes a few clicks. Add a new account, with 6002 as the identity, and your asterisk server as the proxy address (eg: sip://voip.example.com). Click the image below for an example:
Linphone account setup
Meanwhile, the Polycom 331 can be configured as “Example Bob” by navigating the menus on the phone itself, or via the web (suggested). The default login is:
Username: Polycom Password: 456
The Polycom 331 web interface.
Server (SIP) configuration on the left, and line configuration on the right.
Once these are saved, the two clients will register with the server. In SIP, clients periodically register so that the server knows where to find them.
In the asterisk console, you will see something like this:
If registration fails, the console will tell you why, provided that you have set the verbosity high enough
You can check which users have registered with this command:
Unfortunately, even after both users have registered, they aren’t ready to communicate yet.
Add extensions to the server
In the world of VOIP, an extension is not a real loop of copper, but a sequential list of things to do when a number is dialled.
This extra step is where Asterisk gets its flexibility. With your extensions.conf setup, you could set your instance to redirect numbers, or dial for 12 seconds before going to voicemail.
We haven’t told the server what to do, so if “Example Bob” makes a call, it wont work yet:
To add extensions, open extensions.conf up:
The syntax is still INI-like. Under [users], we add the steps for each extension, numbered sequentially. In this case, there is only 1 step for each extension: to dial a SIP user.
In the Asterisk console, type reload to activate the changes.
Now, as planned, both users on the network can dial each-other and have a chat.
More advanced setups
Ok, time to do a reality check. You’ve built an intercom, but not a full phone system! For a start, you need a way to dial the outside world, and let the outside world dial you. For this, you’ll need to work with hardware and service providers.










