Страница 2 из 2
Re: проблемы с настройкой на MySQL
Добавлено: 04 авг 2013, 02:33
ded
nucleon писал(а):собственно проблема с настройкой на работу с базой MySQL
при попытки соедениться, с любым пользователем,
Скажите, что именно Вы настраиваете в Астериске для работы с базой MySQL? Есть несколько несвязанных между собой функциональностей. Например - типичное использование, хранение CDR в базе MySQL.
Судя по
Код: Выделить всё
Realtime mapping for 'voicemail' found to engine 'mysql', but the engine is not available
Вы пытаетесь запустить Realtime модель? Судя по Вашим конфигам и логам выше - это Вам пока не по плечу. А может быть всё проще? Проверяйте, если
Код: Выделить всё
dbhost = 127.0.0.1
dbname = asterisk
dbuser = asterisk
то после
Код: Выделить всё
mysql -uasterisk -pпароль -h 127.0.0.1 asterisk
выполняйте команды
mysql > show databases;
mysql > use asterisk;
mysql > show tables;
mysql> SELECT * FROM [table name];
etc.
Так на командном уровне и проверите - что у вас есть в таблицах, а чего нет. А лучше забейте в Гугль слова "настройка Астериск realtime", найдите внятную инструкцию, и выполните её буквально. Иначе тут топик грозит на 5 страниц развернуться.
Re: проблемы с настройкой на MySQL
Добавлено: 04 авг 2013, 13:44
nucleon
в настройках хочу хранить настройки пользователей (номер, группу перехвата, права на звонки,...)
+ статистику.
mysql > show databases;
mysql > use asterisk;
mysql > show tables;
mysql> SELECT * FROM [table name];
mysql> use asterisk;
Database changed
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| asterisk |
+--------------------+
2 rows in set (0.00 sec)
mysql> show tables;
+--------------------+
| Tables_in_asterisk |
+--------------------+
| cdr |
| extensions |
| sipusers |
| voicemail |
+--------------------+
4 rows in set (0.00 sec)
mysql> SELECT * FROM cdr;
Empty set (0.00 sec)
SELECT * FROM extensions;
+----+---------+----------+----------+------+---------+
| id | context | exten | priority | app | appdata |
+----+---------+----------+----------+------+---------+
| 1 | factory | _XXXXXXX | 1 | NoOp | |
+----+---------+----------+----------+------+---------+
1 row in set (0.00 sec)
mysql> SELECT * FROM sipusers;
+----+-------------+----------+-------------------------+--------------+----------------+---------------+----------+-------------+------+----------+-----------+----------+------------+----------+------------+-------------+-------------+---------+-----------+----------+----------+------------+-------------+-----------------+---------+----------+--------+----------+--------+---------+----------------+------------+-----------+-------------+-----------+-----+---------------+------+--------+-------------+------+----------------+--------------+---------+----------+------------+-------------------+------------+----------------+------------+----------+--------+------------------+--------------+-------------+-----------+--------+---------------+----------+-------------+--------------+---------+
| id | accountcode | disallow | allow | allowoverlap | allowsubscribe | allowtransfer | amaflags | autoframing | auth | buggymwi | callgroup | callerid | cid_number | fullname | call-limit | callingpres | canreinvite | context | defaultip | dtmfmode | fromuser | fromdomain | fullcontact | g726nonstandard | host | insecure | ipaddr | language | lastms | mailbox | maxcallbitrate | mohsuggest | md5secret | musiconhold | name | nat | outboundproxy | deny | permit | pickupgroup | port | progressinband | promiscredir | qualify | regexten | regseconds | rfc2833compensate | rtptimeout | rtpholdtimeout | secret | sendrpid | setvar | subscribecontext | subscribemwi | t38pt_udptl | trustrpid | type | useclientcode | username | usereqphone | videosupport | vmexten |
+----+-------------+----------+-------------------------+--------------+----------------+---------------+----------+-------------+------+----------+-----------+----------+------------+----------+------------+-------------+-------------+---------+-----------+----------+----------+------------+-------------+-----------------+---------+----------+--------+----------+--------+---------+----------------+------------+-----------+-------------+-----------+-----+---------------+------+--------+-------------+------+----------------+--------------+---------+----------+------------+-------------------+------------+----------------+------------+----------+--------+------------------+--------------+-------------+-----------+--------+---------------+----------+-------------+--------------+---------+
| 1 | NULL | all | g729;ilbc;gsm;ulaw;alaw | yes | yes | NULL | NULL | NULL | NULL | no | NULL | NULL | NULL | NULL | 0 | NULL | yes | NULL | NULL | NULL | NULL | NULL | NULL | no | dynamic | NULL | | en | 0 | NULL | 384 | NULL | NULL | NULL | neo | no | NULL | NULL | NULL | NULL | | no | no | NULL | 1000001 | 0 | no | NULL | NULL | password | yes | | NULL | NULL | no | no | friend | no | | no | yes | NULL |
| 2 | 0001 | all | g729;ilbc;gsm;ulaw;alaw | yes | yes | NULL | NULL | NULL | | no | NULL | NULL | NULL | NULL | 0 | NULL | yes | NULL | NULL | NULL | NULL | NULL | NULL | no | dynamic | NULL | | NULL | NULL | NULL | 384 | NULL | NULL | NULL | Alekzandr | no | NULL | NULL | NULL | NULL | | no | no | NULL | | 0 | no | NULL | NULL | 1234512345 | yes | | NULL | NULL | no | no | friend | no | nucleon | no | yes | NULL |
+----+-------------+----------+-------------------------+--------------+----------------+---------------+----------+-------------+------+----------+-----------+----------+------------+----------+------------+-------------+-------------+---------+-----------+----------+----------+------------+-------------+-----------------+---------+----------+--------+----------+--------+---------+----------------+------------+-----------+-------------+-----------+-----+---------------+------+--------+-------------+------+----------------+--------------+---------+----------+------------+-------------------+------------+----------------+------------+----------+--------+------------------+--------------+-------------+-----------+--------+---------------+----------+-------------+--------------+---------+
2 rows in set (0.00 sec)
mysql> SELECT * FROM voicemail;
Empty set (0.00 sec)
кстати изменение asterisk на general сделал еще раз, возможно в сумме каких-то других изменений итоговый вывод поменялся:
[Aug 4 13:21:45] NOTICE[27586] cdr.c: CDR simple logging enabled.
[Aug 4 13:21:45] NOTICE[27586] loader.c: 172 modules will be loaded.
[Aug 4 13:21:45] WARNING[27586] res_config_ldap.c: No directory user found, anonymous binding as default.
[Aug 4 13:21:45] ERROR[27586] res_config_ldap.c: No directory URL or host found.
[Aug 4 13:21:45] NOTICE[27586] res_config_ldap.c: Cannot load LDAP RealTime driver.
[Aug 4 13:21:45] NOTICE[27586] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Aug 4 13:21:45] ERROR[27586] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1:
[Aug 4 13:21:45] WARNING[27586] res_config_pgsql.c: PostgreSQL RealTime: Couldn't establish connection. Check debug.
[Aug 4 13:21:45] NOTICE[27586] config.c: Registered Config Engine pgsql
[Aug 4 13:21:45] WARNING[27586] config.c: Realtime mapping for 'sippeers' found to engine 'mysql', but the engine is not available
[Aug 4 13:21:45] WARNING[27586] config.c: Realtime mapping for 'sippeers' found to engine 'mysql', but the engine is not available
[Aug 4 13:21:45] NOTICE[27586] chan_skinny.c: Configuring skinny from skinny.conf
[Aug 4 13:21:45] WARNING[27586] utils.c: trying to reset empty pool
[Aug 4 13:21:45] WARNING[27586] utils.c: trying to reset empty pool
[Aug 4 13:21:45] WARNING[27586] utils.c: trying to reset empty pool
[Aug 4 13:21:45] WARNING[27586] res_config_mysql.c: MySQL realtime: no requirements setting found, using 'warn' as default.
[Aug 4 13:21:45] NOTICE[27586] config.c: Registered Config Engine mysql
[Aug 4 13:21:45] NOTICE[27586] chan_ooh323.c: ---------------------------------------------------------------------------------
--- ******* IMPORTANT NOTE ***********
---
--- This module is currently unsupported. Use it at your own risk.
---
---------------------------------------------------------------------------------
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: Starting AEL load process.
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'.
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'.
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'.
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'.
[Aug 4 13:21:45] NOTICE[27586] pbx_ael.c: AEL load process: verified config file name '/etc/asterisk/extensions.ael'.
[Aug 4 13:21:45] WARNING[27586] res_config_mysql.c: Realtime table general@voicemail: Column 'password' should be at least 10 long, but is only 4 long.
[Aug 4 13:22:47] NOTICE[27599] chan_sip.c: Registration from '"neo"<sip:0000@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
[Aug 4 13:22:47] NOTICE[27599] chan_sip.c: Registration from '"nucleon"<sip:0001@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
[Aug 4 13:22:59] NOTICE[27599] chan_sip.c: Registration from '"neo"<sip:0000@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
[Aug 4 13:22:59] NOTICE[27599] chan_sip.c: Registration from '"nucleon"<sip:0001@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
[Aug 4 13:23:27] NOTICE[27599] chan_sip.c: Registration from '"neo"<sip:0000@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
[Aug 4 13:23:27] NOTICE[27599] chan_sip.c: Registration from '"nucleon"<sip:0001@10.10.10.1:5060>' failed for '10.10.10.2' - No matching peer found
да и еще не знаю важно это или нет, но я поменял порядок загрузки модулей в modules.conf:
load => res_config_mysql.so
load => cdr_addon_mysql.so
load => app_addon_sql_mysql.so
; load => res_config_mysql.sor
Re: проблемы с настройкой на MySQL
Добавлено: 04 авг 2013, 13:47
nucleon
на сколько я понял, сейчас у меня проблема только в том, что у меня нет правильных пользователей =)
Re: проблемы с настройкой на MySQL
Добавлено: 04 авг 2013, 14:20
awsswa
phpmyadmin в руки и заводите
при вашей квалификации, лучше не мается фигней и поставить дистрибутив
Re: проблемы с настройкой на MySQL
Добавлено: 05 авг 2013, 01:31
nucleon
ну в принципе все, тему можно закрыть
спасибо всем кто помогал
Re: проблемы с настройкой на MySQL
Добавлено: 06 авг 2013, 09:47
root07
Asterisk Module and Build Option Selection
**************************************************
Press 'h' for help.
---> Add-ons (See README-addons.txt)
Applications
Bridging Modules
Call Detail Recording
Channel Event Logging
Channel Drivers
Codec Translators
Format Interpreters
Dialplan Functions
PBX Modules
Resource Modules
Test Modules
Compiler Flags
Voicemail Build Options
Utilities
AGI Samples
Module Embedding
Core Sound Packages
Music On Hold File Packages
Extras Sound Packages
Проверить стоит ли в addons галочка res_config_mysql