Эти элементы имеют класс "notifier" и тип "sms gate".
Для управления используются следующие запросы:
addhttprequest - создание или редактирование уведомления. Дополнительные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор уведомления, если идентификатор отсутствует - создается новое уведомление, иначе - редактируется существующее;
- name - имя уведомления, длина не более 63 символов;
- type - тип сообщения, требуется только при создании нового, "sms gate";
- login - логин пользователя на внешнем устройстве Vutlan;
- password - пароль пользователя на внешнем устройстве Vutlan;
- to - номера получателей, как при отправке СМС;
- message - шаблон текста сообщения, длина не более 1023 символов;
- addr - IP-адрес внешнего устройства Vutlan.
...
<error type="no error" id="607001" /> |
При изменении допускается указывать только модифицируемые параметры. Пустые параметры удаляют предыдущее значение.
delhttprequest - удаление уведомления. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор уведомления.
getelement - чтение элемента. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор элемента.
Ответ содержит информацию об элементе:
<element |
...
id="607002" |
...
module="2010" |
...
num="2" |
...
clas="notifier" |
...
type="sms gate" |
...
name="Gate_555" |
...
state="normal" |
...
value="-" |
...
view="0" |
...
to="79991234589" |
...
message="Simple_text" |
...
login="guest" |
...
password="guest" |
...
addr="192.168.0.190" |
...
status="<error type="no error" /> |
Поле status определяет ответ сервера после последней транзакции или сообщение о произшедшей ошибке.
testmessage - отправка тестового уведомления, без создания элемента. Обязательные параметры:
- k - идентификатор сессии пользователя;
- type - тип сообщения, требуется только при создании нового, "sms gate";
- login - логин пользователя на внешнем устройстве Vutlan;
- password - пароль пользователя на внешнем устройстве Vutlan;
- to - номера получателей, как при отправке СМС;
- message - шаблон текста сообщения, длина не более 1023 символов;
- addr - IP-адрес внешнего устройства Vutlan.
These elements have the class "notifier" and the type "sms gate".
The following queries are used for management:
addhttprequest - create or edit a notification. Extra options:
- k is the user session ID;
- id is the notification identifier, if there is no identifier, a new notification is created, otherwise the existing one is edited;
- name - the name of the notification, the length is not more than 63 characters;
- type - type of message, required only when creating a new one, "sms gate";
- login - the user's login on the external Vutlan device;
- password - the user password on the external Vutlan device;
- to - numbers of recipients, as when sending SMS;
- message - message text template, the length is not more than 1023 characters;
- addr is the IP address of the external Vutlan device.
When creating a new element, the name, login, password, to, message, and addr fields are required. If a new element is successfully created, the response contains the element identifier, and looks like:
<error type="no error" id="607001" /> |
When changing, only modifiable parameters can be specified. Empty parameters delete the previous value.
delhttprequest - delete the notification. Required parameters:
- k is the user session ID;
- id is the notification identifier.
getelement - read the element. Required parameters:
- k is the user session ID;
- id is the ID of the item.
The answer contains information about the element:
<element id="607002" module="2010" num="2" clas="notifier" type="sms gate" name="Gate_555" state="normal" value="-" view="0" to="79991234589" message="Simple_text" login="guest" password="guest" addr="192.168.0.190" status="<error type="no error" /> |
The status field specifies the server's response after the last transaction or an error message.
testmessage - send a test notification, without creating an item. Required parameters:
- k is the user session ID;
- type - type of message, required only when creating a new one, "sms gate";
- login - user login on the external Vutlan device;
- password - the user password on the external Vutlan device;
- to - numbers of recipients, as when sending SMS;
- message - message text template, the length is not more than 1023 characters;
- addr is the IP address of the external Vutlan device