Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When connecting to the Asterisk Manager via a socket (telnet style), there is a 3 second delay after each commands. Is this normal? Why is it so? Can a response be returned immediately?

** EDIT **

some more info

  • the manager is a closed test environment server
  • there are at most 4 uers connected at once
  • it is installed on a physical enterprise server machine using the most recent trixbox CE
  • all DNS seems properly setup (SSH works fine without delays)
  • all commands are executed sending a \r\n for line breaks, plus an extra \r\n at the end.

    For example :

    Action: Command{\r\n}
    Command: meetme list 204 concise{\r\n}
    {\r\n}
    

    note : {\r\n} are really carriage returns and new line feed characters, and not a literal string, to avoid confusion and show what's being sent.

share|improve this question

3 Answers 3

Does the AMI have a three second delay because the Asterisk server is very busy?

Is the network connection between the client and server lag-free, or does it have its own lag?

Is the client system free of lag?

The most likely cause is that the Asterisk server is very busy, and is responding when the command reaches the front of the queued commands.

Do you have more information?

share|improve this answer
    
the Asterisk server is a test environment, and has at most 4 connected users at once. Also, it is on a closed network (behind a firewall) and all DNS are set up correctly both ways. I should have mentioned that. Sorry for the confusion. –  Yanick Rochon Jul 26 '11 at 1:49

try put end of line(or press enter) twice, as requested by specification ;)

share|improve this answer
    
... that... may be the case. I'll try that in the morrow. –  Yanick Rochon Jul 26 '11 at 1:49
    
nope, the script sends \r\n\r\n after each commands (using \r\n as new line characters) –  Yanick Rochon Jul 26 '11 at 12:36
    
any buffering in script? try do same via telnet. and see if issue exist –  arheops Jul 26 '11 at 16:39
    
see my response –  Yanick Rochon Jul 26 '11 at 16:51

It seems that, somewhere deep inside the code we use to communicate with the AMI server, there was some construct that added a wait timeout before every IO operation. After modifying the code quite a bit, I managed to remove that "feature" and everything is now running normal"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.