-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long AMI Responses Timeout #7
Comments
Have you tried running astmanproxy in debug mode in the foreground? It should report what it receives from you and how it plans to respond. Which protocol does the C# manager library use? I've only really done any work on the raw AMI protocol, and not the HTTP path. |
Sorry about that, I mainly program C# so that was just code the I knew best and was working with at the time. It uses the standard AMI protocol, I don't know what programming langue you prefer though. The code that actually failed when switching to the proxy is a PHP script, I am just not that experienced with PHP though.
Doing some tests with this instead seems to work on my test server, but not a production server. It may be Asterisk version related too? Since my C# program fail using the proxy every time on either, but the PHP script only fails on the production Asterisk through the proxy. Test Asterisk version: 1.8.11 Summary:
I am gonna attempt some tests running proxy in debug mode now. |
Okay, this may be caused by a nasty limitation of astmanproxy which has always been there - All of the command/response message buffers are statically allocated - This means that each line is fixed length, and that there are a limited number of lines per command/response (255 lines) Looks like your 'core show command' is exceeding this, and I wonder if it is just not sending it because of that? Can you send a command that has a shorter result to see if it helps? You could also try to increase the max lines per message, though that is a nasty and evil solution :( Of course this may not be correct, but all of the responses have a response size of 255, which is a suspicious size... Steve |
FYI, #define MAX_HEADERS 256 in file: |
Commands with shorter responses do work.
That would indeed explain everything. The difference in the two Asterisk versions (1.8.11 and 11.7.0) 's It doesn't explain why my C# program is failing, but that could be a problem with the AsterNET library also limiting it somehow, I'll take it up with them if it is.
I'll give it a try. But I am alfarid changing it won't help much, since the real commands that caused this whole mess was |
Having some problems with receiving long responses from the AMI when going through the proxy.
By "long responses" I mean many lines of text, such as the result of the
core show help
AMI command which is 257 lines.I made some tests using the AsterNET library in C#.
This code works when targeting the AMI directly, but timeout when using the proxy. Even setting
SendAction
's timeout property to60000
results in a timeout.I have found no settings in the proxy's configuration that could be causing this, but I could have missed something. The proxy is running mostly default configuration without SSL.
The text was updated successfully, but these errors were encountered: