[asterisk-users] AMI FullyBooted issue

Terry Wilson twilson at digium.com
Thu Feb 24 11:05:24 CST 2011


On Feb 23, 2011, at 4:39 AM, Ishfaq Malik wrote:

> Hi
> 
> We're still testing out asterisk 1.8 (using 1.8.2.2 from rpm package)
> before putting it into production and I'm observing an odd issue when
> using the AMI
> 
> Every request I send to the AMI just results in a FullyBooted response
> rather than the expected response. Here are some examples from my logs
> 
> -- Call started: 22/02/2011 11:34:03 --
> action: command
> command: core show channels
> 
> Event: FullyBooted
> Privilege: system,all
> SequenceNumber: 1706
> File: manager.c
> Line: 2937
> Func: action_login
> Status: Fully Booted
> 
> 
> -- Call started: 22/02/2011 10:28:15 --
> action: command
> command: sip show peers
> 
> Event: FullyBooted
> Privilege: system,all
> SequenceNumber: 1610
> File: manager.c
> Line: 2937
> Func: action_login
> Status: Fully Booted
> 
> 
> Has anyone else experienced anything like this?

Is this a new AMI connection for each command? If so, that is the problem. Whenever a connection is made, Asterisk informs the connector that it is FullyBooted and it is safe to start sending commands. If it didn't do this, if multiple machines are making a new connection, only one of them would get notified.

The proper thing to do would be to maintain an open connection for sending commands, or to expect the command upon connection and only send after that. You are probably getting the message you expect after the FullyBooted response, so this would be a parsing error on your part. Assign an ActionID to the event you send and the response you are looking for will have that ActionID in it as well.


More information about the asterisk-users mailing list