Superfecta Herold Austria

(Reinhard Stindl) #22

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);
				$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

(Lorne Gaetz) #23

If you can come up with the logic to trim numbers to a certain length that works in all cases, it should be easy to add to the .module file.

(Reinhard Stindl) #24

I am afraid there is no logic…in Austria the length of the number can vary extensively. Actually, superfecta does a great job. Sometimes extensions are added to the main number, sometimes not…how should Superfecta know where to stop? I think the current success rate is >95%…just guessing…

(Reinhard Stindl) #25

Just checked…it seems the minimum length of phone numbers in Austria is 9 digits…so Superfecta does it right. There is no other solution to it, it seems…and I dont know of any other (even paid) service, which does a better job than Superfecta :wink:

(Lorne Gaetz) closed #26

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.