call to magento soap api expires immediately-Collection of common programming errors

I’m trying to do a call to the magento api to get the details of a specific customer. When I do this call I always get the following error:

PHP Fatal error:  Uncaught SoapFault exception: [5] Session expired. Try to relogin. in     /var/www/magento-client/magento-customer.php:12
Stack trace:
/var/www/magento-client/magento-customer.php(12): SoapClient->__call('call', Array)
/var/www/magento-client/magento-customer.php(12): SoapClient->call('a1a6863c7dadd95...', 'customer.info', 3)
{main}
  thrown in /var/www/magento-client/magento-customer.php on line 12

I have a valid api user in the backend, the api session timeout in the backend is set to 9999999999999, and I’ve even tried to override the isSessionExpired function in the magento core code, but nothing works.

The code is as follows:

$url = 'http://magentourl/api/soap/?wsdl';
$apiUser = "user";
$apiPass = "password";

$proxy = new SoapClient($url);

$sessionId = $proxy->login($apiUser, $apiPass);

// Get new customer info
var_dump($sessionId);
var_dump($proxy->call($sessionId, 'customer.info', 3));
die();

Does anyone have any ideas what the problem could be?