Caller ID Superfecta: THE MODULE

jeffmac

Guru
Joined
Jan 16, 2008
Messages
230
Reaction score
9
As ronw pointed out, the Return() function in the "numbered" cidlookup functions simply returns to the caller, it does not branch down to the cidlookup_return "extension" (which as you noted calls LookupCIDName).

The calls that FreePBX generates into this context are specifically destined to the cidlookup_1, cidlookup_2, etc, extensions. I had actually hoped to use the "cidlookup-custom" include to get my "override" inserted, but this context is not entered "at the top".

To net it out - I have no idea when cidlookup-return gets called.
Jeff
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
As ronw pointed out, the Return() function in the "numbered" cidlookup functions simply returns to the caller, it does not branch down to the cidlookup_return "extension" (which as you noted calls LookupCIDName).

The calls that FreePBX generates into this context are specifically destined to the cidlookup_1, cidlookup_2, etc, extensions. I had actually hoped to use the "cidlookup-custom" include to get my "override" inserted, but this context is not entered "at the top".

To net it out - I have no idea when cidlookup-return gets called.
Jeff

Hahah - ok cool Jeff, thanks for clarification. So we may very well be back to wanting that upgrade to the Module.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
That's odd. Well, the Astridex code has been stable and unchanged for quite some time. I don't have or use Astridex - so I'm not the right guy to respond to your question.

Is anyone else have troubles with the Astridex lookups in this module?
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
This may or may not fix my issue. Can two Asteridex entries have the same name? I know that they cant have the same dial code, but what about the name?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Same name is fine although we'd recommend: Joe Schmo (cell) and Joe Schmo (home)
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Thanks Ward. I changed my names accordingly, but still no asteridex lookup.
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
I just installed Superfecta and its working, but it doesn't cache the results in the Asterisk phone book. I selected the "cache results" option and hit save, but after confirming the change "cache results" are unchecked.


Any advice?
 

dad311

Guru
Joined
Jan 13, 2008
Messages
604
Reaction score
2
I just installed Superfecta and its working, but it doesn't cache the results in the Asterisk phone book. I selected the "cache results" option and hit save, but after confirming the change "cache results" are unchecked.


Any advice?
Never mind, found the fix here.
 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
There's a problem in WhitePages that is causing the , display. We'll track it down.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
As soon as Ward and the other High IQ guys get it fixed, we'll release an upgrade to the module to incorporate the upgrades.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Superfecta Fix RC1

An update has been proposed for the underlying script used by all versions of Superfecta. (by klingon888)

There is a version posted which can be trialed - if you can help validate it, it would be very helpful.

The thread discussing it can be found here:

Code:
http://pbxinaflash.com/community/threads/callerid-superfecta-returning-a.4161/

This article in the thread has the test code as an attachment:

Code:
http://pbxinaflash.com/forum/showpost.php?p=25607&postcount=17

If you have a TEST system, and can help out - post your results on THAT thread. Its important that we hear from as Many Superfecta users as possible so we understand how the proposed changes are working for the community.

-tshif
 
Last edited by a moderator:

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
I've also reworked the original code for those not using the FreePBX interface. This goes in the /var/www/html folder. No reason you can't use both The Module and this code actually.

In addition, I've now added addresses.com residential and yellowpages lookups which both are excellent sources and which I'm sure Tony will integrate into "The Module" shortly.

Finally, the debug mode has been adjusted so that, using your browser for testing, you get listings from ALL of the sources that you've enabled plus the times of the retrievals. This should help you decide which sources to activate. And, by the way, we've found whocalled.us to be next to worthless. It doesn't even catch people that have been in the phone book for over 20 years. :crazy:

The debug URL syntax using your server's IP looks like this:

http://192.168.0.50/callerid.php?thenumber=6781234567

Here's a sample report with all the providers enabled and a non-MaBell phone number (number changed to protect the innocent) that's been registered through listyourself.net:
  • Found valid US npa: 678-123-4567
  • AsteriDex lookup ....
  • WhoCalled lookup .... Elapsed time : 0.291814
  • PhoneSpamFilter lookup .... Elapsed time : 0.694294
  • Google lookup .... Elapsed time : 0.190216
  • Addresses.com lookup .... Elapsed time : 0.786534 Ward Mundy
  • WhitePagesCAD lookup .... Elapsed time : 1.30443 Mundy Ward
  • YellowPages lookup .... Elapsed time : 0.915463
  • AnyWho lookup .... Elapsed time : 0.995959 Ward Mundy
  • Telcodata lookup .... Elapsed time : 0.234104 CHARLESTON, SC
 

markiper

Member
Joined
Oct 22, 2007
Messages
198
Reaction score
5
thanks for the fix...

thanks klingon88, ward and tshif for the work around, it works like a charm, and 2 seconds for the curl time works excellent...

Only one comment. In my case, DID's are routed to ringropus, and I left the DEBUG = '1" after testing (my mistake), producing a weird behaviour where only one extension on the ringgroup will ring and the others will not. I am assuming this is becasue of the way that the debug portion works, so if anyone is experiencing the same issue check the debug option and make sure you disable it after testing. :wink5:

Regards,
markiper
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,227
Here's my suggestion with debug because it's really designed to let you test things with a browser. Copy the callerid.php file to callerid-debug.php and then use it for testing by adjusting it to perform in debug mode with all of the options enabled. That way it won't mess up your phones. :rolleyes:
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Module Upgrade almost complete

Here's my suggestion with debug because it's really designed to let you test things with a browser. Copy the callerid.php file to callerid-debug.php and then use it for testing by adjusting it to perform in debug mode with all of the options enabled. That way it won't mess up your phones. :rolleyes:

For those waiting on the updated module, the wait will be short. In the meantime, you can always turn off Whitepages in the module user interface to prevent the error until the module upgrade is ready.

The current plan is to upgrade the module so the debug mode can be enabled from the user interface, and the curl timeout set from there as well.

Any other suggestions, now is the time. ;)

-tshif
 

marv

Member
Joined
Nov 26, 2007
Messages
84
Reaction score
2
yeah I got a suggestion

One thing I did was change when whocalled.us would flag a number as spam, that not only would it change the name to '=S=' but it would also append the name that who called us would supply. I found this very useful. For example:
http://pbx/callerid.php?thenumber=4144625902
Would return: =S=Warranty Solutions

This is the portion I modified:
Code:
if ($WhoCalled=='1' && $validnpa=='1') :
  if ($debug=='1') :
    echo "<br />WhoCalled lookup ....", "\n" ;
  endif ;
  $url = "http://whocalled.us/do?action=getScore&name=$WhoCalled_name&pass=$WhoCalled_pass&phoneNumber=$thenumber";
  $value = UrlGetContentsCurl($url, $timeout, $debug);
  if ($value) :
    $st_success = strstr($value, "success");
    $st_score = strstr($value, "score");
    $success = substr($st_success,8,1);
    $score = substr($st_score,6);
    if ($success=='1') :
      if ($score>$WhoCalled_threshold) :
         $url = "http://whocalled.us/do?action=getWho&name=$WhoCalled_name&pass=$WhoCalled_pass&phoneNumber=$thenumber";
         $value = UrlGetContentsCurl($url, $timeout, $debug);
         echo $SPAM_CNAM,substr($value,14);
  if ($debug<>'1') :
   exit ;
  endif;
      endif ;
    endif ;
  endif ;
endif ;

I do apologize in advance for messing around below the warning lines, but I was never allowed to be a rebel when I was younger! :biggrin5:

I haven't looked into some of the other spam name lookup providers, but it would be nice if they all could provide some insight as to why the name is spam listed, such as a name!

What do you think? ;)
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
marv -
I like it a lot! I assumed this is how the original code worked :eek:.

Unless anyone objects, Id like to get this into the module.
Opinions anyone/everyone?
 

Members online

No members online now.

Forum statistics

Threads
25,824
Messages
167,825
Members
19,247
Latest member
mdauck
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top