ManagerConnection Login - "Timeout waiting for protocol identifier"
See original GitHub issueI’m trying to connect to the Asterisk Manager with the ManagerConnection class and originate a call. I’m not able to login, however. When using the Login() method, I always get a Timeout Exception with the message “Timeout waiting for protocol identifier”. My usage is as follows:
ManagerAction action = new OriginateAction();
//Fill in originate options here
ManagerConnection mgrCon = new ManagerConnection("localhost", 5038, "username", "password");
mgrCon.Login();
ManagerResponse response = mgrCon.SendAction(action);
mgrCon.Logoff();
I’m able to connect to the Asterisk Manager through telnet and originate calls so my host, port, username and password are correct.
I can see within the Asterisk CLI that a connection attempt was made, but failed before authenticating, pointing to the connection being attempted, but the welcome response from asterisk (“Asterisk Call Manager/Version”) is not being received within my application.
Am I missing something in my code before attempting to login?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Asterisk does not connect (always timeout)
Looking over ManagerConnection.cs, it seems as though the error message you're getting isn't possible unless a TCP/IP connection has been ...
Read more >Unable to establish a connection to the manager server ...
Hi Everyone. I have AAH 2.5 and installed Wildfire, and the Asterisk-IM plugin, all on the same server. In Asterisk''s manager_custom.conf I have...
Read more >Cannot login to make calls with AsterNET - Timeout waiting ...
I am trying to make calls from a winforms app using AsterNET. I get the exception "Timeout waiting for protocol identifier":
Read more >ManagerConnection (Asterisk-Java 3.14.0 API) - javadoc.io
TimeoutException - if a timeout occurs while waiting for the protocol identifier. The connection is closed in this case. See Also: LoginAction ,...
Read more >ManagerConnection Class
The login is delayed until the protocol identifier has been received by the reader. Public method, Logoff. Sends a LogoffAction and disconnects from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m having the same problem. I’ve got a packet capture showing a connection is made and asterisk sends the Asterisk Call Manager/3.2.0 but AsterNET doesn’t seem to get it. I’m running this using the nuget package with an asp.net core project. It works fine when I run it on my windows machine, but once I build it on a linux server that docker image has the problem even if I transport it to my windows machine. So I believe there must be an issue with the netstandard library or some mismatch with .net core. I think the Manager reader might have a problem on .net core. Can anyone else dig into this some more? I don’t have the time to get to the bottom of this one.
I assume this is the same issue as #139, which is fixed with #140.