marcelog/PAMI — Issue #27: Read Timeout
Author: black187
Created: 2012-02-27 19:07:31+00:00
State: open

Hello,

I'm trying to run the quickstart example, but I allways get - read timeout after a minute of loading of example.php.

I'm working on Centos 5.6, with PHP 5.3 and log4php installed... I see that the script tries to connect to AMI, but no success:

**Asterisk cli:**

== Client from 127.0.0.1, failed to authenticate in 30 seconds

**log.log:**

*----------
2012-02-27 19:58:24,001 [DEBUG] Pami.ClientImpl: ------ Sending: ------
action: Login
actionid: 1330369073.3835
username: test
secret: test123

----------
2012-02-27 20:02:26,001 [DEBUG] Pami.ClientImpl: ------ Sending: ------
action: Login
actionid: 1330369315.1347
username: test
secret: test123

----------*

**example.php (changed parts):**

*date_default_timezone_set("Europe/Berlin");
set_include_path('/var/www/html/test/PAMI/log4php');
// Setup include path.
ini_set(
'include_path',
implode(
PATH_SEPARATOR,
array(
implode(DIRECTORY_SEPARATOR, array('..', '..', '..', 'src', 'mg')),
ini_get('include_path'),
)
)
);
.
.
.
.
try
{
$options = array(
'log4php.properties' => realpath(__DIR__) . DIRECTORY_SEPARATOR . 'log4php.properties',
'host' => 'localhost',
'port' => '5038',
'username' => 'test',
'secret' => 'test123',
'connect_timeout' => 10000,
'read_timeout' => 10000,
'scheme' => 'tcp://' // try tls://
);*

Manager.conf has the correct entry's for user test.

How can I debug, where is the problem with the too long loading?