AGIConf
Synopsis
agiconf [-a] [-c] [-d] [-g Group] [-h] [-t] [-v]
Description
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).
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.
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.
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.
Characterset
All file contents are UTF-8.
File names are US-ASCII.
Note: This program has limited functionality in an non UTF-8 environment.
Options
- -a
-
Use ASCII scroll progress bar.
With an UTF-8 locale the scroll progress bar on the right uses block
characters 0x2581 to 0x2588 ('▁' to '█').
In a non UTF-8 environment it uses a reverse video space instead.
If you experience problems displaying block characters, E.G. using
diamond like characters instead, 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.
Note: The software will try to see if you're using a terminal emulator
and disable the use of block chars if you're not. This doesn't always
work.
- -c
-
Enable colour
This sets white (pale grey) 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.
Errors are red on white.
- -d
-
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.
- -h
-
Print help and exit.
- -t
-
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.
- -v
-
Print version and exit.
Files
- /etc/namelookup-agi/agi-namelookup.conf
-
Config file for namelookup.agi.
Web lookup on/off and compact file format on/off are saved to this file.
- /etc/namelookup-agi/agi-nameblock.db
-
Invalid names blocklist.
When a name set by a VOIP service provider is in this list, namelookup.agi
will consider the name absent and do a lookup anyway.
- agi-nameblock.txt
-
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!
- /etc/namelookup-agi/confagi.conf
-
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.
- /usr/local/share/phonebook/areas-list.tsv
-
List of countries and their area code files.
- /usr/local/share/phonebook/countries.tsv
-
Contains countries and their country codes, international call prefixes and
trunk prefixes.
- /usr/local/share/phonebook/
-
Source directory for areas.db and regions.db.
- /var/local/lib/phonebook/numbers.db
-
Phone book.
- /var/local/lib/phonebook/numbers.lst
-
Compact file format phone book.
- /var/local/lib/phonebook/numbers.idx
-
Index to compact file format phone book.
- numbers.tsv
-
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.
- /var/local/lib/phonebook/areas.db
-
Area codes.
- /var/local/lib/phonebook/areas.lst
-
Compact file format area codes.
- /var/local/lib/phonebook/areas.idx
-
Index to compact file format area codes.
- areas.tsv
-
Area codes in TSV format.
- /var/local/lib/phonebook/regions.db
-
Country codes.
- /var/local/lib/phonebook/regions.lst
-
Compact file format country codes.
- /var/local/lib/phonebook/regions.idx
-
Index to compact file format country codes.
- regions.tsv
-
Country codes in TSV format.
Exit Status
The program returns 1 on error, 0 on success.