Эти элементы имеют класс "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 - идентификатор элемента.
Ответ содержит информацию об элементе:
...
<elementid="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 are:
- k
...
- - user session ID;
- id
...
- - 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
...
- - the IP address of the external Vutlan device.
When creating a new element
...
following fields are mandatory: name, login, password, to, message, and addr
...
. 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 are:
- k
...
- - user session ID;
- id
...
- - notification ID;
getelement - read the element. Required parameters are:
- k
...
- - user session ID;
- id
...
- - notification ID;
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
...
- - 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
...
- - the IP address of the external Vutlan device