The Following 29 Users Say Thank You to ovekaaven For This Useful Post: | ||
![]() |
2011-03-06
, 18:16
|
|
Posts: 2,473 |
Thanked: 12,265 times |
Joined on Oct 2009
@ Jerusalem, PS/IL
|
#3
|
start on started hildon-desktop respawn script exec su - user -c "exec /usr/bin/callerid --daemon" end script
![]() |
2011-03-06
, 20:25
|
|
Posts: 23 |
Thanked: 20 times |
Joined on Dec 2009
|
#4
|
![]() |
2011-03-06
, 20:34
|
Posts: 40 |
Thanked: 49 times |
Joined on Apr 2010
@ Birmingham - UK
|
#5
|
![]() |
2011-03-06
, 22:44
|
|
Posts: 334 |
Thanked: 94 times |
Joined on May 2010
@ Ireland
|
#6
|
![]() |
2011-03-06
, 23:13
|
Banned |
Posts: 358 |
Thanked: 160 times |
Joined on Dec 2010
|
#7
|
/etc/event.d/callerid (assuming it's actually in /usr/bin).
Add the file to the deb and make it install to the location I mentioned above.Code:start on started hildon-desktop respawn script exec su - user -c "exec /usr/bin/callerid --daemon" end script
This way it'll auto start and you can start/stop callerid from terminal
![]() |
2011-03-06
, 23:17
|
|
Posts: 1,648 |
Thanked: 2,122 times |
Joined on Mar 2007
@ UNKLE's Never Never Land
|
#8
|
What do respawn mean? Does it mean waiting for a some time because I use a pause command in my startup script?
![]() |
2011-03-07
, 16:22
|
Posts: 2 |
Thanked: 2 times |
Joined on May 2010
|
#9
|
<config> <directory> <query>http://tel.search.ch/?tel=</query> <name> <find class="fn"/> </name> </directory> </config>
![]() |
2011-03-07
, 19:01
|
Posts: 1 |
Thanked: 0 times |
Joined on Mar 2011
|
#10
|
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.