Caller ID Superfecta: THE MODULE

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Superfecta (and other) Developer Support and SVN

To everyone who has participated as a developer (or even thought about it) for any version of the Caller ID Superfecta (or any of our PBXIAF Modules) . . . Read On –

As you may know from reading other posts here, I have been looking for a proper sub version management system to serve as a living workspace for the modules we have developed for PBXIAF/FreePBX. My original plan was to use some existing service – and we vetted several for the projects. But – for a variety of reasons (cost, rules, etc.) – eventually it was decided we would host this service directly.

The Software Project Management portal is meant and provided for coders/developers, as well as the more technical non-programmer as way to let anyone who wants to, get involved in the development process.

In addition to being a subversion repository, the site provides a full range of tools to make the distributed development process easier and more effective. Each project is supported by its own dedicated development resources, like A library of builds (Files), Dev Forums, Wiki, and a full range of ticketing from Bug Reporting, to Feature Requests. Road maps are available for most projects.

At first – I thought that duplicating Forums might not be worthwhile – the forums here are awesome – and we sure don’t want to take anything away from them. However, some times the chit chat between developers can muddy up the waters of the threads – and make information hard to find. So – we offer Development forums for the purpose of keeping some of the creation nuts+bolts discussion from cluttering up the great PBXIAF forums.

If you’d like to look around, drop by http://projects.colsolgrp.net Guests can look, but not change anything. Once your there, if you’d like to participate in any of the listed public projects – just follow the instructions and sign up. This place was designed with you in mind.

It's very new - so be nice and keep any :mad5: to a minimum, ok?

Public unregistered review (our open house period) may eventually be curtailed to registered users only. Please drop by and kick the tires – and see if you might like to hang out and build some stuff with us!

- Tony
 

marv

Member
Joined
Nov 26, 2007
Messages
84
Reaction score
2
:rolleyes: Yes, I only modified the lines after it matches the level set earlier in the file. Just set out a different request to get the name, if it existed.

I will note that I shortened the prefix to '=S=' so you could see more of the name when the two are merged.
 

klingon888

Guru
Joined
Nov 23, 2007
Messages
90
Reaction score
4
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

Now why didn't I think of this??!! :biggrin5:

This goes to show what collaborative effort can produce.....a much improved product!

I second the vote to include this....very useful to know who the spam caller is too! Thanks Marv.
 

marv

Member
Joined
Nov 26, 2007
Messages
84
Reaction score
2
Will other spam listing services return the name?

Glad to hear people seem to like it. I'm going to be busy traveling the next few weeks, so I will leave the next challenge for others to think about...

Will these other spam listing services return back the spammer's name also?

I tried to briefly check out the new site Ward added, but their website kept telling me "too many accesses" and I didn't feel like being a googleologist to look for other sources of information. :crazy:
 

stuck

Member
Joined
Nov 8, 2007
Messages
238
Reaction score
1
Hi fellas,
I'm using v.1.1.1 from here But I'm still getting "," with whitepages checked, but I get the city and state if I remove whitepages. What am I doing wrong?
Also what should the threshold be for spam?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Hi fellas,
I'm using v.1.1.1 from here But I'm still getting "," with whitepages checked, but I get the city and state if I remove whitepages. What am I doing wrong?
Also what should the threshold be for spam?

Currently, that's expected behavior. Best plan is to uncheck whitepages until the maintenance release for the module is released. (Very soon.)

Spam threshold is a matter of personal taste.
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
PIAFCallerIDSuperfectanopassword.jpg


Do I need to fill out these passwords ?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
If you are running the typical PBXIAF using maint/password vs. FreePBX ACL security - you need to add your id and password. This will normally be maint/your maint password.

The path you show is not the correct path for the module. This is not how the module normally sets up the path info. Are you using the module version? Did you experience any weirdness during the module install?

Check this message - very carefully follow steps 1-4, 4 talks about the question you are asking. Let us know how this turns out for you.
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
I am using the Orgasmatron II Everex version ... installed via the .iso downloads.
PIAF 1.3
(see my signature).
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I am using the Orgasmatron II Everex version ... installed via the .iso downloads.
PIAF 1.3
(see my signature).

I don't think the module was available for that build - so I don't think you have the module. Although the way it got entered in your CallerID Sources - the name Caller ID Superfecta is exactly as the module would have made it.

Soo - let me answer it this way. If you are running the module, follow my previous suggestion and refer the the module instructions I linked for you.

If you are not using the module, there is no need to enter an ID and password in the area you have indicated.
-tshif
 

marv

Member
Joined
Nov 26, 2007
Messages
84
Reaction score
2
I have Ward's orgasmic build and Tony's module for CID. You will need to put "maint" without the quote for the username and then the password.

FYI, if you don't have it right and it's being used for callerid lookup, it tends to send garbage out to your phones and they more than likely will not ring. I mean, that's what I heard, I'd NEVER set anything up wrong! :donatellob:
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
here is callerid

contents of callerid.php
in \\pbx\share\var\www\html

Code:
<?php
/*** Original script by Nerd Vittles. (Google for Caller Id Trifecta)
        whitepages.ca "Submitted by taiter on Mon, 03/12/2007 - 9:55pm"
        M Joyner updated the whitepages.ca to account for apparent changes
        they have made over time. (2008-06-22-18-20) mjoyner _at_ vbservices *dot* net
***/

$thenumber=$_REQUEST['thenumber'];
if (strlen($thenumber)<>10) :
exit ;
endif;
// Setting the variables below to 1 activates each of the respective searches.
// The phonebook searches are executed in the order shown.
// When a match is bound during a search, the callerid script ends with that result.
// E.g. if there is a match in AsteriDex, then the Google and AnyWho searches aren't executed.
$AsteriDex = '1' ;
$Google = '1' ;
$AnyWho = '1' ;
$WhitePagesCAD = '1';
// ---------- Don't fiddle around below this line --------------------
$value="" ;
if ($AsteriDex=='1') :
$link = mysql_connect("localhost", "root", "passw0rd")
    or die("AsteriDex connection failed");
mysql_select_db("asteridex")
    or die("AsteriDex data base open failed");
$query = "SELECT * FROM `user1` where `out` LIKE '$thenumber'";
$result = mysql_query($query)
    or die("AsteriDex query failed");
if (mysql_num_rows($result)>0) :
  $row = mysql_fetch_array($result);
  $value=$row["name"];
// else :
//  $query = "SELECT * FROM user1 where id>0";
//  $result = mysql_query($query)
//    or die("AsteriDex query failed");
//  $row = mysql_fetch_array($result);
//  $value=$row["name"];
//  $value="";
endif ;
mysql_close($link);
if (strlen($value)>0) :
  echo $value;
  exit ;
endif ;
endif ;
if ($Google=='1') :
$fd = fopen("[URL]http://www.google.com/search?rls=en&q=phonebook:$thenumber&ie=UTF-8&oe=UTF-8[/URL]", "r"); // can change to "rb",  on NT/2000 servers, if problems.
if (!$fd) {
  echo "Google Error";
  exit;
}
$value = "";
while(!feof($fd)){
    $value .= fread($fd, 4096);    
}
fclose($fd);
$start= strpos($value, "Phonebook</b>");
$value = substr($value,$start+13);
$start=strpos($value, "<tr bgcolor=#e5ecf9><td>");
$value = substr($value,$start+24);
$end=strpos($value, "<td>(");
$value = substr($value,0,$end);
if (strlen($value)>1) :
  echo $value;
  exit ;
endif;
endif ;
if ($AnyWho=='1') :
$npa=substr($thenumber,0,3);
$telephone=substr($thenumber,3,7);
$fd = fopen("[URL]http://www.anywho.com/qry/wp_rl?npa=$npa&telephone=$telephone[/URL]", "r"); // can change to "rb",  on NT/2000 servers, if problems.
if (!$fd) {
  echo "AnyWho Error";
  exit;
}
$value = "";
while(!feof($fd)){
    $value .= fread($fd, 4096);    
}
fclose($fd);
$start= strpos($value, "Reverse Telephone Listings</B>");
$value = substr($value,$start+30);
$start=strpos($value, "<B>");
$value = substr($value,$start+3);
$end=strpos($value, "</B>");
$value = substr($value,0,$end);
if ($value=="You searched for:") :
  $value="";
endif;
if (strlen($value)>1) :
  echo $value;
  exit ;
endif;
endif ;
if ($WhitePagesCAD=='1') :
$fd = fopen("[URL]http://www.whitepages.com/search/ReversePhone?full_phone=$thenumber[/URL]", "r");
if (!$fd) {
echo "Whitepages.com Error";
exit;
}
$value = "";
while(!feof($fd)){
$value .= fread($fd, 32768);
}
fclose($fd);
$notfound = strpos($value, "PHONE_USER_ERROR");
$patternFirst = "/FIRST.*?\"(.*?)\",/";
$patternLast = "/LAST.*?\"(.*?)\",/";
$patternCity = "/CITY.*?\"(.*?)\",/";
$patternState = "/STATE.*?\"(.*?)\",/";
$patternType = "/Type: *(.*?)<\/span>/";
preg_match($patternFirst, $value, $first);
preg_match($patternLast, $value, $last);
$name = $first[1]." ".$last[1];
if ($name==" "):
preg_match($patternCity, $value, $city);
preg_match($patternState, $value, $state);
preg_match($patternType, $value, $type);
$name = $city[1].", ".$state[1]." ".$type[1];
endif;
if ($notfound):
$name="";
endif;
if (strlen($name)>1) :
echo $name;
exit ;
endif;
endif ;
$value=$thenumber;
echo $value;
exit ;
?>
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
drmurdoch - thanks for the info. Based on where you are running the script from, you are NOT running the Module version. The ID/Password are not required.
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
Can I uninstall it and install yours ?
Is it OK I am only on 1.3 ?
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
Can I uninstall it and install yours ?
Is it OK I am only on 1.3 ?
  1. You can have both versions installed at the same time - no need to un install the one your are using.
  2. It's fine your pbxiaf is at 1.3. I do recommend that you have the most recent version of any FreePBX modules you have installed.
  3. If it works - don't fix it. yet.
Right now - if its working for you - installing the module won't buy you much in the way of upgraded features. Unless of course the SugarCRM integration, or other module specific capability is what your after. :)

I am having a real hard time keeping my mouth shut - I'm so excited about the next update to the Caller ID Superfecta Module.

It's presently being polished to perfection before release by a couple of the forum members who are very graciously donating their time and considerable development talent. I wont say much more right now, but I will say - Stay Tuned for Caller ID Superfecta: THE MODULE v 2.0.0 real soon!
-tshif
 

drmurdoch

Member
Joined
May 26, 2008
Messages
576
Reaction score
11
:thumbsup:
I'll wait [:)]
Trying to get my MA Bell Caller ID to go through anyway.
 
Joined
Apr 22, 2009
Messages
230
Reaction score
0
feature request

Is there a way to first try the asterisk internal database and if nothing is found then go through the process of querying the other http request?

Asteridex is great, but it's an overkill for my application, a lookup in the build in asterisk db would be good enough instead.
 

tshif

Guru
Joined
Jan 3, 2008
Messages
1,240
Reaction score
4
I am having a real hard time keeping my mouth shut - I'm so excited about the next update to the Caller ID Superfecta Module.

-tshif

Not yet! Stay Tuned for an exciting announcement in the next couple of days.
 

MageMinds

Guru
Joined
Jun 20, 2008
Messages
47
Reaction score
0
I had a problem with WhitePages.com when a company was calling I was receiving the president name instead of the company name. I modified the script to get the company name, I'm pretty sure my RegEx pattern can be improved, but it's working for now...

Code:
if ($WhitePagesCAD=='1' && $TFnpa=='0' && $validnpa=='1') :
  if ($debug=='1') :
    echo "<br />WhitePagesCAD lookup ....", "\n" ;
  endif ;
  $url = "http://www.whitepages.com/search/ReversePhone?full_phone=$thenumber";
  $value = UrlGetContentsCurl($url, $timeout, $debug);
  if ($value) :
    $notfound = strpos($value, "PHONE_USER_ERROR");
    $patternFirst = "/FIRST.*?\"(.*?)\",/";
    $patternLast = "/LAST.*?\"(.*?)\",/";
    $patternCity = "/CITY.*?\"(.*?)\",/";
    $patternState = "/STATE.*?\"(.*?)\",/";
    $patternType = "/Type: *(.*?)<\/span>/";
// added/modified by MageMinds
    $patternCie = "/Company: <\/strong><span class=\"org\">(.*?)<\/span>/";
    preg_match($patternCie, $value, $cie);
    $name = $cie[1];
    if ($name==""):
      preg_match($patternFirst, $value, $first);
      preg_match($patternLast, $value, $last);
      $name = $first[1]." ".$last[1];
    endif;
// end of MageMinds addition/modification
    if (trim($name)==""):
      preg_match($patternCity, $value, $city);
      preg_match($patternState, $value, $state);
      preg_match($patternType, $value, $type);
//      $type = str_replace( "<strong>", "", $type );
//      $type = str_replace( "</strong>", "", $type );
      $name = $city[1].", ".$state[1]." ".$type[1];
    endif;
    if ($notfound):
      $name="";
    endif;
    if (strlen($name)>1) :
      echo strip_tags($name);
     if ($debug<>'1') :
      exit ;
     endif;
    endif;
  endif ;
endif ;
 

Members online

Forum statistics

Threads
25,825
Messages
167,850
Members
19,250
Latest member
mark-curtis
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