Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3925 Переглядів

Hi I wanted to connect my asterisk server (13.X.X-v300) to odoo v11.0.1.0.0 using a module called asterisk_click2dial , now in the form, i typed the required info in the main form of the module, then opened the required ports, when I press the test the connection with asterisk server this error appears, " Connection Test Failed! The error message is: banner incorrect; got 'VoIP API/AMI/2.0.0', expected prefix 'Asterisk Call Manager'" and a log in the asterisk server appears "connection attempt from *.*.*.* unable to authenticate.

i traced the issue in the py-asterisk py file called Manager.py


def _authenticate(self):
'Read the server banner and attempt to authenticate.'

banner = self.file.readline().rstrip()
for enc in ('utf-8', 'latin1'):
try:
banner = banner.decode(enc)
except:
pass
if not banner.startswith(self._AST_BANNER_PREFIX):
raise Exception('banner incorrect; got %r, expected prefix %r' %
(banner, self._AST_BANNER_PREFIX))
action = {
'Username': self.username,
'Secret': self.secret
}

if not self.listen_events:
action['Events'] = 'off'

self.log.debug('Authenticating as %r/%r.', self.username, self.secret)
self._write_action('Login', action)

if self._read_packet().Response == 'Error':
raise AuthenticationFailure('authentication failed.')


as you can see the module can't pass this part of the code.

can anyone help me?

Аватар
Відмінити
Автор

I don't have enough karma to mark this answer as an legitimate answer

thank you, sir

Найкраща відповідь

Hi!

I think that py-asterisk is too old for Asterisk 13 as it has AMI 2.0.

You can change _AST_BANNER_PREFIX from "Asterisk Call Manager" to "API/AMI/2.0.0" and it probably will work.

Also you can check another Asterisk Connector solution called Asterisk Common from the OdooPBX set.

Here it is - https://apps.odoo.com/apps/modules/14.0/asterisk_common/


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
11
лип. 25
18512
1
черв. 19
8370
1
лист. 17
6507
1
черв. 17
5004
1
вер. 21
3950