PBXes (http://www1.pbxes.com/forum/index.php)
- English (http://www1.pbxes.com/forum/board.php?boardid=16)
-- Feature Requests (http://www1.pbxes.com/forum/board.php?boardid=23)
--- RE: our own contactsdatabase (http://www1.pbxes.com/forum/threadid.php?threadid=1223300736)


Posted by mkoeman on 06.10.2008 at 15:45:

our own contactsdatabase

hello,

i have added a contact in the phonebook with the phonenumber. when that person calls me i see on my phones his name. that works great.

Now i have a system witch works like
post http://xxxxxxx/phonenrtoname.php?phonenr=0031527xxxx
response: mr. T. Tester

this works for all dutch phonenumbers that arent secret. is there any posibility to reaveal number by using my system instead of the phonebook ?

i tought about putting 8million records in your suger crm but i think you don't like that much data.


Posted by Diafora on 06.10.2008 at 19:26:

RE: our own contactsdatabase

Is this an actual website, or the example of a URL?

Did you actually get access to all the phone numbers which have CallerID in Netherlands and loaded them into a Database?


Posted by mkoeman on 07.10.2008 at 00:17:

RE: our own contactsdatabase

this is not the actual url..

and yes i've got an database of allmost all dutch phonenumbers (as named in every telephonebook)

I;m a co founder of software to reveal all the numbers from a digital telephonebook. so it can be used to search info with only a phonenumber present.

for more info you cloud check our site.
www.foondump.nl (in dutch only)

and german users : google for Rufident and you can do the same


Posted by Diafora on 07.10.2008 at 21:13:

RE: our own contacts database

It's a lot clearer now, even if my Dutch are non-existent!

Do you intent to offer this as a web service, where a script can query a number to get a corresponding name?

If you do, then we can definitely look into using it for name queries.


Posted by mkoeman on 08.10.2008 at 12:45:

RE: our own contactsdatabase

Diafora, this is the php code on my server...
im uploading de database to a colocation server right now... when its done i send you the test url.

<?
$callernum = $_GET['callerid'];
if (substr($callernum, 0, 4) == "0031") $callernum = "0".substr($callernum, 4);
if (substr($callernum, 0, 2) == "31") $callernum = "0".substr($callernum, 2);
if (substr($callernum, 0, 3) == "+31") $callernum = "0".substr($callernum, 3);

// No caller-id?
if ($result_cid == "" && ($callernum == "" ))
$result_cid = "Anoniem";


if ($result_cid == "") {
$host = "localhost"; //locatie van de MySQL server
$username = "xxxxxxxxx"; //gebruikersnaam van de MySQL server
$password = "xxxxxxxxxxxxxx"; //wachtwoord van de MySQL server
$database = "xxxxxxxxxxxxxxx"; //database die aangesproken moet worden

$lnk = mysql_connect($host,$username,$password) or die(mysql_error()); //connecteren met de server
mysql_select_db($database,$lnk) or die(mysql_error()." [".$database."]"); //selecteren van de database


$query = "select * from white_subscriber where phone = '$callernum'";
$result = mysql_query($query) or die(mysql_error());
if ($row = mysql_fetch_array($result))
$result_cid = "".$row["lastname"]." ".$row["firstname"]."";

// posibliities :
// title varchar(40)
// firstname varchar(12cool
// infix varchar(40)
// lastname varchar(12cool
// streetname varchar(64)
// housenumber varchar(24)
// postalcode varchar(9)
// city varchar(80)
// phone varchar(20)
}

// Not in my database
if ($result_cid == "") {
$result_cid = "$callernum";
}

echo($result_cid);
?>


Posted by i-p-tel on 10.10.2008 at 13:09:

Lampe RE: our own contactsdatabase

In terms of user's privacy we can only connect to a public webservice, and the rights to use the databases for the desired purpose would have to be shown.

Connecting to your private webservice is possible by adding the following line in section extensions.conf >> ext-did in Source View:
Zitat:
SetVar(REV=http://www.google.com/search?q=phonebook: )

This will work with Google's reverse lookup but not with any other lookup service. The name is extracted between the first <td> HTML tag and the next tag. If you setup your private webservice to return the results like this you can insert your own URL.


Posted by mkoeman on 15.10.2008 at 02:03:

RE: our own contactsdatabase

thanks for the great solution i'll try it out....

works great, thank you for this option.

i'll see a new field in the future:
inbound routing / trunk name/ below options :
cid name resolve url : ....... (example: http://www.google.com/search?q=phonebook: )

update 20-10-08 02:07 :

everything worked fine for a couple of days, but today it doesnt work anymore ??
did you changed someting ?

my (example)html output =

Zitat:
<html>
<head>
<title>Private Search Systeem</title>
</head>
<body>
<td>Me Tester<td>
</body>
</html>


and my extensions.con / ext-did looks like :

Zitat:
exten => s,1,SetVar(FROM_DID=s)
exten => s,2,SetVar(FAX_RX=disabled)
exten => s,3,PrivacyManager
exten => s,4,SetVar(DIAL_OPT=m)
exten => s,5,SetVar(REV=http://www.xxxxxxx.xx/nrtoname.php?callerid=)
exten => s,6,GotoIfTime(13:30-17:00|mon|*|*?aa_2,s,1smile
exten => s,7,GotoIfTime(09:00-17:00|tue-fri|*|*?aa_2,s,1smile
exten => s,8,Goto(aa_1,s,1)
exten => _X.,1,Goto(ext-did,s,1)


update : 21-10-2008 10:00 : everything seems to work again


Posted by mattjfrank on 24.01.2009 at 00:48:

RE: our own contactsdatabase

Any options for preminum members that can't edit the file?

Powered by: Burning Board Lite 1.0.2 © 2001-2004 WoltLab GmbH
English translation by Satelk