Hc_sip_timers_info
Команда для просмотра значений таймеров подсистемы SIP.
Аналог команды в CoCon:
domain/<DOMAIN>/timers/sip/info
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_timers_info
Код HTTP-ответа::
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-файла с ответом:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:annotation> <xs:documentation xml:lang="en"> Show timer properties of SIP cluster. Usage: http://server:9999/commands/sip_timers_info. Implementation: hc_sip_timers_info.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- sipTimersOptionsType--> <xs:complexType name="sipTimersOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="sip_T1" type="integerType" use="optional"/> <xs:attribute name="sip_T2" type="integerType" use="optional"/> <xs:attribute name="sip_T4" type="integerType" use="optional"/> <xs:attribute name="sip_TC" type="integerType" use="optional"/> <xs:attribute name="forbidden" type="integerType" use="optional"/> <xs:attribute name="find_me" type="integerType" use="optional"/> <xs:attribute name="subscribe_limit" type="integerType" use="optional"/> <xs:attribute name="rfc4028_min_se" type="integerType" use="optional"/> <xs:attribute name="rfc4028_use_se" type="integerType" use="optional"/> <xs:attribute name="subscribe_over" type="integerType" use="optional"/> <xs:attribute name="reg_expire_min" type="integerType" use="optional"/> <xs:attribute name="reg_expire_max" type="integerType" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="domain_options" type="domainInfoOutType" minOccurs="1"/> </xs:all> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="request"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainInfoInType" minOccurs="1"/> </xs:all> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result" type="resultType"/> <xs:element name="error" type="errorType"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос: http://192.168.1.21:9999/commands/sip_timers_info
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="sip_timers_info.xsd"> <request> <domain_options domain="biysk.local" /> </request> </in>
Ответ: 200
<?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_info.xsd"> <result> <domain_options> <system> <options xs:type="sipTimersOptionsType"/> </system> <domain name="biysk.local"> <options xs:type="sipTimersOptionsType" subscribe_over="5" subscribe_limit="0" sip_TC="181000" sip_T4="5000" sip_T2="4000" sip_T1="500" rfc4028_use_se="1800" rfc4028_min_se="300" reg_expire_min="90" reg_expire_max="3600" forbidden="100" find_me="10000"/> </domain> </domain_options> </result> </out>
Hc_sip_timers_set
Команда установки значений таймеров подсистемы SIP в миллисекундах.
Аналог команды в CoCon:
domain/<DOMAIN>/timers/sip/set
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_timers_set
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:annotation> <xs:documentation xml:lang="en"> Set timers on SIP. Usage: http://server:9999/commands/sip_timers_set. Implementation: hc_sip_timers_set.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- sipTimersOptionsType--> <xs:complexType name="sipTimersOptionsType"> <xs:complexContent> <xs:extension base="baseOptionsType"> <xs:attribute name="sip_T1" type="integerType" use="optional"/> <xs:attribute name="sip_T2" type="integerType" use="optional"/> <xs:attribute name="sip_T4" type="integerType" use="optional"/> <xs:attribute name="sip_TC" type="integerType" use="optional"/> <xs:attribute name="forbidden" type="integerType" use="optional"/> <xs:attribute name="find_me" type="integerType" use="optional"/> <xs:attribute name="subscribe_limit" type="integerType" use="optional"/> <xs:attribute name="rfc4028_min_se" type="integerType" use="optional"/> <xs:attribute name="rfc4028_use_se" type="integerType" use="optional"/> <xs:attribute name="subscribe_over" type="integerType" use="optional"/> <xs:attribute name="reg_expire_min" type="integerType" use="optional"/> <xs:attribute name="reg_expire_max" type="integerType" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="domain_options" type="domainSetOutType" minOccurs="1"/> </xs:all> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="request"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainSetInType"/> </xs:all> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result" type="resultType" minOccurs="1" maxOccurs="1"/> <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/sip_timers_set
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_set.xsd"> <request> <domain_options> <system> <options xs:type="sipTimersOptionsType" /> </system> <domain name="biysk.local"> <options xs:type="sipTimersOptionsType" sip_T1="500" sip_T2="600" sip_T4="700" forbidden="400" find_me="500" rfc4028_min_se="100000" rfc4028_use_se="190000" subscribe_over="6"/> </domain> </domain_options> </request> </in>
Код ответа:
200
Ответ:
status: 200 content: <?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_set.xsd"> <result> <domain_options> <system/> <domain name="biysk.local"> <success option="find_me"/> <success option="forbidden"/> <success option="rfc4028_min_se"/> <success option="rfc4028_use_se"/> <success option="sip_T1"/> <success option="sip_T2"/> <success option="sip_T4"/> <success option="subscribe_over"/> </domain> </domain_options> </result> </out>
Hc_sip_timers_clean
Командой устанавливаются значения по умолчанию для таймеров подсистемы SIP в миллисекундах.
Аналог команды в CoCon:
domain/<DOMAIN>/timers/sip/clean
Метод HTTP-запроса:
POST
Шаблон HTTP-запроса:
http://host:port/commands/sip_timers_clean
Код HTTP-ответа:
- 200 – в случае успеха;
- 404 – в случае ошибки.
XSD-схема XML-запроса/ответа:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:annotation> <xs:documentation xml:lang="en"> Clean timer properties on SIP. Usage: http://server:9999/commands/sip_timers_clean. Implementation: hc_sip_timers_clean.erl. Git: git@git.eltex.loc:httpTerminal.git. Copyright (c) 2014, Eltex. All rights reserved. </xs:documentation> </xs:annotation> <xs:include schemaLocation="error.xsd"/> <xs:include schemaLocation="ecm_common.xsd"/> <!-- resultType--> <xs:complexType name="resultType"> <xs:all> <xs:element name="domain_options" type="domainCleanOutType" minOccurs="1"/> </xs:all> </xs:complexType> <!-- in--> <xs:element name="in"> <xs:complexType> <xs:sequence> <xs:element name="request"> <xs:complexType> <xs:all> <xs:element name="domain_options" type="domainCleanInType"/> </xs:all> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- out --> <xs:element name="out"> <xs:complexType> <xs:choice> <xs:element name="result" type="resultType" minOccurs="1" maxOccurs="1"/> <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Пример:
Запрос:
http://192.168.1.21:9999/commands/sip_timers_clean
<?xml version="1.0" encoding="UTF-8"?> <in xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_clean.xsd"> <request> <domain_options> <system/> <domain name="biysk.local"> <option name="sip_T1"/> <option name="sip_T2"/> <option name="sip_T4"/> <option name="forbidden"/> <option name="find_me"/> <option name="session_limit"/> <option name="rfc4028_min_se"/> <option name="subscribe_over"/> </domain> </domain_options> </request> </in>
Код ответа:
200
Ответ:
content: <?xml version="1.0"?> <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="sip_timers_clean.xsd"> <result> <domain_options> <system/> <domain name="biysk.local"> <success option="find_me"/> <success option="forbidden"/> <success option="rfc4028_min_se"/> <success option="sip_T1"/> <success option="sip_T2"/> <success option="sip_T4"/> <success option="subscribe_over"/> <error option="session_limit" reason="{error,not_found}"/> </domain> </domain_options> </result> </out>