Asterisk manager and events

185 views
Skip to first unread message

ik

unread,
Jul 18, 2011, 3:20:08 AM7/18/11
to Adhearsion
Hello list,

I'm trying to listen to manager events with ahn, but I with debug log that it set in the login the parameter of Events: Off instead of On, even though I placed :events => true

What am I missing or doing wrong ?

Thanks,
Ido

LINESIP - Opening the source for communication
http://www.linesip.com
http://www.linesip.co.il


Ben Langfeld

unread,
Jul 18, 2011, 4:22:27 AM7/18/11
to adhea...@googlegroups.com
Adhearsion actually makes two AMI connections when you have :events => true. This is because there is no way to tell the difference between normal events, and causal events following a command. As such, the only way to separate these is to have them on another socket. Thus, there is an actions connection where events are turned off, and an events connection where no actions happen.

You should still see a second login, and if you uncomment the relevant section of events.rb (https://github.com/adhearsion/adhearsion/blob/develop/app_generators/ahn/templates/events.rb#L14) then you should have access to these events.

Regards,
Ben Langfeld


--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to adhea...@googlegroups.com.
To unsubscribe from this group, send email to adhearsion+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en.

ik

unread,
Jul 19, 2011, 3:56:11 AM7/19/11
to adhea...@googlegroups.com
On Mon, Jul 18, 2011 at 11:22, Ben Langfeld <b...@langfeld.co.uk> wrote:
Adhearsion actually makes two AMI connections when you have :events => true. This is because there is no way to tell the difference between normal events, and causal events following a command. As such, the only way to separate these is to have them on another socket. Thus, there is an actions connection where events are turned off, and an events connection where no actions happen.

You should still see a second login, and if you uncomment the relevant section of events.rb (https://github.com/adhearsion/adhearsion/blob/develop/app_generators/ahn/templates/events.rb#L14) then you should have access to these events.

I think that I found the problem:

>>> Action: login
>>> ActionID: yQ7m9QKq-zqoE-tjN3-5Rs6-B8loblB4wMd0
>>> Username: ***
>>> Secret: ****
>>> Events: Off
>>>
 INFO ami: Successful AMI actions-only connection into ****@127.0.0.1
DEBUG ami: Sending AMI action:
>>> Action: coresettings
>>> ActionID: CjNiilVN-7CxY-IrCq-ktl9-LIrxF1XNA3eJ
>>>
ERROR ami: Error connecting to AMI! #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterface::AuthenticationFailedException: Incorrect username and password! Permission denied>
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>

How can I solve it ? It seems that the first login works well, but the second one does not.


Regards,
Ben Langfeld


Thanks,
Ido

ik

unread,
Jul 19, 2011, 4:12:12 AM7/19/11
to adhea...@googlegroups.com
On Tue, Jul 19, 2011 at 10:56, ik <ido...@gmail.com> wrote:
On Mon, Jul 18, 2011 at 11:22, Ben Langfeld <b...@langfeld.co.uk> wrote:
Adhearsion actually makes two AMI connections when you have :events => true. This is because there is no way to tell the difference between normal events, and causal events following a command. As such, the only way to separate these is to have them on another socket. Thus, there is an actions connection where events are turned off, and an events connection where no actions happen.

You should still see a second login, and if you uncomment the relevant section of events.rb (https://github.com/adhearsion/adhearsion/blob/develop/app_generators/ahn/templates/events.rb#L14) then you should have access to these events.

I think that I found the problem:

>>> Action: login
>>> ActionID: yQ7m9QKq-zqoE-tjN3-5Rs6-B8loblB4wMd0
>>> Username: ***
>>> Secret: ****
>>> Events: Off
>>>
 INFO ami: Successful AMI actions-only connection into ****@127.0.0.1
DEBUG ami: Sending AMI action:
>>> Action: coresettings
>>> ActionID: CjNiilVN-7CxY-IrCq-ktl9-LIrxF1XNA3eJ
>>>
ERROR ami: Error connecting to AMI! #<Adhearsion::VoIP::Asterisk::Manager::ManagerInterface::AuthenticationFailedException: Incorrect username and password! Permission denied>
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>

How can I solve it ? It seems that the first login works well, but the second one does not.
Reply all
Reply to author
Forward
0 new messages