Subscribing To Events On AMI Login

Home » Asterisk Users » Subscribing To Events On AMI Login
Asterisk Users 3 Comments

I’m looking at an old app I wrote that upon AMI login would subscribe to events as follows:

Action: Login

ActionID: myid

Username: myun

Secret: mypw

Events: call, system, security

I noticed this old code isn’t working, and I *think* that the events parameter of login has been deprecated; I don’t see it referenced in:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Login

I’m using Asterisk 20, so Is the events parameter still valid? I don’t seem to receive any events other than the “FullyBooted” event after login. If not valid, how should I subscribe to events programmatically?

3 thoughts on - Subscribing To Events On AMI Login

  • Ok – so if I forgot to add “security” to the read= line in manager.conf for this user, will that cause the user to be unable to subscribe to the “security” events upon login? (in other words, although subscribed at login, no security events will be shown to this user)

    Thanks

    From: asterisk-users [mailto:asterisk-users-bounces@lists.digium.com] I’m looking at an old app I wrote that upon AMI login would subscribe to events as follows:

    Action: Login

    ActionID: myid

    Username: myun

    Secret: mypw

    Events: call, system, security

    I noticed this old code isn’t working, and I *think* that the events parameter of login has been deprecated; I don’t see it referenced in:

    https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+ManagerAction_Login

    I’m using Asterisk 20, so Is the events parameter still valid? I don’t seem to receive any events other than the “FullyBooted” event after login. If not valid, how should I subscribe to events programmatically?

    The parameter appears to be valid, just implemented in such a way that it likely got missed when writing the documentation. As for not working, you’d need to provide the manager.conf configuration as well. There is also the Events AMI action[1] for changing it after login.

    [1] https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/AMI_Actions/Events/