Site map  

AGIConf

Synopsis

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

Description

Agiconf configures namelookup.agi.
It can be used to generate the files agi-namelookup.conf, 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.
An exception is numbers.tsv. The software always looks for this file in the default directory. If this fails it will then look in your home directory.
Note: If you want to convert numbers.tsv to numbers.db, start this program in the directory where numbers.tsv is. Or put numbers.tsv in 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.
Space and <Enter> toggle selection of an item in the scroll list.
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.

Country selection

The scoll 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 to 0031 and 3170 to 003170 or 070.

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 and Select-Regions display previous saved settings.
If you save numbers.db or areas.db, the main menu will display 'Done' next to Convert-Phonebook or Select-Areas: These display the result of your CURRENT actions, not a previous run.

Characterset

All file contents are UTF-8. File names are US-ASCII.

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. 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.
-c
Enable color
Agiconf country selection
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.
-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.
-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/agi-namelookup.conf
Config file for namelookup.agi.
Web lookup on/off is saved to this file.
/etc/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/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/areas.db
Area codes.
areas.tsv
Area codes in TSV format.
/var/local/lib/phonebook/regions.db
Country codes.
regions.tsv
Country codes in TSV format.

Exit Status

The program returns 1 on error, 0 on success.