Hc_adaptation_context_delete

Команда предназначена для удаления контекста адаптации номеров по имени из определенного домена.

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

cluster/storage/<STORAGE>/adaptation/delete

domain/<DOMAIN>/adaptation/delete

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

POST

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

http://host:port/commands/adaptation_context_delete

Код HTTP-ответа:

  • 204 – в случае успеха;
  • 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"/>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="context" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:all>
                <xs:element name="error" type="errorType"/>
            </xs:all>
        </xs:complexType>
    </xs:element>
</xs:schema>
XML

Пример 1

Удаление существующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_adaptation_context_delete.xsd">
        <request domain="biysk.local" context="mod1_adp"/>
</in>
XML

Ответ:

204

Пример 2

Удаление несуществующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_adaptation_context_delete.xsd">
        <request domain="biysk.local" context="adp2"/>
</in>
XML

Ответ:

404

<?xml version="1.0" encoding="UTF-8"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_adaptation_context_delete.xsd">
    <error cmd="adaptation_context_delete" reason="not_exists" body="not_found" entity="adp2"/>
</out>
XML

Hc_adaptation_context_import

Команда предназначена для импорта контекста адаптации номеров в определенный домен. Если контекст в указанным именем уже существует - контекст будет обновлен.

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

cluster/storage/<STORAGE>/adaptation/import

domain/<DOMAIN>/adaptation/import

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

POST

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

http://host:port/commands/adaptation_context_import

Код HTTP-ответа:

  • 201 – в случае успеха;
  • 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" />
    <xs:complexType name="valueType">
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- progressType -->
    <xs:complexType name="progressType">
        <xs:sequence>
            <xs:element name="ref" minOccurs="1" maxOccurs="1" type="valueType" />
            <xs:element name="text" minOccurs="1" maxOccurs="1" type="valueType" />
        </xs:sequence>
    </xs:complexType>
    <!-- in -->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="context" type="xs:base64Binary" />
                        </xs:sequence>
                        <xs:attribute name="domain" type="xs:string" use="required" />
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="error" type="errorType" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <!-- progress -->
    <xs:element name="progress" type="progressType"/>
</xs:schema>
XML

Пример 1:

Импорт валидного контекста

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

<in>
    <request domain="biysk.local">
        <context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48YWRhcHRhdGlvbiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzOm5vTmFtZXNwYWNlU2NoZW1hTG9jYXRpb249ImVjc3NfbW9kaWZpY2F0b3JzLnhzZCIgbmFtZT0iYWRwX3Nvcm0iPjxydWxlIG5hbWU9ImZvcl9zb3JtIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjwvYWRhcHRhdGlvbj4=</context>
    </request>
</in>
XML

Ответ:

201

Пример 2

Запрос невалидного контекста

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

<in>
<request domain="biysk.local">
<context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48YWRhcHRhdB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzOm5vTmFtZXNwYWNlU2NoZW1hTG9jYXRpb249ImVjc3NfbW9kaWZpY2F0b3JzLnhzZCIgbmFtZT0iYWRwX3Nvcm0iPjxydWxlIG5hbWU9ImZvcl9zb3JtIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjwvYWRhcHRhdGlvbj4=</context>
</request>
</in>
XML

Ответ:

404

<?xml version="1.0" encoding="UTF-8"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_adaptation_context_import.xsd">
    <error cmd="adaptation_context_import" reason="invalid_input_xml" body="{invalid_xml,["Parse xml error: {1,xmerl_b64Bin,[\"syntax error before: \",[\"\\\"=\\\"\"]]}"]}" entity="<?xml version='1.0' encoding='latin1'?> <in> <request domain="biysk.local"> <context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48YWRhcHRhdB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzOm5vTmFtZXNwYWNlU2NoZW1hTG9jYXRpb249ImVjc3NfbW9kaWZpY2F0b3JzLnhzZCIgbmFtZT0iYWRwX3Nvcm0iPjxydWxlIG5hbWU9ImZvcl9zb3JtIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjwvYWRhcHRhdGlvbj4=</context> </request> </in>"/>
</out>
XML

Hc_adaptation_context_list

Команда предназначена для просмотра списка контекстов адаптации номеров в определенном домене.

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

cluster/storage/<STORAGE>/adaptation/list

domain/<DOMAIN>/adaptation/list

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

POST

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

http://host:port/commands/adaptation_context_list

Код HTTP-ответа:

  • 200 – в случае успеха;
  • 404 – в случае ошибки.

XSD-схема XML-запроса/ответа:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!-- contextType-->
    <xs:complexType name="contextType">
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <!-- out-->
    <xs:element name="out">
        <xs:complexType>
            <xs:all>
                <xs:element name="contexts">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="context" type="contextType" minOccurs="0" maxOccurs="unbounded"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
</xs:schema>

XML

Пример:

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

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

Ответ:

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_adaptation_context_list.xsd">
    <contexts>
        <context name="mod1_adp"/>
        <context name="adp_sorm"/>
        <context name="default_adaptation"/>
    </contexts>
</out>
XML

Hc_adaptation_context_show

Команда предназначена для получения контекста адаптации номеров по имени из определенного домена.

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

cluster/storage/<STORAGE>/adaptation/show

domain/<DOMAIN>/adaptation/show

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

POST

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

http://host:port/commands/adaptation_context_show

Код 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"/>
    <!-- out-->
    <xs:element name="out">
        <xs:complexType>
            <xs:choice>
                <xs:element name="context" type="xs:base64Binary"/>
                <xs:element name="error" type="errorType"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="context" type="xs:string" use="required"/>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
XML

В поле context в результате в кодировке base64 закодирован контекст адаптации (в формате XML). XSD схема, валидирующая контексты адаптации:

ecss_modificators.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<!-- categoryType -->
	<xs:simpleType name="categoryType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="unknownAtThisTime"/>
			<xs:enumeration value="operatorFrench"/>
			<xs:enumeration value="operatorEngish">
				<xs:annotation>
					<xs:documentation xml:lang="en">Obsolete value. Correct value is operatorEnglish</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="operatorEnglish"/>
			<xs:enumeration value="operatorGerman"/>
			<xs:enumeration value="operatorRussian"/>
			<xs:enumeration value="operatorSpanish"/>
			<xs:enumeration value="reserved"/>
			<xs:enumeration value="ordinarySubscriber"/>
			<xs:enumeration value="subscriberWithPriority"/>
			<xs:enumeration value="dataCall"/>
			<xs:enumeration value="testCall"/>
			<xs:enumeration value="spare"/>
			<xs:enumeration value="payphone"/>
			<xs:enumeration value="category0"/>
			<xs:enumeration value="hotelsSubscriber"/>
			<xs:enumeration value="freeSubscriber"/>
			<xs:enumeration value="paidSubscriber"/>
			<xs:enumeration value="localSubscriber"/>
			<xs:enumeration value="localTaksofon"/>
			<xs:enumeration value="autoCallI"/>
			<xs:enumeration value="semiautoCallI"/>
			<xs:enumeration value="autoCallII"/>
			<xs:enumeration value="semiautoCallII"/>
			<xs:enumeration value="autoCallIII"/>
			<xs:enumeration value="semiautoCallIII"/>
			<xs:enumeration value="autoCallIV"/>
			<xs:enumeration value="semiautoCallIV"/>
			<xs:enumeration value="0"/>
			<xs:enumeration value="1"/>
			<xs:enumeration value="2"/>
			<xs:enumeration value="3"/>
			<xs:enumeration value="4"/>
			<xs:enumeration value="5"/>
			<xs:enumeration value="6"/>
			<xs:enumeration value="7"/>
			<xs:enumeration value="8"/>
			<xs:enumeration value="9"/>
			<xs:enumeration value="10"/>
			<xs:enumeration value="11"/>
			<xs:enumeration value="12"/>
			<xs:enumeration value="13"/>
			<xs:enumeration value="14"/>
			<xs:enumeration value="15"/>
			<xs:enumeration value="16"/>
			<xs:enumeration value="17"/>
			<xs:enumeration value="18"/>
			<xs:enumeration value="19"/>
			<xs:enumeration value="20"/>
			<xs:enumeration value="21"/>
			<xs:enumeration value="22"/>
			<xs:enumeration value="23"/>
			<xs:enumeration value="24"/>
			<xs:enumeration value="25"/>
			<xs:enumeration value="26"/>
			<xs:enumeration value="27"/>
			<xs:enumeration value="28"/>
			<xs:enumeration value="29"/>
			<xs:enumeration value="30"/>
			<xs:enumeration value="31"/>
			<xs:enumeration value="32"/>
			<xs:enumeration value="33"/>
			<xs:enumeration value="34"/>
			<xs:enumeration value="35"/>
			<xs:enumeration value="36"/>
			<xs:enumeration value="37"/>
			<xs:enumeration value="38"/>
			<xs:enumeration value="39"/>
			<xs:enumeration value="40"/>
			<xs:enumeration value="41"/>
			<xs:enumeration value="42"/>
			<xs:enumeration value="43"/>
			<xs:enumeration value="44"/>
			<xs:enumeration value="45"/>
			<xs:enumeration value="46"/>
			<xs:enumeration value="47"/>
			<xs:enumeration value="48"/>
			<xs:enumeration value="49"/>
			<xs:enumeration value="50"/>
			<xs:enumeration value="51"/>
			<xs:enumeration value="52"/>
			<xs:enumeration value="53"/>
			<xs:enumeration value="54"/>
			<xs:enumeration value="55"/>
			<xs:enumeration value="56"/>
			<xs:enumeration value="57"/>
			<xs:enumeration value="58"/>
			<xs:enumeration value="59"/>
			<xs:enumeration value="60"/>
			<xs:enumeration value="61"/>
			<xs:enumeration value="62"/>
			<xs:enumeration value="63"/>
			<xs:enumeration value="64"/>
			<xs:enumeration value="65"/>
			<xs:enumeration value="66"/>
			<xs:enumeration value="67"/>
			<xs:enumeration value="68"/>
			<xs:enumeration value="69"/>
			<xs:enumeration value="70"/>
			<xs:enumeration value="71"/>
			<xs:enumeration value="72"/>
			<xs:enumeration value="73"/>
			<xs:enumeration value="74"/>
			<xs:enumeration value="75"/>
			<xs:enumeration value="76"/>
			<xs:enumeration value="77"/>
			<xs:enumeration value="78"/>
			<xs:enumeration value="79"/>
			<xs:enumeration value="80"/>
			<xs:enumeration value="81"/>
			<xs:enumeration value="82"/>
			<xs:enumeration value="83"/>
			<xs:enumeration value="84"/>
			<xs:enumeration value="85"/>
			<xs:enumeration value="86"/>
			<xs:enumeration value="87"/>
			<xs:enumeration value="88"/>
			<xs:enumeration value="89"/>
			<xs:enumeration value="90"/>
			<xs:enumeration value="91"/>
			<xs:enumeration value="92"/>
			<xs:enumeration value="93"/>
			<xs:enumeration value="94"/>
			<xs:enumeration value="95"/>
			<xs:enumeration value="96"/>
			<xs:enumeration value="97"/>
			<xs:enumeration value="98"/>
			<xs:enumeration value="99"/>
			<xs:enumeration value="100"/>
			<xs:enumeration value="101"/>
			<xs:enumeration value="102"/>
			<xs:enumeration value="103"/>
			<xs:enumeration value="104"/>
			<xs:enumeration value="105"/>
			<xs:enumeration value="106"/>
			<xs:enumeration value="107"/>
			<xs:enumeration value="108"/>
			<xs:enumeration value="109"/>
			<xs:enumeration value="110"/>
			<xs:enumeration value="111"/>
			<xs:enumeration value="112"/>
			<xs:enumeration value="113"/>
			<xs:enumeration value="114"/>
			<xs:enumeration value="115"/>
			<xs:enumeration value="116"/>
			<xs:enumeration value="117"/>
			<xs:enumeration value="118"/>
			<xs:enumeration value="119"/>
			<xs:enumeration value="120"/>
			<xs:enumeration value="121"/>
			<xs:enumeration value="122"/>
			<xs:enumeration value="123"/>
			<xs:enumeration value="124"/>
			<xs:enumeration value="125"/>
			<xs:enumeration value="126"/>
			<xs:enumeration value="127"/>
			<xs:enumeration value="128"/>
			<xs:enumeration value="129"/>
			<xs:enumeration value="130"/>
			<xs:enumeration value="131"/>
			<xs:enumeration value="132"/>
			<xs:enumeration value="133"/>
			<xs:enumeration value="134"/>
			<xs:enumeration value="135"/>
			<xs:enumeration value="136"/>
			<xs:enumeration value="137"/>
			<xs:enumeration value="138"/>
			<xs:enumeration value="139"/>
			<xs:enumeration value="140"/>
			<xs:enumeration value="141"/>
			<xs:enumeration value="142"/>
			<xs:enumeration value="143"/>
			<xs:enumeration value="144"/>
			<xs:enumeration value="145"/>
			<xs:enumeration value="146"/>
			<xs:enumeration value="147"/>
			<xs:enumeration value="148"/>
			<xs:enumeration value="149"/>
			<xs:enumeration value="150"/>
			<xs:enumeration value="151"/>
			<xs:enumeration value="152"/>
			<xs:enumeration value="153"/>
			<xs:enumeration value="154"/>
			<xs:enumeration value="155"/>
			<xs:enumeration value="156"/>
			<xs:enumeration value="157"/>
			<xs:enumeration value="158"/>
			<xs:enumeration value="159"/>
			<xs:enumeration value="160"/>
			<xs:enumeration value="161"/>
			<xs:enumeration value="162"/>
			<xs:enumeration value="163"/>
			<xs:enumeration value="164"/>
			<xs:enumeration value="165"/>
			<xs:enumeration value="166"/>
			<xs:enumeration value="167"/>
			<xs:enumeration value="168"/>
			<xs:enumeration value="169"/>
			<xs:enumeration value="170"/>
			<xs:enumeration value="171"/>
			<xs:enumeration value="172"/>
			<xs:enumeration value="173"/>
			<xs:enumeration value="174"/>
			<xs:enumeration value="175"/>
			<xs:enumeration value="176"/>
			<xs:enumeration value="177"/>
			<xs:enumeration value="178"/>
			<xs:enumeration value="179"/>
			<xs:enumeration value="180"/>
			<xs:enumeration value="181"/>
			<xs:enumeration value="182"/>
			<xs:enumeration value="183"/>
			<xs:enumeration value="184"/>
			<xs:enumeration value="185"/>
			<xs:enumeration value="186"/>
			<xs:enumeration value="187"/>
			<xs:enumeration value="188"/>
			<xs:enumeration value="189"/>
			<xs:enumeration value="190"/>
			<xs:enumeration value="191"/>
			<xs:enumeration value="192"/>
			<xs:enumeration value="193"/>
			<xs:enumeration value="194"/>
			<xs:enumeration value="195"/>
			<xs:enumeration value="196"/>
			<xs:enumeration value="197"/>
			<xs:enumeration value="198"/>
			<xs:enumeration value="199"/>
			<xs:enumeration value="200"/>
			<xs:enumeration value="201"/>
			<xs:enumeration value="202"/>
			<xs:enumeration value="203"/>
			<xs:enumeration value="204"/>
			<xs:enumeration value="205"/>
			<xs:enumeration value="206"/>
			<xs:enumeration value="207"/>
			<xs:enumeration value="208"/>
			<xs:enumeration value="209"/>
			<xs:enumeration value="210"/>
			<xs:enumeration value="211"/>
			<xs:enumeration value="212"/>
			<xs:enumeration value="213"/>
			<xs:enumeration value="214"/>
			<xs:enumeration value="215"/>
			<xs:enumeration value="216"/>
			<xs:enumeration value="217"/>
			<xs:enumeration value="218"/>
			<xs:enumeration value="219"/>
			<xs:enumeration value="220"/>
			<xs:enumeration value="221"/>
			<xs:enumeration value="222"/>
			<xs:enumeration value="223"/>
			<xs:enumeration value="224"/>
			<xs:enumeration value="225"/>
			<xs:enumeration value="226"/>
			<xs:enumeration value="227"/>
			<xs:enumeration value="228"/>
			<xs:enumeration value="229"/>
			<xs:enumeration value="230"/>
			<xs:enumeration value="231"/>
			<xs:enumeration value="232"/>
			<xs:enumeration value="233"/>
			<xs:enumeration value="234"/>
			<xs:enumeration value="235"/>
			<xs:enumeration value="236"/>
			<xs:enumeration value="237"/>
			<xs:enumeration value="238"/>
			<xs:enumeration value="239"/>
			<xs:enumeration value="240"/>
			<xs:enumeration value="241"/>
			<xs:enumeration value="242"/>
			<xs:enumeration value="243"/>
			<xs:enumeration value="244"/>
			<xs:enumeration value="245"/>
			<xs:enumeration value="246"/>
			<xs:enumeration value="247"/>
			<xs:enumeration value="248"/>
			<xs:enumeration value="249"/>
			<xs:enumeration value="250"/>
			<xs:enumeration value="251"/>
			<xs:enumeration value="252"/>
			<xs:enumeration value="253"/>
			<xs:enumeration value="254"/>
			<xs:enumeration value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- naiType -->
	<xs:simpleType name="naiType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="spare"/>
			<xs:enumeration value="subscriberNumber"/>
			<xs:enumeration value="unknown"/>
			<xs:enumeration value="nationalNumber"/>
			<xs:enumeration value="internationNumber"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- inniType -->
	<xs:simpleType name="inniType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="routingToInternalNumberAllowed"/>
			<xs:enumeration value="routingToInternalNumberNotAllowed"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- npiType -->
	<xs:simpleType name="npiType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="spare"/>
			<xs:enumeration value="isdnTelephony"/>
			<xs:enumeration value="dataNumberingPlan"/>
			<xs:enumeration value="telexNumberingPlan"/>
			<xs:enumeration value="reserved1"/>
			<xs:enumeration value="reserved2"/>
			<xs:enumeration value="reserved3"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- niType -->
	<xs:simpleType name="niType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="private"/>
			<xs:enumeration value="local"/>
			<xs:enumeration value="zone"/>
			<xs:enumeration value="intercity"/>
			<xs:enumeration value="international"/>
			<xs:enumeration value="emergency"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- apriType -->
	<xs:simpleType name="apriType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="presentationAllowed"/>
			<xs:enumeration value="presentationRestricted"/>
			<xs:enumeration value="addressNotAvailable"/>
			<xs:enumeration value="spare"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- screeningType -->
	<xs:simpleType name="screeningType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="userProvidedNotVerified"/>
			<xs:enumeration value="userProvidedVerifiedAndPassed"/>
			<xs:enumeration value="userProvidedVerifiedAndFailed"/>
			<xs:enumeration value="networkProvided"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- booleanType -->
	<xs:simpleType name="booleanType">
		<xs:restriction base="xs:boolean"/>
	</xs:simpleType>
	<!-- ruleType -->
	<xs:complexType name="ruleType">
		<xs:sequence>
			<xs:element name="conditions" minOccurs="0">
				<xs:complexType>
					<xs:all>
						<xs:element name="cgpn" type="cgpnType" minOccurs="0"/>
						<xs:element name="cdpn" type="cdpnType" minOccurs="0"/>
						<xs:element name="rgn" type="rgnConditionType" minOccurs="0"/>
						<xs:element name="rnn" type="rnnConditionType" minOccurs="0"/>
						<xs:element name="ocdpn" type="ocdpnConditionType" minOccurs="0"/>
						<xs:element name="cn" type="cnConditionType" minOccurs="0"/>
						<xs:element name="time" type="valueType" minOccurs="0"/>
						<xs:element name="date" type="valueType" minOccurs="0"/>
						<xs:element name="weekday" type="valueType" minOccurs="0"/>
						<xs:element name="tag" type="valueType" minOccurs="0"/>
					</xs:all>
				</xs:complexType>
			</xs:element>
			<xs:element name="actions" minOccurs="0">
				<xs:complexType>
					<xs:all>
						<xs:element name="cgpn" type="cgpnType" minOccurs="0"/>
						<xs:element name="cdpn" type="cdpnType" minOccurs="0"/>
						<xs:element name="rgn" type="rgnActionType" minOccurs="0"/>
						<xs:element name="rnn" type="rnnActionType" minOccurs="0"/>
						<xs:element name="ocdpn" type="ocdpnActionType" minOccurs="0"/>
						<xs:element name="cn" type="cnActionType" minOccurs="0"/>
						<xs:element name="empty_rgn" type="nullType" minOccurs="0">
							<xs:annotation><xs:documentation xml:lang="en">Remove routing number.</xs:documentation></xs:annotation>
						</xs:element>
						<xs:element name="empty_ocdpn" type="nullType" minOccurs="0">
							<xs:annotation><xs:documentation xml:lang="en">Remove original called number.</xs:documentation></xs:annotation>
						</xs:element>
						<xs:element name="empty_cn" type="nullType" minOccurs="0">
							<xs:annotation><xs:documentation xml:lang="en">Remove connected number.</xs:documentation></xs:annotation>
						</xs:element>
					</xs:all>
				</xs:complexType>
			</xs:element>
			<xs:element name="result">
				<xs:complexType>
					<xs:choice>
						<xs:element name="finish" type="finishResultType"/>
						<xs:element name="error" type="errorResultType"/>
						<xs:element name="next" type="nextResultType"/>
						<xs:element name="continue" type="continueResultType"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required"/>
		<xs:attribute name="description" type="xs:string" use="optional"/>
	</xs:complexType>
	<!-- modificatorsType -->
	<xs:complexType name="modificatorsType">
		<xs:all>
			<xs:element name="in" minOccurs="0" maxOccurs="1">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="out" minOccurs="0" maxOccurs="1">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:all>
		<xs:attribute name="name" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>The name of the current modificators.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Text description of the current modificators.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- adaptationType -->
	<xs:complexType name="adaptationType">
		<xs:sequence>
			<xs:element name="rule" type="ruleType" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>The name of the current adaptation.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Text description of the current adaptation.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- modificators -->
	<xs:element name="modificators" type="modificatorsType"/>
	<!-- adaptation -->
	<xs:element name="adaptation" type="adaptationType"/>
	<!-- cdpnType -->
	<xs:complexType name="cdpnType">
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="inni" type="inniType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="category" type="categoryType"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="display_name" type="xs:string"/>
	</xs:complexType>
	<!-- cgpnType -->
	<xs:complexType name="cgpnType">
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="screening" type="screeningType"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="display_name" type="xs:string"/>
		<xs:attribute name="caller_id" type="xs:string"/>
	</xs:complexType>
	<!-- rgnConditionType -->	
	<xs:complexType name="rgnConditionType">
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="empty" type="booleanType">
			<xs:annotation>
				<xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- rnnConditionType -->
	<xs:complexType name="rnnConditionType">
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="inni" type="inniType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="empty" type="booleanType">
			<xs:annotation>
				<xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- ocdpnConditionType -->
	<xs:complexType name="ocdpnConditionType">
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="category" type="categoryType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="empty" type="booleanType">
			<xs:annotation>
				<xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- cnConditionType -->
	<xs:complexType name="cnConditionType">
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="in_list" type="xs:string"/>
		<xs:attribute name="empty" type="booleanType">
			<xs:annotation>
				<xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- rgnActionType -->
	<xs:complexType name="rgnActionType">
		<xs:attribute name="display_name" type="xs:string"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="ni" type="niType"/>
	</xs:complexType>
	<!-- rnnActionType -->
	<xs:complexType name="rnnActionType">
		<xs:attribute name="display_name" type="xs:string"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
		<xs:attribute name="inni" type="inniType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="ni" type="niType"/>
	</xs:complexType>
	<!-- ocdpnActionType -->
	<xs:complexType name="ocdpnActionType">
		<xs:attribute name="display_name" type="xs:string"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="category" type="categoryType"/>
		<xs:attribute name="incomplete" type="xs:boolean"/>
	</xs:complexType>
	<!-- cnActionType -->
	<xs:complexType name="cnActionType">
		<xs:attribute name="display_name" type="xs:string"/>
		<xs:attribute name="nai" type="naiType"/>
		<xs:attribute name="npi" type="npiType"/>
		<xs:attribute name="apri" type="apriType"/>
		<xs:attribute name="digits" type="xs:string"/>
		<xs:attribute name="ni" type="niType"/>
		<xs:attribute name="caller_id" type="xs:string"/>
		<xs:attribute name="empty" type="booleanType">
			<xs:annotation>
				<xs:documentation>In case of empty attribute set - other attributes MUST NOT be set.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<!-- valueType -->
	<xs:complexType name="valueType">
		<xs:attribute name="value" type="xs:string" use="required"/>
	</xs:complexType>
	<!-- nullType -->
	<xs:complexType name="nullType"/>
	<!-- Result types -->
	<!-- finishResultType -->
	<xs:complexType name="finishResultType"/>
	<!-- errorResultType -->
	<xs:complexType name="errorResultType">
		<xs:attribute name="acp_cause" type="xs:string" use="optional"/>
		<xs:attribute name="isup_cause" type="xs:string" use="optional"/>
		<xs:attribute name="description" type="xs:string" use="optional"/>
	</xs:complexType>
	<!-- continueResultTypeType -->
	<xs:simpleType name="continueResultTypeType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="start"/>
			<xs:enumeration value="next"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- nextResultType -->
	<xs:complexType name="nextResultType">
		<xs:attribute name="tag" type="xs:string" use="optional"/>
	</xs:complexType>
	<!-- continueResultType -->
	<xs:complexType name="continueResultType">
		<xs:attribute name="tag" type="xs:string" use="optional"/>
		<xs:attribute name="type" type="continueResultTypeType" default="start" use="optional"/>
	</xs:complexType>
</xs:schema>

XML

Пример 1:

Запрос существующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_adaptation_context_show.xsd">
        <request domain="biysk.local" context="adp_sorm"/>
</in>
XML

Ответ:

200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_adaptation_context_show.xsd">
<context>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48YWRhcHRhdGlvbiB4bWxuczp4cz0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhzOm5vTmFtZXNwYWNlU2NoZW1hTG9jYXRpb249ImVjc3NfbW9kaWZpY2F0b3JzLnhzZCIgbmFtZT0iYWRwX3Nvcm0iPjxydWxlIG5hbWU9ImZvcl9zb3JtIj48Y29uZGl0aW9ucy8+PGFjdGlvbnMvPjxyZXN1bHQ+PGZpbmlzaC8+PC9yZXN1bHQ+PC9ydWxlPjwvYWRhcHRhdGlvbj4=</context>
</out>
XML

Пример 2:

Запрос несуществующего контекста

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

<in xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="hc_adaptation_context_show.xsd">
        <request domain="biysk.local" context="ctx1"/>
</in>
XML

Ответ:

404

<?xml version="1.0" encoding="UTF-8"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="hc_adaptation_context_show.xsd">
    <error cmd="adaptation_context_show" reason="context_not_found" body="{error,{ctx_not_found,{"biysk.local",ctx1}}}" entity="ctx1"/>
</out>
XML