Вспомогательные схемы используются в событиях или командах.

agent.xsd:

Информация об операторе.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

    <!-- agentStatusType -->
    <xs:simpleType name="AgentStatusType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="logged_out"/>
            <xs:enumeration value="available"/>
            <xs:enumeration value="auxwork"/>
        </xs:restriction>
    </xs:simpleType>

    <!-- agentActivityType -->
    <xs:simpleType name="AgentActivityType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="none"/>
            <xs:enumeration value="talking"/>
            <xs:enumeration value="acw"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ChannelAvailability">
        <xs:restriction base="xs:string">
            <xs:enumeration value="busy"/>
            <xs:enumeration value="free"/>
            <xs:enumeration value="blocked"/>
            <xs:enumeration value="occupied"/>
            <xs:enumeration value="not_exists"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="Channel">
        <xs:sequence>
            <xs:element name="additional_info">
                <xs:complexType>
                    <xs:anyAttribute/>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attribute name="type" type="xs:string"/>
        <xs:attribute name="status" type="ChannelAvailability"/>
    </xs:complexType>

    <xs:complexType name="Channels">
        <xs:sequence>
            <xs:element name="channel" type="Channel" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="AgentInfo">
        <xs:sequence>
            <xs:element name="channels" type="Channels"/>
        </xs:sequence>
        <xs:attribute name="agent_id" type="xs:string" use="optional"/>
        <xs:attribute name="display_name" type="xs:string" use="optional"/>
        <xs:attribute name="status" type="AgentStatusType" use="optional"/>
        <xs:attribute name="blocked" type="xs:boolean" use="optional"/>
        <xs:attribute name="activity" type="AgentActivityType" use="optional"/>
        <xs:attribute name="groups" type="xs:string" use="optional"/>
        <xs:attribute name="force_logout" type="xs:boolean" use="optional"/>
                <xs:attribute name="is_supervisor" type="xs:boolean" use="optional"/>
        </xs:complexType>

</xs:schema>
XML

call_history_common.xsd:

Типы данных истории вызовов.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

    <xs:simpleType name="SortType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="asc"/>
            <xs:enumeration value="desc"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ActivatedBy">
        <xs:restriction base="xs:string">
            <xs:enumeration value="me"/>
            <xs:enumeration value="remote"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="UrlList">
        <xs:sequence>
            <xs:element name="url" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:simpleType name="PhoneNumber">
        <xs:restriction base="xs:string">
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="SSTransfer">
        <xs:attribute name="activated_by" type="ActivatedBy" use="required"/>
        <xs:attribute name="activator" type="PhoneNumber" use="required"/>
        <xs:attribute name="activator_display_name" type="xs:string" use="optional"/>
        <xs:attribute name="participant" type="PhoneNumber" use="required"/>
        <xs:attribute name="participant_display_name" type="xs:string" use="optional"/>
        <xs:attribute name="target" type="PhoneNumber" use="required"/>
        <xs:attribute name="target_display_name" type="xs:string" use="optional"/>
        <xs:attribute name="activate_time" type="xs:string" use="required"/> <!-- дата и время -->
        <xs:attribute name="call_record" type="xs:string" use="optional"/> <!-- url -->
        <xs:attribute name="is_master" type="xs:string" use="optional"/> <!-- только для истории супервизора -->
    </xs:complexType>

    <xs:complexType name="SSList">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="transfer" type="SSTransfer" minOccurs="0" maxOccurs="unbounded"/>
            </xs:choice>
        </xs:sequence>
    </xs:complexType>
</xs:schema>
XML

conversation.xsd:

Информация о разговоре.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

	<!--AutoCompleteTimeout-->
	<xs:simpleType name="AutoCompleteTimeout">
		<xs:restriction base="xs:nonNegativeInteger">
			<xs:minInclusive value="0"/>
			<xs:maxInclusive value="3600"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="ConversationStatus">
		<xs:restriction base="xs:string">
			<xs:enumeration value="alerting"/>
			<xs:enumeration value="initiating"/>
			<xs:enumeration value="working"/>
			<xs:enumeration value="fax_receiving"/>
			<xs:enumeration value="fax_rejecting"/>
			<xs:enumeration value="hold"/>
			<xs:enumeration value="acw"/>
			<xs:enumeration value="released"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="ConversationType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="call"/>
			<xs:enumeration value="mail"/>
			<xs:enumeration value="chat"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="Direction">
		<xs:restriction base="xs:string">
			<xs:enumeration value="in"/>
			<xs:enumeration value="out"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="CCMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="normal"/>
			<xs:enumeration value="consult"/>
			<xs:enumeration value="consult_conference"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="Conversation">
		<xs:sequence>
			<xs:element name="additional_info" minOccurs="0" maxOccurs="1">
				<xs:complexType>
					<xs:sequence>
						<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"  />
					</xs:sequence>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="id" type="xs:string" use="required"/>
		<xs:attribute name="type" type="ConversationType" use="required"/>
		<xs:attribute name="status" type="ConversationStatus" use="required"/>
		<xs:attribute name="start_time" type="xs:string" use="required"/>
		<xs:attribute name="answer_time" type="xs:string" use="optional"/>
		<xs:attribute name="release_time" type="xs:string" use="optional"/>
		<xs:attribute name="fax_receiving_time" type="xs:string" use="optional"/>
		<xs:attribute name="acd" type="xs:boolean" use="required"/>
		<xs:attribute name="queue_id" type="xs:string" use="optional"/>
		<xs:attribute name="queue_description" type="xs:string" use="optional"/>
		<xs:attribute name="direction" type="Direction" use="required"/>
		<xs:attribute name="display_name_a" type="xs:string" use="required"/>
		<xs:attribute name="display_name_b" type="xs:string" use="required"/>
		<xs:attribute name="digits_a" type="xs:string" use="optional"/>
		<xs:attribute name="digits_b" type="xs:string" use="optional"/>
		<xs:attribute name="fax_receive" type="xs:boolean" use="optional"/>
		<xs:attribute name="ref" type="xs:string" use="required"/>
		<xs:attribute name="auto_complete_launched" type="xs:boolean" use="required"/>
		<xs:attribute name="auto_complete_timeout" type="AutoCompleteTimeout" use="optional"/>
		<xs:attribute name="description" type="xs:string" use="optional"/>
		<xs:attribute name="is_consult" type="xs:boolean" use="optional"/>
		<xs:attribute name="workitem_id" type="xs:string" use="optional"/>
	</xs:complexType>

</xs:schema>
XML

error.xsd:

Информация об ошибке.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="error">
    <xs:annotation>
        <xs:documentation xml:lang="en">
            Error message for HttpTerminal application.
            Copyright 2015, Eltex. All rights reserved.
        </xs:documentation>
    </xs:annotation>

    <!-- <error> -->
    <xs:complexType name="errorType">
        <xs:attribute name="cmd" type="xs:token" use="required" />
        <xs:attribute name="reason" type="errorReasonType" use="required" />
        <xs:attribute name="body" type="xs:string" use="optional" />
        <!-- entity="[nonempty_string()]" -->
        <xs:attribute name="entity" type="xs:normalizedString" use="optional" />
    </xs:complexType>
    <!-- </error> -->

    <!-- Error reasons description -->
    <xs:simpleType name="errorReasonType">
        <xs:restriction base="xs:token">
            <xs:enumeration value="unknown_error" />
            <xs:enumeration value="bad_token_info" />
            <xs:enumeration value="set_error" />
            <xs:enumeration value="exception" />
            <xs:enumeration value="error" />
            <xs:enumeration value="invalid_input_xml" />
            <xs:enumeration value="nocommand" />
            <xs:enumeration value="invalid_xml" />
            <xs:enumeration value="bad_licence" />
            <xs:enumeration value="profile_in_use" />
            <xs:enumeration value="no_rights" />
            <xs:enumeration value="parse_error" />
            <xs:enumeration value="exit" />
            <xs:enumeration value="canceled_by_user" />
            <xs:enumeration value="not_exists" />
            <xs:enumeration value="already_declared" />
            <xs:enumeration value="restricted_name"/>
            <xs:enumeration value="domain_not_exists"/>
            <xs:enumeration value="domain_not_found"/>
            <xs:enumeration value="profile_not_exists"/>
            <xs:enumeration value="profile_not_found"/>
            <xs:enumeration value="ivr_restrictions_profile_not_exists"/>
            <xs:enumeration value="badflags" />
            <xs:enumeration value="badargs" />
            <xs:enumeration value="badinput" />
            <xs:enumeration value="aborted" />
            <xs:enumeration value="no_enough_addresses" />
            <xs:enumeration value="no_enough_ifaces" />
            <xs:enumeration value="invalid_range" />
            <xs:enumeration value="const" />
            <xs:enumeration value="db_error" />
            <xs:enumeration value="invalid_value" />
            <xs:enumeration value="name_already_in_use"/>
            <xs:enumeration value="no_such_gateway"/>
            <xs:enumeration value="bad_gateway_type"/>
            <xs:enumeration value="no_signaling_gateway"/>
            <xs:enumeration value="no_trunk_gateway"/>
            <xs:enumeration value="no_such_opc"/>
            <xs:enumeration value="no_such_dpc"/>
            <xs:enumeration value="not_equal_dpc"/>
            <xs:enumeration value="bad_internal_iface_format"/>
            <xs:enumeration value="interface_already_exists"/>
            <xs:enumeration value="port_already_in_use"/>
            <xs:enumeration value="no_such_port"/>
            <xs:enumeration value="session_not_found"/>
            <xs:enumeration value="lock_not_found"/>
            <xs:enumeration value="already_blocked"/>
            <xs:enumeration value="bad_user_server_type"/>
            <xs:enumeration value="already_exists"/>
            <xs:enumeration value="cannot_get_data"/>
            <xs:enumeration value="no_such_user"/>
            <xs:enumeration value="connection_trouble"/>
            <xs:enumeration value="name_is_busy"/>
            <xs:enumeration value="context_not_found"/>
            <xs:enumeration value="alias_declaration_error"/>
            <xs:enumeration value="context_validation_error"/>
            <xs:enumeration value="invalid_user_name"/>
            <xs:enumeration value="invalid_alias_digits"/>
            <xs:enumeration value="invalid_address_format"/>
            <xs:enumeration value="invalid_routing_context"/>
            <xs:enumeration value="no_such_group"/>
            <xs:enumeration value="not_exists_agents"/>
            <xs:enumeration value="zone_used_in_resource"/>
            <xs:enumeration value="zone_not_found"/>
            <xs:enumeration value="site_used_in_resource"/>
            <xs:enumeration value="site_not_found"/>
            <xs:enumeration value="bad_node"/>
            <xs:enumeration value="undefined_properties"/>
            <xs:enumeration value="ivr_scripts_domain_limit"/>
            <xs:enumeration value="ivr_script_restricted_blocks"/>
            <xs:enumeration value="ivr_script_too_many_blocks"/>
            <xs:enumeration value="ivr_script_bad_first_block"/>
            <xs:enumeration value="ivr_script_bad_pass"/>
            <xs:enumeration value="already_defined"/>
            <xs:enumeration value="connection_failed"/>
            <xs:enumeration value="bad_id"/>
            <xs:enumeration value="src_bridge_not_exists"/>
            <xs:enumeration value="src_bridge_domain_not_exists"/>
            <xs:enumeration value="dst_bridge_already_exists"/>
            <xs:enumeration value="without_value"/>
            <xs:enumeration value="domain_limit"/>
            <xs:enumeration value="licence_limit"/>
            <!-- More reasons can be added here -->
        </xs:restriction>
    </xs:simpleType>
    <!-- End of error reasons description -->

</xs:schema>

XML

ss.xsd:

Информация об активированных в разговоре услугах.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:complexType name="SSTransfer">
        <xs:attribute name="activator" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="ru">
                    Участник, активировавший трансфер
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="participant" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="ru">
                    Этот участник изначально разговаривал с activator, и в конечном итоге стал разговаривать с target
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="target" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="ru">
                    Участник на которого был осуществлен трансфер
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="activate_time" type="xs:string" use="required"/>
    </xs:complexType>

</xs:schema>
XML