i'm trying to read the call history from our pbx via rest-api. So far i get a valid json response, but in php some values are empty.
on linux commandline, i will get this value for phone numbers, eg:
curl -u user:pass -D - https://url/rest/user/10/wallboard/60
--> Result: "from":"<sip:+1234567890@domain.com>"
This is a part of my php script:
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, 'https://url/rest/user/10/wallboard/60');
curl_setopt($ch, CURLOPT_USERPWD, $loginName . ":" . $loginPass);
$response = curl_exec($ch);
curl_close($ch);
print ($response);
--> Result: "from":""
I guess the problem is the "<" character in the from value. Any ideas how to resolve this and get the full phone number?
Thanks a lot!