Страница 1 из 1

Регистрация через AMI с применением алгоритма MD5

Добавлено: 09 дек 2013, 15:58
yuo23
Всем привет!
Не проходит авторизация при использовании алгоритма MD5. Без MD5 всё нормально. Что не так делаю?
************************************************
АВТОРИЗАЦИЯ БЕЗ MD5
[root@localhost ~]# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Asterisk Call Manager/1.3
action:login
username:admin
secret:amp111xxx

Response: Success
Message: Authentication accepted

Event: FullyBooted
Privilege: system,all
Status: Fully Booted

action:logoff

Response: Goodbye
Message: Thanks for all the fish.

Connection closed by foreign host.
[root@localhost ~]#
**********************************************
АВТОРИЗАЦИЯ C MD5
[root@localhost ~]# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Asterisk Call Manager/1.3
action:challenge
username:amp111xxx
authtype:md5

Response: Success
Challenge: xxxxxxxxx

На сайте http://foxtools.ru/Hash вычисляю хеш-сумму
для строки:xxxxxxxxxamp111xxx
Получаю кеу:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

[root@localhost ~]# telnet 127.0.0.1 5038
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Asterisk Call Manager/1.3
action:login
username:admin
authtype:md5
key:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Response: Error
Message: Authentication failed

Connection closed by foreign host.
[root@localhost ~]#


**************************************************

;
; AMI - Asterisk Manager interface
;
; FreePBX needs this to be enabled. Note that if you enable it on a different IP, you need
; to assure that this can't be reached from un-authorized hosts with the ACL settings (permit/deny).
; Also, remember to configure non-default port or IP-addresses in amportal.conf.
;
; The AMI connection is used both by the portal and the operator's panel in FreePBX.
;
; FreePBX assumes an AMI connection to localhost:5038 by default.
;
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0

displayconnects=no ;only effects 1.6+
allowmultiplelogin = yes

[admin]
secret = amp111xxx
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
write = system,call,log,verbose,command,agent,user,config,command,dtmf,reporting,cdr,dialplan,originate
writetimeout = 5000

#include manager_additional.conf
#include manager_custom.conf