Hi, I'm seeing weird behavior with AMI where no events are output until some input is detected (can be an empty line), at which time all the buffered output is spewed out at once. I am maintaining multiple Asterisk installations, and with one installation I have run into a weird buffering problem with AMI. The version is 1.6.1.11 in this particular case, which I am running at multiple locations, all without this problem. Additionally I have tried version 1.6.2.11 and 1.8.4.1, and the problem is consistent across these versions. manager.conf is identical across all these installations. The problem presents with a php script that opens a socket directly to AMI, a telnet client from the local machine to the AMI, but not when I telnet from the machine to a remote machine running AMI. Does anyone have any input as to what I can try? Best regards, ?rn
On 05/31/2011 01:38 PM, ?rn Arnarson wrote:> Hi, > > I'm seeing weird behavior with AMI where no events are output until > some input is detected (can be an empty line), at which time all the > buffered output is spewed out at once. > > I am maintaining multiple Asterisk installations, and with one > installation I have run into a weird buffering problem with AMI. > The version is 1.6.1.11 in this particular case, which I am running at > multiple locations, all without this problem. Additionally I have > tried version 1.6.2.11 and 1.8.4.1, and the problem is consistent > across these versions. > > manager.conf is identical across all these installations. > > The problem presents with a php script that opens a socket directly to > AMI, a telnet client from the local machine to the AMI, but not when I > telnet from the machine to a remote machine running AMI. > > Does anyone have any input as to what I can try? > > Best regards, > ?rnThis is because of some blocking and/or read-write order issue in your PHP script. PHP is a web language, not for standalone scripts doing network I/O. -- Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
On 11-05-31 01:38 PM, ?rn Arnarson wrote:> Does anyone have any input as to what I can try? >We use Python and StarPy extensively for the TestSuite with no buffering issues. -- Paul Belanger Digium, Inc. | Software Developer twitter: pabelanger | IRC: pabelanger (Freenode) Check us out at: http://digium.com & http://asterisk.org
On 1/06/11 5:38 AM, ?rn Arnarson wrote:> The problem presents with a php script that opens a socket directly to > AMI, a telnet client from the local machine to the AMI, but not when I > telnet from the machine to a remote machine running AMI.Are you 100% sure it's happening when you use telnet on the local machine? Are you passing two carriage returns after logging in? -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions)