Дерево страниц
Перейти к концу метаданных
Переход к началу метаданных

Hc_sip_dynamic_user_area_info

Команда выводит информацию об одной или нескольких динамических группах SIP-абонентов.

Аналог команды в CoCon:

domain/<DOMAIN>/sip/user/dynamic-area/info

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sip_dynamic_user_area_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">

    <!-- request type -->
    <xs:complexType name="requestType">
        <xs:attribute name="area" use="optional"/>
        <xs:attribute name="domain" use="required"/>
    </xs:complexType>

    <!-- answer type -->
    <xs:complexType name="areaType">
        <xs:attribute name="error" use="optional"/>
        <xs:attribute name="servers" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">
                    The service provides information about the server in the form of ID and STATUS
                    Sample: "id:master,status:ok;id:slave,status:unknown" 
                </xs:documentation>
                <xs:documentation xml:lang="ru">
                    Сервис предоставляет информацию о сервере в виде ID и STATUS
                    Пример: "id:master,status:ok;id:slave,status:unknown" 
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="context" use="optional"/>
        <xs:attribute name="sip_domain" use="optional"/>
        <xs:attribute name="size_limit" use="optional"/>
        <xs:attribute name="full_digest" use="optional"/>
        <xs:attribute name="radius_draft" use="optional"/>
        <xs:attribute name="modification_rule" use="optional"/>
        <xs:attribute name="cisco_vsa_for_all" use="optional"/>
    </xs:complexType>

    <!-- response type -->
    <xs:complexType name="responseType">
        <xs:sequence>
            <xs:element name="area" type="areaType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request" type="requestType" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="response" type="responseType" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>

Пример 1:

http://192.168.1.21:9999/commands/sip_dynamic_user_area_info

<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" 
        xs:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_info.xsd">
    <request domain="biysk.local"/>
</in>

Ответ:

status: 200
content: 
<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_info.xsd">
    <response>
        <area sip_domain="dyn_bsk2" context="ctx_from_local" size_limit="10" full_digest="true" radius_draft="false" cisco_vsa_for_all="false" servers="id:r1,status:ok;id:r2,status:ok"/>
        <area sip_domain="make_dyn" context="ctx_from_local" size_limit="1" full_digest="true" radius_draft="false" cisco_vsa_for_all="false" servers="id:r1,status:ok;id:r2,status:ok"/>
    </response>
</out>

Пример 2:

http://192.168.1.21:9999/commands/sip_dynamic_user_area_info

<in
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" 
        xs:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_info.xsd">
    <request domain="biysk.local" area="superarea"/>
</in>

Ответ:

status: 200
content: 
<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_info.xsd">
    <response>
        <area sip_domain="superarea" error="No information about this areas: &quot;superarea&quot;"/>
    </response>
</out>

Hc_sip_dynamic_user_area_set

Команда используется для установки параметров группы динамических SIP-абонентов.

1 - Не существовавшие - создаются;
2 - Существующие - изменяются;
3 - Не указанные - удаляются;
4 - Дубликаты - не допустимы.

Аналог команды в CoCon:

domain/<DOMAIN>/sip/user/dynamic-area/set

Метод HTTP-запроса:

POST

Шаблон HTTP-запроса:

http://host:port/commands/sip_dynamic_user_area_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:include schemaLocation="error.xsd"/>

    <!-- request type -->
    <xs:complexType name="requestType">
        <xs:sequence>
            <xs:element name="area" type="areaType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="domain" use="required"/>
    </xs:complexType>

    <!-- area type -->
    <xs:complexType name="areaType">
        <xs:attribute name="servers" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">
                    Service in accordance with several server names in the form of a list.
                    Sample: "id:master;id:slave" 
                </xs:documentation>
                <xs:documentation xml:lang="ru">
                    Сервис в качестве настроек принимает лишь названия серверов в виде списка.
                    Пример: "id:master;id:slave" 
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="context" use="required"/>
        <xs:attribute name="size_limit" use="required"/>
        <xs:attribute name="sip_domain" use="optional"/>
        <xs:attribute name="full_digest" use="optional"/>
        <xs:attribute name="modification_rule" use="optional"/>
        <xs:attribute name="cisco_vsa_for_all" use="optional"/>
    </xs:complexType>

    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request" type="requestType" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="error" type="errorType" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

Пример 1:

Запрос: http://192.168.23.34:9999/commands/sip_dynamic_user_area_set

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_set.xsd">
        <request domain="ivan.local">
            <area sip_domain="make" context="default_routing" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:asdasdqa,status:unknown"/>
            <area sip_domain="change" context="default_routing" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:asdasdqa,status:unknown"/>
        </request>
        </in>

Ответ:

status: 204
content:

Пример 2:

Запрос: http://192.168.23.34:9999/commands/sip_dynamic_user_area_set

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_set.xsd">
        <request domain="ivan.local">
            <area sip_domain="make" context="default_routing" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:asdasdqa,status:unknown"/>
            <area sip_domain="make" context="default_routing" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:asdasdqa,status:unknown"/>
            <area sip_domain="make" context="default_routing" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:asdasdqa,status:unknown"/>
        </request>
        </in>

Ответ:

status: 200
content:

<?xml version="1.0"?>
    <out xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_set.xsd">
        <error cmd="sip_dynamic_user_area_set" reason="duplicate" body="make;make"/>
    </out>

Пример 3:

Запрос: http://192.168.1.21:9999/commands/sip_dynamic_user_area_set

<in
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_sip_dynamic_user_area_set.xsd">
    <request domain="biysk.local">
        <area sip_domain="make_dyn" context="ctx_from_local" size_limit="1" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:r1;id:r2"/>
        <area sip_domain="dyn_bsk2" context="ctx_from_local" size_limit="10" full_digest="true" modification_rule="no" cisco_vsa_for_all="false" servers="id:r1;id:r2;id:blabla"/>
    </request>
</in>

Ответ:

response
status: 204
content: 
  • Нет меток