There was a topic on link Asterisk PBX and HC2 to have telephone caller ID passed to HC2 :
The global variables were passed to HC2 via API call as :
$url = "http://". $username . ":" . $password . "@" . $HC2serverIP . "/api/globalVariables/" . $variable;
where
$password = "password" // password for HC2
$username = "username" // username for HC2
$HC2serverIP = "123.123.123.123" // IP of HC2
I have found a solution :
If the username for HC2 is "[email protected]" then
the string defining username in php script has to be entered as
$username = "user%40mail.com"
simly @ had to replaced with %40