GatVar does not return value of variable

I am use this:

in extensions.conf

exten => 3001,1,Set(filename=incoming.wav) exten => 3001,2,Dial(SIP/3001,60,Ttm)

in manager.conf

[astr] secret=1 permit= read = system,call,log,verbose,command,agent,user,config write = system,call,log,verbose,command,agent,user,config

in php code:

                        $socket = fsockopen("","5038", $errno, $errstr);
                        if(!$socket){ die("Error Connecting to Asterisk Server"); }
                        fputs($socket, "Action: Login\r\n");
                        fputs($socket, "UserName: astr\r\n");
                        fputs($socket, "Secret: 1\r\n\r\n");
 fputs($socket, "Action: Status\r\n\r\n");
$calls = array();$calls[0]="";
        $text = fgets($socket,128);
         if (!strstr($text,'StatusComplete'))
                   $key = substr($text,0,strpos($text,':'));
                   $value = substr($text,strpos($text,':')+2,strlen($text));
                  if ($key) $calls[$j][$key] = $value;
        if (strlen($text) < 3) {$j++;}

 for ($i=0;$i<count($calls);$i++)

   if (isset($calls[$i]['Link']) && !strstr($calls[$i]['Link'],"SIP/3001") && !isset($calls[$i]['Extension']) && i$
      {echo "in call - ".$calls[$i]['Link'].$calls[$i]['Channel'].'<br>';

                        fputs($socket, "Action: GetVar\r\n");
                        fputs($socket, "Сhannel: $calls[$i]['Link']\r\n");
                        fputs($socket, "Variable: filename\r\n\r\n");
  echo fgets($socket,128);

in *CLI of Asterisk

-- Executing [3001@test:1] Set("IAX2/3003-15175", "filename=incoming.wav") in new stack -- Executing [3001@test:2] Dial("IAX2/3003-15175", "SIP/3001|60|Ttm") in new stack -- Called 3001

but i see in browser:

in call - IAX2/3003-15175 SIP/3001-081de858
Response: Success Variable: filename Value: (null)

Why Value is null in response, but if i use localhost/asterisk/rawman?action=getvar…in response value is incoming.wav?