Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Ahn can't connect properly to manager using a read only user for events

#135

When creating a read only user in Asterisk manager:
[reader] secret=reader
displayconnects=yes
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.255
read=system,call,agent,user,config,command,reporting,originate,all

And attempting to use ahn to have manager's events, it raises the following exception:
INFO ahn: Adhearsion v1.1.1 initialized! DEBUG ami: Sending AMI action:

Action: login ActionID: bQVfVois-zWM5-JWYK-9KfE-uhck2hdnGPyx Username: reader Secret: reader Events: Off

INFO ami: Successful AMI actions-only connection into reader@127.0.0.1 DEBUG ami: Sending AMI action:
Action: coresettings ActionID: mArEEZf7-Ulq4-gRwR-PPSW-gUHSSrZKFrqe

ERROR ami: Received an AMI error with an unrecognized ActionID!! This may be an bug! #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceError: Adhearsion::VoIP::Asterisk::Manager::ManagerInterfaceError>
ERROR ami: Error connecting to AMI! #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterface::AuthenticationFailedException: Incorrect username and password! Permission denied>
[Tue Jul 19 11:01:16 2011] Adhearsion::VoIP::Asterisk::AGI::Server::RubyServer 0.0.0.0:4573 start

Only when adding write permissions solves the exception.

Reported by ik_5 · July 19th, 2011 @ 04:10 AM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Ben Langfeld
    Ben Langfeld

    The problem here is that we execute the CoreSettings action in order to establish the Asterisk version, and hence which commands are supported (https://github.com/adhearsion/adhearsion/blob/develop/lib/adhearsio.... If we could not do this, we would have to err on the side of caution and assume Asterisk 1.6. I can add a :actions option to the AMI config which when set to false would prevent start up of an actions connection. Would this solve your problem?

    July 19th, 2011 @ 04:30 AM

  2. ik_5
    ik_5

    It would solve the problem, but now that I understand how it works in ahn, I do not really need reader and writer only users (that solved the deadlock issue of manager).

    I think it's better to document the feature rather then to "fix" this.
    Can a person outside the github project can add such information to the wiki ?

    July 19th, 2011 @ 04:35 AM

  3. Ben Langfeld
    Ben Langfeld

    You can certainly edit the wiki, yes. It might also be useful to have a note in the generated statup.rb file.

    July 28th, 2011 @ 01:20 PM

  4. Ben Langfeld

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.