Страница 2 из 4
Re: Проблема с asterisk gui
Добавлено: 2011-11-06 23:41:12
kuhar2007
Привел конфиг http.conf к следующему виду и он запустился:
Код: Выделить всё
# cat -n /usr/local/etc/asterisk/http.conf
1 ;
2 ; Asterisk Builtin mini-HTTP server
3 ;
4 ;
5 ; Note about Asterisk documentation:
6 ; If Asterisk was installed from a tarball, then the HTML documentation should
7 ; be installed in the static-http/docs directory which is
8 ; (/var/lib/asterisk/static-http/docs) on linux by default. If the Asterisk
9 ; HTTP server is enabled in this file by setting the "enabled", "bindaddr",
10 ; and "bindport" options, then you should be able to view the documentation
11 ; remotely by browsing to:
12 ; http://<server_ip>:<bindport>/static/docs/index.html
13 ;
14 [general]
15 ;
16 ; Whether HTTP/HTTPS interface is enabled or not. Default is no.
17 ; This also affects manager/rawman/mxml access (see manager.conf)
18 ;
19 enabled=yes
20 ;
21 ; Address to bind to, both for HTTP and HTTPS. Default is 0.0.0.0
22 ;
23 bindaddr=46.98.139.93
24 ;
25 ; Port to bind to for HTTP sessions (default is 8088)
26 ;
27 bindport=8088
28 ;
29 ; Prefix allows you to specify a prefix for all requests
30 ; to the server. The default is blank. If uncommented
31 ; all requests must begin with /asterisk
32 ;
33 prefix=asterisk
34 ;
35 ; sessionlimit specifies the maximum number of httpsessions that will be
36 ; allowed to exist at any given time. (default: 100)
37 ;
38 sessionlimit=100
39 ;
40 ; Whether Asterisk should serve static content from http-static
41 ; Default is no.
42 ;
43 enablestatic=yes
44 ;
45 ; Redirect one URI to another. This is how you would set a
46 ; default page.
47 ; Syntax: redirect=<from here> <to there>
48 ; For example, if you are using the Asterisk-gui,
49 ; it is convenient to enable the following redirect:
50 ;
51 redirect = / /static/config/index.html
52 ;
53 ; HTTPS support. In addition to enabled=yes, you need to
54 ; explicitly enable tls, define the port to use,
55 ; and have a certificate somewhere.
56 ;tlsenable=yes ; enable tls - default no.
57 ;tlsbindport=4433 ; port to use - default is 8089
58 ;tlsbindaddr=0.0.0.0 ; address to bind to - default is bindaddr.
59 ;
60 ;tlscertfile=</path/to/certificate.pem> ; path to the certificate file (*.pem) only.
61 ;tlsprivatekey=</path/to/private.pem> ; path to private key file (*.pem) only.
62 ; If no path is given for tlscertfile or tlsprivatekey, default is to look in current
63 ; directory. If no tlsprivatekey is given, default is to search tlscertfile for private key.
64 ;
65 ; To produce a certificate you can e.g. use openssl. This places both the cert and
66 ; private in same .pem file.
67 ; openssl req -new -x509 -days 365 -nodes -out /tmp/foo.pem -keyout /tmp/foo.pem
68 ;
69 ; The post_mappings section maps URLs to real paths on the filesystem. If a
70 ; POST is done from within an authenticated manager session to one of the
71 ; configured POST mappings, then any files in the POST will be placed in the
72 ; configured directory.
73 ;
74 [post_mappings]
75 ;
76 ; In this example, if the prefix option is set to "asterisk", then using the
77 ; POST URL: /asterisk/uploads will put files in /var/lib/asterisk/uploads/.
78 uploads = /var/lib/asterisk/uploads/
79 ;
Но при входе с именем mark и паролем 123, отображается:
"The GUI does not have necessary privileges.
Please check the manager permissions for the user !"
Re: Проблема с asterisk gui
Добавлено: 2011-11-07 6:20:12
vadim64
а что у вас сейчас в manager.conf
Re: Проблема с asterisk gui
Добавлено: 2011-11-07 11:08:52
kuhar2007
vadim64 писал(а):а что у вас сейчас в manager.conf
То как сейчас выглядит manager.conf
Код: Выделить всё
# cat -n /usr/local/etc/asterisk/manager.conf
1 ;
2 ; AMI - The Asterisk Manager Interface
3 ;
4 ; Third party application call management support and PBX event supervision
5 ;
6 ; This configuration file is read every time someone logs in
7 ;
8 ; Use the "manager show commands" at the CLI to list available manager commands
9 ; and their authorization levels.
10 ;
11 ; "manager show command <command>" will show a help text.
12 ;
13 ; ---------------------------- SECURITY NOTE -------------------------------
14 ; Note that you should not enable the AMI on a public IP address. If needed,
15 ; block this TCP port with iptables (or another FW software) and reach it
16 ; with IPsec, SSH, or SSL vpn tunnel. You can also make the manager
17 ; interface available over http/https if Asterisk's http server is enabled in
18 ; http.conf and if both "enabled" and "webenabled" are set to yes in
19 ; this file. Both default to no. httptimeout provides the maximum
20 ; timeout in seconds before a web based session is discarded. The
21 ; default is 60 seconds.
22 ;
23 [general]
24 enabled = yes
25 webenabled = yes
26
27 port = 5038
28 bindaddr = 46.98.139.93
29
30 ; Parameters that control AMI over TLS. ("enabled" must be set too).
31 ; You can open a connection to this socket with e.g.
32 ;
33 ; openssl s_client -connect my_host:5039
34 ;
35 ;tlsenable=no ; set to YES to enable it
36 ;tlsbindport=5039 ; the port to bind to
37 ;tlsbindaddr=0.0.0.0 ; address to bind to, default to bindaddr
38 ;tlscertfile=/tmp/asterisk.pem ; path to the certificate.
39 ;tlsprivatekey=/tmp/private.pem ; path to the private key, if no private given,
40 ; if no tlsprivatekey is given, default is to search
41 ; tlscertfile for private key.
42 ;tlscipher=<cipher string> ; string specifying which SSL ciphers to use or not use
43 ;
44 ;allowmultiplelogin = yes ; IF set to no, rejects manager logins that are already in use.
45 ; ; The default is yes.
46 ;
47 ;displayconnects = yes
48 ;
49 ; Add a Unix epoch timestamp to events (not action responses)
50 ;
51 ;timestampevents = yes
52
53 ;brokeneventsaction = yes ; Restore previous behavior that caused the events
54 ; action to not return a response in certain
55 ; circumstances. Defaults to 'no'.
56
57 ;
58 ; Display certain channel variables every time a channel-oriented
59 ; event is emitted:
60 ;
61 ;channelvars = var1,var2,var3
62
63 ; debug = on ; enable some debugging info in AMI messages (default off).
64 ; Also accessible through the "manager debug" CLI command.
65
66 ; authtimeout specifies the maximum number of seconds a client has to
67 ; authenticate. If the client does not authenticate beofre this timeout
68 ; expires, the client will be disconnected. (default: 30 seconds)
69
70 ;authtimeout = 30
71
72 ; authlimit specifies the maximum number of unauthenticated sessions that will
73 ; be allowed to connect at any given time.
74
75 ;authlimit = 50
76
77 ;httptimeout = 60
78 ; a) httptimeout sets the Max-Age of the http cookie
79 ; b) httptimeout is the amount of time the webserver waits
80 ; on a action=waitevent request (actually its httptimeout-10)
81 ; c) httptimeout is also the amount of time the webserver keeps
82 ; a http session alive after completing a successful action
83
84
85 [mark]
86 secret = 123
87 ;deny=0.0.0.0/0.0.0.0
88 ;permit=209.16.236.73/255.255.255.0
89 ;
90 ;eventfilter=Event: Newchannel
91 ;eventfilter=!Channel: DAHDI*
92 ; The eventfilter option is used to whitelist or blacklist events per user to be
93 ; reported with regular expressions and are allowed if both the regex matches
94 ; and the user has read access set below. Filters are assumed to be for whitelisting
95 ; unless preceeded by an exclamation point, which marks it as being black.
96 ; Evaluation of the filters is as follows:
97 ; - If no filters are configured all events are reported as normal.
98 ; - If there are white filters only: implied black all filter processed first,
99 ; then white filters.
100 ; - If there are black filters only: implied white all filter processed first,
101 ; then black filters.
102 ; - If there are both white and black filters: implied black all filter processed
103 ; first, then white filters, and lastly black filters.
104
105 ;
106 ; If the device connected via this user accepts input slowly,
107 ; the timeout for writes to it can be increased to keep it
108 ; from being disconnected (value is in milliseconds)
109 ;
110 writetimeout = 100
111 ;
112 displayconnects = yes ; Display on CLI user login/logoff
113 ;
114 ; Authorization for various classes
115 ;
116 ; Read authorization permits you to receive asynchronous events, in general.
117 ; Write authorization permits you to send commands and get back responses. The
118 ; following classes exist:
119 ;
120 ; all - All event classes below (including any we may have missed).
121 ; system - General information about the system and ability to run system
122 ; management commands, such as Shutdown, Restart, and Reload.
123 ; call - Information about channels and ability to set information in a
124 ; running channel.
125 ; log - Logging information. Read-only. (Defined but not yet used.)
126 ; verbose - Verbose information. Read-only. (Defined but not yet used.)
127 ; agent - Information about queues and agents and ability to add queue
128 ; members to a queue.
129 ; user - Permission to send and receive UserEvent.
130 ; config - Ability to read and write configuration files.
131 ; command - Permission to run CLI commands. Write-only.
132 ; dtmf - Receive DTMF events. Read-only.
133 ; reporting - Ability to get information about the system.
134 ; cdr - Output of cdr_manager, if loaded. Read-only.
135 ; dialplan - Receive NewExten and VarSet events. Read-only.
136 ; originate - Permission to originate new calls. Write-only.
137 ; agi - Output AGI commands executed. Input AGI command to execute.
138 ; cc - Call Completion events. Read-only.
139 ; aoc - Permission to send Advice Of Charge messages and receive Advice
140 ; - Of Charge events.
141 ; test - Ability to read TestEvent notifications sent to the Asterisk Test
142 ; Suite. Note that this is only enabled when the TEST_FRAMEWORK
143 ; compiler flag is defined.
144 ;
145 read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
146 write = system,call,agent,user,config,command,reporting,originate
147 ;read = system,call,log,verbose,command,agent,config,user
148 ;write = system,call,log,verbose,command,agent,config,user
На сколько я понял то за права доступа отвечает именно эта запись:
Код: Выделить всё
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
Re: Проблема с asterisk gui
Добавлено: 2011-11-07 18:36:16
vadim64
укажите all в полях read и write
обратите внимание на поле permit
Re: Проблема с asterisk gui
Добавлено: 2011-11-07 19:12:08
kuhar2007
vadim64 писал(а):укажите all в полях read и write
обратите внимание на поле permit
Указал
Код: Выделить всё
read = all,system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = all,system,call,agent,user,config,command,reporting,originate
Перезагрузил астериск, но все тоже самое...
Поле permit, как и deny закомментированы по идеи ограничений не должно быть.
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 6:39:20
vadim64
попробуйте назначить какое нибудь значение полю пермит
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 8:58:24
kuhar2007
vadim64 писал(а):попробуйте назначить какое нибудь значение полю пермит
Пробовал назначить:
C этого ip и заходил, результата не дало:(
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 10:19:01
vadim64
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 11:48:40
kuhar2007
vadim64 писал(а):
В мануале также написано, что нужны дополнительные модули подгрузить в ядро, но это для конференции. У себя таких не нашел.
Код: Выделить всё
$ uname -a
FreeBSD wifi-zona.dp.ua 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2
Возможно с этим могла тоже возникнуть проблема?
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 14:32:29
kuhar2007
kuhar2007 писал(а):vadim64 писал(а):
В мануале также написано, что нужны дополнительные модули подгрузить в ядро, но это для конференции. У себя таких не нашел.
Код: Выделить всё
$ uname -a
FreeBSD wifi-zona.dp.ua 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2
Возможно с этим могла тоже возникнуть проблема?
Нашел на форуме лисяры схожую проблему выполнил:
Код: Выделить всё
chmod -R 755 /usr/local/etc/asterisk
chown -R asterisk:asterisk /usr/local/etc/astersisk/
chown -R asterisk:asterisk /usr/local/share/asterisk/
sh /usr/local/etc/rc.d/asterisk restart
Но теперь при логине выскакивает
Код: Выделить всё
Your configuration will now be upgraded to work with the latest version of GUI.
An automatic backup of your old configuration is available from the backups panel.
В логах записано:
Код: Выделить всё
[Nov 8 13:23:16] ERROR[1722] codec_dahdi.c: Failed to open /dev/dahdi/transcode: No such file or directory
[Nov 8 13:23:34] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:23:47] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:23:52] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:24:07] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:24:13] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:24:18] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:24:24] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 8 13:27:26] WARNING[1722] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
Капаю дальше...
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 14:45:05
kuhar2007
Оно и понятно у меня даже директории такой нет:
Код: Выделить всё
ERROR[1722] codec_dahdi.c: Failed to open /dev/dahdi/
Можете что-то нужно доустановить?
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 15:45:15
kuhar2007
Добавил в modules.conf чтобы не грузился модуль dahdi.so
Сейчас в логах:
Код: Выделить всё
# tail -f /var/log/asterisk/messages
[Nov 8 14:36:08] NOTICE[3163] cel_tds.c: cel_tds has no global category, nothing to configure.
[Nov 8 14:36:08] WARNING[3163] cel_tds.c: cel_tds module had config problems; declining load
[Nov 8 14:36:08] WARNING[3163] chan_unistim.c: Your OS does not support IP_PKTINFO, you must set public_ip.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: Starting AEL load process.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: AEL load process: parsed config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: AEL load process: checked config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: AEL load process: compiled config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: AEL load process: merged config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 8 14:36:08] NOTICE[3163] pbx_ael.c: AEL load process: verified config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 8 14:36:17] WARNING[3163] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
После всех манипуляций при входе в гуи отображается в браузере:
"Your configuration will now be upgraded to work with the latest version of GUI.
An automatic backup of your old configuration is available from the backups panel."
И предлагается нажать "ок", при нажатии снова осуществляются некии манипуляции с всплывающими окнами, после чего снова вылазит "Your configuration will now be..."
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 16:20:12
kuhar2007
Все пофиксил. Помимо всего перечисленного нужно было поправить index.js, а именно в методе detectPlatform надо изменить строку
с
Код: Выделить всё
if ( resp_lower.contains("branches/1.6") || resp_lower.contains("asterisk/1.6") || resp_lower.contains("svn-branch-1.6") || resp_lower.contains("svn-trunk-") )
на
Код: Выделить всё
if ( resp_lower.contains("branches/1.6") || resp_lower.contains("asterisk/1.8") || resp_lower.contains("svn-branch-1.6") || resp_lower.contains("svn-trunk-") )
Index.js находится
Код: Выделить всё
/usr/local/share/asterisk/static-http/config/js/index.js
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 16:29:18
kuhar2007
Просьба к админам, внесите плизз эти корректировки с статью:
http://www.lissyara.su/articles/freebsd ... sk_ip_pbx/
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 17:22:18
Electronik
Написал бы лучше свою. Та немного устарела, да и у тебя тема другая. Мы, думаю, если что подскажем.
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 17:58:52
kuhar2007
Ок, напишу новую, как напишу кину ссылку. Подредактируете;)
Re: Проблема с asterisk gui
Добавлено: 2011-11-08 23:35:48
kuhar2007
Ребята, гуглил по поводу zaptel на фрю нашел что сейчас используется dahdi.
Вопрос возник так при входе в Configure hardware в asterisk gui отображается ошибка:
Код: Выделить всё
Please check if ztscan is installed ?
/usr/local/etc/asterisk/ztscan.conf not found
Так и не нашел решения этой проблемы.
Help me please
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 1:07:03
diff
kuhar2007 писал(а):Ребята, гуглил по поводу zaptel на фрю нашел что сейчас используется dahdi.
Вопрос возник так при входе в Configure hardware в asterisk gui отображается ошибка:
Код: Выделить всё
Please check if ztscan is installed ?
/usr/local/etc/asterisk/ztscan.conf not found
Так и не нашел решения этой проблемы.
Help me please
Скорее всего должен быть dahdiscan (The ZapScan application has been renamed to DAHDIScan.) from file Zaptel-to-DAHDI.txt
Может лучше попробовать FreePBX
http://www.freepbx.org/support/document ... or-freebsd
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 9:22:24
Electronik
я так и не смог FreePBX под FreeBSD запустить, точнее даже корректно его установить. А на линуксе отлично работает.
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 10:20:55
kuhar2007
diff писал(а):kuhar2007 писал(а):Ребята, гуглил по поводу zaptel на фрю нашел что сейчас используется dahdi.
Вопрос возник так при входе в Configure hardware в asterisk gui отображается ошибка:
Код: Выделить всё
Please check if ztscan is installed ?
/usr/local/etc/asterisk/ztscan.conf not found
Так и не нашел решения этой проблемы.
Help me please
Скорее всего должен быть dahdiscan (The ZapScan application has been renamed to DAHDIScan.) from file Zaptel-to-DAHDI.txt
Может лучше попробовать FreePBX
http://www.freepbx.org/support/document ... or-freebsd
Я бы поставил FreePBX если бы он был в портах... Из исходников пробывал ставить не получается.
Всетаки хотелось бы допилить до конца гуи астериска.
Подскажите плизз с чем может быть связан трабл, когда создаешь новый Dial Plans при тыкании на кнопку Save абсолютно ничего не происходит...
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 10:24:58
Gamerman
Я когда-то с гуи работал так:
1. Забил на порт, так как оно сильно отставал.
2. Вытягивал по svn.
3. Заменял все пути в файлах на Фрьовые (так как в Линупсах пути другие).
4. Работал.
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 10:49:35
kuhar2007
Ну, а все же может кто-то сможет подсказать с чем может быть связан трабл, когда создаешь новый Dial Plans при тыкании на кнопку Save абсолютно ничего не происходит?
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 14:12:17
Electronik
А что в логах?
Re: Проблема с asterisk gui
Добавлено: 2011-11-09 14:38:39
kuhar2007
Electronik писал(а):А что в логах?
Код: Выделить всё
# tail -f /var/log/asterisk/messages
[Nov 9 13:38:01] NOTICE[4953] cdr_sqlite.c: This module has been marked deprecated in favor of using cdr_sqlite3_custom.
[Nov 9 13:38:01] NOTICE[4953] cel_tds.c: cel_tds has no global category, nothing to configure.
[Nov 9 13:38:01] WARNING[4953] cel_tds.c: cel_tds module had config problems; declining load
[Nov 9 13:38:02] WARNING[4953] chan_unistim.c: Your OS does not support IP_PKTINFO, you must set public_ip.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: Starting AEL load process.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: AEL load process: parsed config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: AEL load process: checked config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: AEL load process: compiled config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: AEL load process: merged config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 9 13:38:02] NOTICE[4953] pbx_ael.c: AEL load process: verified config file name '/usr/local/etc/asterisk/extensions.ael'.
[Nov 9 13:39:14] WARNING[4953] app_system.c: Unable to execute 'ztscan > /usr/local/etc/asterisk/ztscan.conf'
[Nov 9 13:39:15] WARNING[4953] manager.c: HTTP Manager, fdopen failed: Bad file descriptor!
Явно проблема с Zaptel, поставил dahdi-kmod, но вот не пойму что еще нужно кроме добавления его в rc.conf
Re: Проблема с asterisk gui
Добавлено: 2011-11-11 17:04:31
kuhar2007
Не у кого больше нет вариантов?
Я что-то не могу нагуглить...