Having connection issues to connect to the Wildfire Server from Perl using

We are developing a Asterisk application using a Wildfire Server to log the IM presence generated from users using a PSI client. What we want to do is initiate a presence log record automatically from a Perl script using XMPP, with a cron job.

While testing, When we initialize the perl script and use the connection:

my($status) = $Connection->Connect(hostname=>$server,

port=>$port, componentname => $componentname, connectiontype => $connectiontype, tls => $tls);

The script just hangs.

The hostname , $server , and port, $port (and the other variables) are generated from a secure file that contains the values.

The values have been validated correct using a print error checking routine. So we know they are being passed.

We get no indication that the $status is being generated, the script hangs and we have to kill it.

(See below)


if (!(defined($status)))

{

$errormsg = ("$Script startIM_MessageProcess: ");

$errormsg .= (“Jabber server is down or connection was not allowed.\n”);

$errormsg .= ("$server,$port,");

$errormsg .= ("$componentname,$connectiontype,$tls\n");

&Error_handling($severe,$errormsg,$Logfile);

}

else

{

$errormsg = ("$Script startIM_MessageProcess: ");

$errormsg .= (“Logged in to $server:$port…\n”);

&Error_handling($remark,$errormsg,$Logfile);

}


What is hanging this script ???