Active Topics

 


Reply
Thread Tools
Posts: 21 | Thanked: 42 times | Joined on Jan 2010
#1
I've just uploaded to extras-devel my package called "callerid", which can automatically look phone numbers up on the web to find who they belong to. It primarily uses XML configuration files to find out which web server to use for any particular country code and area code. Once the name has been looked up, it's displayed as a Hildon banner. (Yes, you need a working Internet connection for this to work. Also note that in many cases, 2G doesn't allow you to use voice and data simultaneously, so if you're using 2G and don't have WiFi, you may be in trouble...)

Added Mar 13: As a fallback, it can show an approximate geographical location based on the phone number itself. For that to work, the program must have information about your country's numbering plan (in the form of a text file, described below).

Currently, you can use it in immediate mode (callerid <number> from a shell) or in daemon mode (callerid --daemon). In daemon mode, it sits and waits for incoming calls, and then looks up the number of the caller. I haven't yet researched a way to make the daemon start on boot. And there's not yet any GUI.

I'd like people to 1) test it and let me know whether it works, 2) create XML files that I can put into future versions so that the program will be able to look up phone numbers in your country.

Configuration instructions: The program looks in /opt/callerid for a regions.xml to find the country, and then in <country>.xml for details. (I have files for two countries there already.) If you need to use different services for different area codes (which probably at least North America will), you can add area codes like this:

<config>
<area code="555" id="west"/>
<area code="666" id="east"/>
<directory id="west">...</directory>
<directory id="east">...</directory>
</config>

Otherwise you can keep it simple:
<config>
<directory>...</directory>
</config>

Tags which can be used inside <directory> are:
<prefix> = remove prefix before lookup (optional)
<query> = HTTP query to make; the phone number, without prefixes, is appended to the end of the URL
<name> = how to find the name in the returned HTML
<address> = how to find the address in the returned HTML
Sub-tags of name and address are:
<find> = find a tag, further processing only works on what's inside this tag. You can use tag="" to find a particular type of tag, and/or you can search on particular attributes, such as class. You can have more than one <find> in sequence if you need to descend into a hierarchy (though maybe there's still work to be done here).
<delete> = once you're inside the tag that has the name in it, you can use this to delete tags for ads etc. Otherwise works same way as <find>

Added Mar 13: Numbering plan file: If the phone numbers in your country is related to where you live, you can create a <country>.txt file (or if your country is very big, <country>_<firstdigit>.txt file) with details about the numbering plan. The file format is a simple tab-delimited file, with the first field being the number prefix (e.g., area code and exchange), and the second field being the location. If several entries match (e.g. both 4578 and 457 would match the number 4578313), then the first match is used.

Once you've created working config files for your country, you could post them so it can be included in future versions. (Perhaps I'll also add new features later, like address display, offline directories, call blocking, and whatnot...)

There are probably bugs (for example, the area code feature has never been tested). If possible, give me the terminal output when things don't work...

Updated Mar 13: Added address tag and numbering plan information

Last edited by ovekaaven; 2011-03-13 at 22:35.
 

The Following 29 Users Say Thank You to ovekaaven For This Useful Post:
Posts: 228 | Thanked: 145 times | Joined on Dec 2009
#2
Sounds neat. Could also be fun to run this in batch mode over the call log to see if there are numbers without names and to look them up.
 

The Following User Says Thank You to jacktanner For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#3
/etc/event.d/callerid (assuming it's actually in /usr/bin).
Code:
start on started hildon-desktop

respawn

script
  exec su - user -c "exec /usr/bin/callerid --daemon"
end script
Add the file to the deb and make it install to the location I mentioned above.
This way it'll auto start and you can start/stop callerid from terminal
 

The Following 14 Users Say Thank You to MohammadAG For This Useful Post:
hypoxic's Avatar
Posts: 23 | Thanked: 20 times | Joined on Dec 2009
#4
been looking for something like this for a long time, thanks for getting the ball rolling!

i'm curious however on what sort of search site would provide the right kind of response for the US. i've yet to find any lookup sites for american numbers that are straightforward reverse lookups with simple outputs to queries. most seem to be trying to sell their services or are more of a community based response to telemarketing (whocalled.us, etc)

is the program able to pase/scrape webpage outputs?

thanks again!
 
Posts: 40 | Thanked: 49 times | Joined on Apr 2010 @ Birmingham - UK
#5
Sounds good. Will install tomorrow :-)
 
colm.smyth's Avatar
Posts: 334 | Thanked: 94 times | Joined on May 2010 @ Ireland
#6
I agree this is brilliant, if you can get it to a stage where it can be started/stoped/configured from the top menu on your home screen that would be brilliant
__________________
Ireland's Technology Blog
 
Banned | Posts: 358 | Thanked: 160 times | Joined on Dec 2010
#7
Originally Posted by MohammadAG View Post
/etc/event.d/callerid (assuming it's actually in /usr/bin).
Code:
start on started hildon-desktop

respawn

script
  exec su - user -c "exec /usr/bin/callerid --daemon"
end script
Add the file to the deb and make it install to the location I mentioned above.
This way it'll auto start and you can start/stop callerid from terminal
What do respawn mean? Does it mean waiting for a some time because I use a pause command in my startup script?
 
Saturn's Avatar
Posts: 1,648 | Thanked: 2,122 times | Joined on Mar 2007 @ UNKLE's Never Never Land
#8
Originally Posted by epitaph View Post
What do respawn mean? Does it mean waiting for a some time because I use a pause command in my startup script?
In short, the process will be restarted whenever it terminates.
 
Posts: 2 | Thanked: 2 times | Joined on May 2010
#9
Great job @ovekaaven!

Here the ch.xml for switzerland:

Code:
<config>
  <directory>
    <query>http://tel.search.ch/?tel=</query>
    <name>
      <find class="fn"/>
    </name>
  </directory>
</config>
best regards,
Martin

Last edited by mga; 2011-03-07 at 16:23. Reason: code quoting
 

The Following 2 Users Say Thank You to mga For This Useful Post:
Posts: 1 | Thanked: 0 times | Joined on Mar 2011
#10
Does this app use any directories to locate the numbers or it just searching the Web like google search?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:58.