TAPI - Returning the user’s country andd city codes¶
tapiGetLocationInfo() |
Return the user’s country and city codes |
SYNTAX
tapiGetLocationInfo()
This function returns the country code and city (area) code that the user has set as Current Location parameters in the Telephony Control Panel. This information can be used to assist in the construction of telephone numbers; the codes may, for example, be offered as default values when new numbers are entered in a telephone book or in a database record.
The information is returned by means of the tapiGetValue() function, as follows:
tapiGetValue(TAPI_VAR_COUNTRY) returns an alphanumeric string specifying the country code for the current location. The receiving field should be at least 8 bytes long. If no country code has been set for the current location, an empty string is returned.
tapiGetValue(TAPI_VAR_CITY) returns an alphanumeric string specifying the city (area) code for the current location. The receiving field should be at least 8 bytes long. If no city code has been set for the current location, an empty string is returned.
EXAMPLE
!temp RC,,i4
!temp Country,,a8
!temp City,,a8
tmp.RC = tapiGetLocationInfo()
tmp.Country = tapiGetValue(TAPI_VAR_COUNTRY)
tmp.City = tapiGetValue(TAPI_VAR_CITY)
RELATED TOPICS |