Site map  



agiconf [-a] [-c] [-d] [-g Group] [-h] [-t] [-v]


Agiconf configures namelookup.agi.
It can be used to generate the files agi-namelookup.conf, agi-nameblock.db, numbers.db, areas.db and regions.db.
The software looks for source files in /usr/local/share/phonebook/. When debug (-d) is used, it looks in the default directory.
Exceptions are agi-nameblock.txt and numbers.tsv. The software always looks for these files in /etc/namelookup-agi/. If this fails it will look in the default directory. If this also fails it will look in your home directory.
Note: If you want to convert agi-nameblock.txt to agi-nameblock.db or numbers.tsv to numbers.db, start this program in the directory where agi-nameblock.txt and numbers.tsv are. Or put both files in /etc/namelookup-agi/ or your home directory.
Note: When running this program as root, the homedir is of course /root. Unless you use 'su -p' to become root, in which is case it's your homedir. If you prefer sudo to su, the sudo '-D' option can be used to set the directory.

Menu Keys and Menu navigation

Press 1, 2, 3, etc to select an item and then press the <Enter> key to execute. Press 'Q' or 'q', <Enter> to quit. Press 'W' or 'w', <Enter> to write to a file.

Scroll lists

In scroll lists use cursor keys up, down, page-up page-down, home and end to move up and down. Use keys like 'q' and 'w' to move to the menu items below. Keys 'a' to 'z' not listed in the menu below will move to the nearest item in the scroll list which starts with that letter.
A mouse click on the horizontal line just below the scroll list, moves down. A mouse click on the blank line just above the scroll list, moves up.
Space and <Enter> toggle selection of an item in the scroll list.
<Tab> toggles between the scroll list and the menu below.
Note: In country selection you can only select ONE country.
Note: In area code list file selection you can only select ONE list file per country.
Note: You can't drag the scroll progress bar on the right up or down with your mouse.

Country selection

The scroll list lists Country, Country code, International call prefix and Trunk code prefix. The international code prefix is usually '00'. The trunk code prefix is usually '0'.
Agiconf uses this information to change numbers into values that are used in caller-IDs. E.G.: change 31 (Netherlands) to 0031 and 3170 (NL The Hague) to 003170 or 070 (or whatever the international code prefix and trunk code prefix may be).

Select Country

Note: The first time you enter 'country selection', agiconf will try to guess your country based on the 'locale' and jump to that country in the scroll list. Make sure it guessed right.

Area code list files

These come in low, medium or high resolution or granularity. English or other languages.

Select Areas

Default is English, medium resolution.

Main menu status

If you run the program before, Select-Country, Web-Lookups, Compact-Files and Select-Regions display previous saved settings.

Main menu

If you save agi-nameblock.db, numbers.db or areas.db (or their compact equivalents), the main menu will display 'Done' next to Convert-Blocklist, Convert-Phonebook or Select-Areas;
These display the result of your CURRENT actions, not a previous run!
The area selection does get saved to 'confagi.conf' though. It is displayed the next time you enter Select-Areas.


All file contents are UTF-8. File names are US-ASCII.
Note: This program has limited functionality in an non UTF-8 environment.


Use ASCII scroll progress bar.
With an UTF-8 locale the scroll progress bar on the right uses block characters 0x2581 to 0x2588. In a non UTF-8 environment it uses a reverse video space instead. If you experience problems displaying block characters, this option can be used to disable the use of block characters.
Note: This option does not change the way non-ASCII text is displayed.
Enable colour
Agiconf scroll lists
This sets white (pale gray) text on a blue background.
Headers are bright yellow.
Potentially selected items are reverse video.
Selected items are black on cyan.
Chosen options are black on white.
Enable debug.
This uses files in the default directory; It reads files in the default directory. It writes to files in the default directory.
-g Group
Set this group instead of asterisk.
Agiconf will change the group ownership of the numbers file to this group.
Print help and exit.
Text output.
Output areas and regions in TSV format; areas.tsv and regions.tsv. You can manually edit these files before converting them to binary format with aginum2db.
Note: TSV Files are saved in the default directory.
Print version and exit.


Config file for namelookup.agi.
Web lookup on/off and compact file format on/off are saved to this file.
Invalid names blocklist.
When a name set by a VOIP provider is in this list, namelookup.agi will consider the name absent and do a lookup anyway.
Invalid names blocklist.
agiconf can convert this file to agi-nameblock.db. It converts the contents to lower case and sorts to alphabetical order.
Note: The software will only convert non-ASCII in an UTF-8 environment!
Config file for agiconf.
Selecting a country will save the country number, international call prefix and trunk prefix to this file.
When regions.db is saved with federal states, this setting is saved.
When areas.db is saved, the area file selection is saved.
Note: This file is overwritten each time agiconf is used.
List of countries and their area code files.
Contains countries and their country codes, international call prefixes and trunk prefixes.
Source directory for areas.db and regions.db.
Phone book.
Compact file format phone book.
Index to compact file format phone book.
Phone book in TSV format.
agiconf can convert this file to numbers.db or numbers.lst and numbers.idx It sorts numbers to alphabetical order.
Area codes.
Compact file format area codes.
Index to compact file format area codes.
Area codes in TSV format.
Country codes.
Compact file format country codes.
Index to compact file format country codes.
Country codes in TSV format.

Exit Status

The program returns 1 on error, 0 on success.