2.3.11.3 Phones

The “[Phones]” section of TELEPHON.INI specifies the phones that are defined in the system, the driver (provider) with which they are associated, and a user-assigned friendly name for each.

This section has the following format:


[Phones]=<count>,<lastID>x=<id>,<DriverId>,"<friendlyname>"
The Phones entry indicates how many phones are defined (and how many Phonex entries appear in the section) with the <count> parameter. The <lastID> parameter is an "advisory" parameter indicating the most recently assigned permanent phone ID. This can be used to optimize the assignment of new unique permanent phone IDs. Both <count> and <lastID> are set to 0 when Telephony is installed. The values must be updated consistently by any agent that modifies the [Phones] section.

Each Phonex entry defines a phone and giving its permanent ID <id> (used to link parameters in other files, such as address translation, to the phone), the identity <DriverID> of the provider with which it is associated, and a user-assigned friendly name. Phone permanent IDs are in the range from 0 to 4,294,967,295 and must be unique throughout the [Phones] section. "x" takes values from 0 to one less than <count>. Phonex entries must have their name-sequence numbers renumbered to form a contiguous range whenver needed, although there is no requirement that they appear in sequential order.

Parts of the Telephony service require that the name-sequence numbers of the phones for a given service provider form a contiguous range, although they need not appear sequentially in the TELEPHON.INI file. For example, if one were to select all Phonex entries with DriverID of "26" and sort them sequentially by their name-sequence number "x", one would find that the sequence has no "holes":

Phone4=1234, 26, "first"=1567, 26, "second"=1103, 26, "third"

is legal but

Phone4=1234, 26, "first"=1567, 26, "second"=1103, 26, "third"

is not since the name "Phone5" is skipped. Any agent that adds or removes phones in the middle of the overall sequence must renumber other name-sequence numbers accordingly.

As mentioned earlier, the TSPI provides operations to retrieve the permanent ID of a given line. A Service Provider can determine the set of permanent IDs it is assigned by searching the [Drivers] section for the Driverx entry that matches its filename. The associated permanent ID <id> is its Driver ID. It then searches the [Lines] section for all Linex entries with a matching <DriverID>. The associated permanent IDs <id> are the permanent line IDs. It may assign these to the lines it manages as it chooses. These assignments are typically not random; a Service Provider usually uses these to identify associations with additional characteristics defined by that Service Provider such as physical connector identification, etc.

Similar observations hold true for retrieving and associating permanent IDs for phones.