Which Events Is Generated As Asterisk Manager Logoff

Home » Asterisk Users » Which Events Is Generated As Asterisk Manager Logoff
Asterisk Users 10 Comments

Hi Team,

I am working on Asterisk Events and I am using asterisk 11.4 right now. I
want to know which events is regenerates(activate) when asterisk manager logoff from asterisk.

I saw *fullybooted *was active when I login into asterisk as manager but no event at logoff time i found.

10 thoughts on - Which Events Is Generated As Asterisk Manager Logoff

  • When you logoff yourself, then you send the “Logoff” Action. Asterisk answers with the response
    “Goodbye” and, being a polite dolphin, it thanks for all the fish.

    If Asterisk shuts down, it sends a “Shutdown” event.

    You would still have to monitor the state of the socket connection, in case something else happens.


  • There is no such thing as a “Logoff” event. You issue a “Logoff” action and get a reponse. Only if Asterisk is shutting down, there will be a “Shutdown” event.

    It looks like this (> denotes what you a sending, and > what you will receive from Asterisk):

    > Action: Logoff
    > ActionID: 4711

    < Response: Goodbye < ActionID: 4711 < Message: Thanks for all the fish. jg

  • Okay But I looking for an events which will invoke by asterisk when asterisk manager lost connection.

    My problem is: I am working on events programming and it’s work perfect but sometime don’t know why asterisk manager connection lost, So i am looking for an events of logoff of asterisk manager so that I will reconnect asterisk manager again back,,,

  • As I said:

    – Do it yourself (Action Logoff)
    – Process the Shutdown event
    – control the state of the socket

    I have Manager sessions running for hours without any connection losses. So if you have connection losses then there is likely something else.


  • Thanks for reply but my question is still not resolved. I will use other method. My connection work 4-6days easily but I am looking for route case of problem

  • As I said, I am running a event capture program and it looks for Events and work on the basis of events. But some time it stop working so I want to auto-connect with asterisk back as it was disconnect with asterisk AMI.

  • It is not enough to wait for events. If somebody pulls a cable, or disables a NIC, how can Asterisk possibly send an event?

    Which library are you using to capture the events?

    What happens if you get a malformed event, like multiple \r\n, or missing value, or \n instead of \r\n. This is all beyond Asterisk events.


  • and connection again and profit. https://twitter.com/pabelanger

    Which lang are you writing this in? Its more than likely that there’s already a lib that deals with all of this for you, which should deal with reconnects and gives you the events/responses