Asterisk Manager Performance (Asterisk V16 - AMI 5)

I just upgrade to Asterisk 16, and I have a PHP script to connect to AMI, all worked ok in Previous versions of Asterisk, but in this version, in takes a lot of time executing the commands to delete or create data in Asterisk SQLite database.

Is an issue of AMI 5?

1 Like

Insufficient information, to determine if is Asterisk issue or PHP

I guess is an Asterisk issue because the same script in the version 13.23 of Asterisk works as expected.

Is there any change-log of Asterisk Manager?

http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-16-current

That change-log is related to Asterisk, What about the AMI,

In the version 13.23 of Asterisk the AMI version is 2.10.4

telnet localhost 5038
Trying ::1%1…
telnet: connect to address ::1%1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Asterisk Call Manager/2.10.4

But in Asterisk 16 the AMI Version is 5.0.0

telnet localhost 5038
Trying ::1%1…
telnet: connect to address ::1%1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Asterisk Call Manager/5.0.0

is there a change log for this change of versions?

AMI is an API of Asterisk and is in the same source tar ball. The change log includes everything in that tar ball

But don’t say nothing about AMI 5.0.0, I believe that there is a lack of documentation about AMI changes

I found a difference between AMI 2 and AMI 5, the command action doesn’t return the “–END COMMAND–” line, and now the responses are preceded of the word “output”, look at this example:

Asterisk Call Manager/5.0.0

Response: Success
Message: Authentication accepted
Response: Success
Message: Command output follows
Output: 0 results found.

Asterisk Call Manager/2.10.4

Response: Success
Message: Authentication accepted
Response: Follows
Privilege: Command
0 results found.
--END COMMAND--

However, I can say that is not an issue of Asterisk, my script was expecting the “–END COMMAND–” line, that’s why in version 16 is slow.

Thanks for all your help

–END COMMAND– line is not present on the AMI version of Asterisk 16, that caused that was needed to modify all my scripts who were expecting that line

2 Likes

@jcolp talk about this new behaviour on this thread https://asteriskfaqs.org/2018/10/12/asterisk-users/asterisk-16-manager-end-command.html

And Sorry Josh to tagged you, just did it because you are the Author of the above thread

2 Likes