Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ManagerConnection Login - "Timeout waiting for protocol identifier"

See original GitHub issue

I’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");
ManagerResponse response = mgrCon.SendAction(action);

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:closed
  • Created 6 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

themicstercommented, Mar 23, 2018

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 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.

Deantwocommented, Jul 10, 2018

I assume this is the same issue as #139, which is fixed with #140.

Read more comments on GitHub >

github_iconTop 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) -
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found