Get system dictionaries
getDictionary returns a system dictionary: a list of the IDs and names that other methods take as parameters, for example the i_time_zone of an account or the i_protocol of a connection. Use it to fill drop-downs in your own forms and to translate IDs into names.
The method supports trusted mode with i_customer.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Name of the dictionary, from the table below |
type |
string | no | Required for languages: web for the panel languages, ivr for the IVR prompt languages |
name |
Returns |
|---|---|
languages |
Defined languages. Needs type |
currencies |
Currencies available to the authenticated customer |
timezones |
Time zones |
export_types |
Download formats |
upload_types |
Supported upload types |
media_relay_types |
Media relay types, for i_media_relay_type |
media_relays |
Available media relays |
protocols |
Signalling protocols, for i_protocol |
proto_transports |
Protocol and transport pairs such as SIP over UDP or TLS, for i_proto_transport |
qmon_actions |
Actions of quality monitoring on a vendor connection |
forward_did_modes |
DID forward modes of an incoming route, for i_forward_did_mode |
privacy_modes |
Privacy modes of a connection |
tariff_types |
Tariff types, for i_tariff_type |
ssl_certificate_types |
Types of SSL certificates |
ca_list_types |
Types of CA lists |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
dictionary |
array | One struct per entry: the ID, named after the parameter it is used for (i_time_zone, i_protocol, i_tariff_type …), and name |
Example
Section titled “Example”call("getDictionary", {"name": "tariff_types"}){ "result": "OK", "dictionary": [ {"i_tariff_type": 1, "name": "Tariff"}, {"i_tariff_type": 2, "name": "Incoming Tariff"}, # … one struct per entry ],}Related
Section titled “Related”- Create an account:
i_time_zone,i_media_relay_typeand other dictionary IDs - Connections management:
i_protocol,i_proto_transport - Account incoming routing:
i_forward_did_mode - Manage network services