Support #527

Infobel FR not working

Added by ukstevef 12 months ago. Updated 10 months ago.

Status:New Start:05/24/2011
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:-
Target version:-

Description

Originally raised in the PIAF forum

I m using Piaf (1.7.5.6.2 - asterisk 1.8.3.3) and Cid superfecta 2.2.4 and with this above source-infobel.php :

My problem that for one manual checked number, i have a result. But, within superfecta no result found ??. 
What's wrong, may be in the code ? (I have put "FR" in the infobel parameter in cid superfecta settings).

Debugging Enabled, will not stop after first result.
Processing Default Scheme.
Looking for Trunk Provided Caller ID ... not found
result took 0.0013 seconds.

Searching Infobel...
FR : not found
result took 0.8013 seconds.

Post CID retrieval processing.

Returned Result would be:
result took 0.8347 seconds.

I think the web page has changed format.

Locally tested with

         $sresult =  get_url_contents($url);

        switch ($Country)

        {

            case "FR" :

                preg_match_all('/<span class="fn org">(.*)<\/span><\/a>/U', $sresult, $sname);

                break;

            default :

                preg_match_all('/businessdetails.aspx">(.*)<\/a>/U', $sresult, $sname);

                break;

        }

I am not sure if this only applies to France, can anybody else check ?

History

Updated by lgaetz 12 months ago

Tried using the version attached to this post: http://pbxinaflash.com/forum/showpost.php?p=66126&postcount=764

Tried with a bunch of France numbers, bus and res with no issues.
Belgium, lux and Denmark numbers not working (for me). Not sure if they ever did

Updated by ukstevef 12 months ago

Added r493 with updated regexp for FR,BE,LU,DK,AU,DE.

I was unable to test IT and ES with lookups, so I have left these as they were.

Updated by lgaetz 12 months ago

ES lookup functionality has been removed from that site IIRC. It is probably wise to remove all references to ES from the lookup source. I don't belive that IT ever worked.

Updated by ukstevef 12 months ago

r494 removes references to Italy from the popup descriptions.

Updated by zorka 10 months ago

BE numbers working if you change

$sresult =  get_url_contents($url);
switch ($Country)
{
case "FR" :
preg_match_all('/&lt;span class="fn org"&gt;(.*)<\/span><\/a>/U', $sresult, $sname);
break;
default :
preg_match_all('/businessdetails.aspx">(.*)<\/a>/U', $sresult, $sname);
break;
}

to

preg_match_all('/<span class="fn org">(.*)<\/span><\/a>/U', $sresult, $sname);

I'm not quiet sure why they put that check in there. Infobel has changed there layout for all countries, not just for France.....

Also available in: Atom PDF