Seems to work…I get good results…
Rarely, I get the wrong name…e.g. when the number is very long (including the extension) and not listed in Herold, then it truncates the number to 9 digits and just displays the first hit, which is completely wrong…but again, it is very rare…
And there is still a problem with german umlaute with the Herold template, I edited the superfecta.class.php…but it is just a workaround…and it might only work for me!
the relevant code starts with line 204:
$callerid = trim($callerid);
$found = false;
if (!empty($callerid)) {
$found = true;
$callerid = strtr($callerid, array("ü" => "ue", "ö" => "oe", "ä" => "ae", "Ü" => "Ue", "Ö" => "Oe", "Ä" => "Ae", "ß" => "ss"));
$callerid = trim(strip_tags($callerid));
if ($superfecta->isCharSetIA5()) {
$callerid = $superfecta->stripAccents($callerid);
}
//Why?
$callerid = preg_replace("/[\";']/", "", $callerid);
//limit caller id to the first 60 char
$callerid = substr($callerid, 0, 60);
// Display issues on phones and CDR with special characters
// convert CNAM to UTF-8 to fix
if (function_exists('mb_convert_encoding')) {
$this->out("Converting result to UTF-8");
$callerid = iconv('ISO-8859-15//TRANSLIT', 'UTF-8', $callerid);
}
//send off