staskobzar/amiws

Help with asterisk 15.4.1

Udirley opened this issue · 7 comments

Hello, I need your help again.
I upgraded my asterisk version to 15.4.1, and some commands are not responding correctly.

screenshot_1

On the first request I sent 'core show uptime' and got the answer in the 'Output' object correctly.
On the second request I sent 'queue show' in this case the 'Output' object returned empty.
In the third request I sent 'pjsip list endpoints' in this case the 'Output' object returned empty.

Notice that the response appears in the event but not in the 'Output' object, it is as if the json was not formatted correctly and because this notation can not be decoded.
I am using the latest version of 'amiws-master' and my linux is Centos 7.

Please, I need your help.

Hello Udirley,

I will try to check it next week. Meanwhile, it looks like the problem is the multiple "Output" headers.
Can you, please, check if Asterisk AMI channel is sending messages with multiple Output headers?

Thanks,

thank, first

could i get some information about yy48 - yy49, yy212 - yy213
i can expect what cause by kill amiws.

amiws daemon sometines killed by segfault

4170a7 <-- about yy48 - yy49
418251 <-- about yy212 - yy213

Hello,

Those are the variables generated by re2c lexer for AMI protocol parser.
This is quite old implementation. The files with ragel instructions are in directory "src/lib" with extension *.re

This might be needed to regenerate those files. You may try to regenerate those file by running commands from the dir "src/lib"

re2c --no-generation-date -o amipack_parser_detect.c amipack_parser_detect.re
re2c --no-generation-date -c -o amipack_parser_prompt.c amipack_parser_prompt.re
re2c --no-generation-date --tags -o amipack_parser_message.c amipack_parser_message.re
re2c --no-generation-date --tags -o amipack_parser_command.c amipack_parser_command.re
re2c --no-generation-date -c --tags -o amipack_parser_queue.c amipack_parser_queue.re

I do not have much time to support the project, sorry. Also, I was thinking to re-write this utility with Go but I do not know yet when I do that.

thanks for reply.

if i use asterisk 16.X +, should i change amipack_parser_prompt.re ?

i try excute re2c outfile was littlebit diff maybe version is change.

thanks again

Yes, probably it is changed since some time.
I did not tried with Asterisk ver 11+ and AMI was slightly changed.
However, prompt is the same, I am sure about that.

Thanks

I got it. what you mean.

should i look forward Go ? haha 👍

have a great day !

Welcome.
I am sorry, I do not have time to work on the project right now.
If you find a solution or if you have an idea how to fix, please, feel free to contribute and send me a pull request.

Have a good day!