Hc_get_extended_subscriber_card

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

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

POST

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

http://host:port/commands/get_extended_subscriber_card

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

  • 200 – в случае успеха.

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

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <!-- sipRegistrationType-->
    <xs:complexType name="sipRegistrationType">
        <xs:attribute name="access_point" type="xs:string" use="required"/>
        <xs:attribute name="reregister_date" type="xs:string" use="required"/>
        <xs:attribute name="ttl" type="xs:integer" use="required"/>
        <xs:attribute name="expires" type="xs:integer" use="required"/>
        <xs:attribute name="uri" type="xs:string" use="required"/>
        <xs:attribute name="first_via_host" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- sipRegistrationsType-->
    <xs:complexType name="sipRegistrationsType">
        <xs:sequence>
            <xs:element name="registration" type="sipRegistrationType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <!-- callType-->
    <xs:complexType name="callType">
        <xs:attribute name="from" type="xs:string" use="required"/>
        <xs:attribute name="to" type="xs:string" use="required"/>
        <xs:attribute name="duration" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- activeCallsType-->
    <xs:complexType name="activeCallsType">
        <xs:sequence>
            <xs:element name="call" type="callType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="regimeType">
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="private_in" type="xs:boolean" use="required"/>
        <xs:attribute name="private_out" type="xs:boolean" use="required"/>
        <xs:attribute name="local_in" type="xs:boolean" use="required"/>
        <xs:attribute name="local_out" type="xs:boolean" use="required"/>
        <xs:attribute name="zone_in" type="xs:boolean" use="required"/>
        <xs:attribute name="zone_out" type="xs:boolean" use="required"/>
        <xs:attribute name="intercity_in" type="xs:boolean" use="required"/>
        <xs:attribute name="intercity_out" type="xs:boolean" use="required"/>
        <xs:attribute name="international_in" type="xs:boolean" use="required"/>
        <xs:attribute name="international_out" type="xs:boolean" use="required"/>
        <xs:attribute name="emergency_in" type="xs:boolean" use="required"/>
        <xs:attribute name="emergency_out" type="xs:boolean" use="required"/>
    </xs:complexType>
    <!-- propertyType-->
    <xs:complexType name="propertyType">
        <xs:attribute name="key" type="xs:string" use="required"/>
        <xs:attribute name="value" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- ssType-->
    <xs:complexType name="ssType">
        <xs:sequence>
            <xs:element name="property" type="propertyType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="family" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation xml:lang="en">
                    Obsolete attribute. Use name instead of It.
                </xs:documentation>
                <xs:documentation xml:lang="ru">
                    Устаревший атрибует. Теперь ДВО полностью определяется по атрибуту name.
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- sssType-->
    <xs:complexType name="sssType">
        <xs:sequence>
            <xs:element name="ss" type="ssType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <!-- viaType-->
    <xs:complexType name="viaType">
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
    <!-- viaListType-->
    <xs:complexType name="viaListType">
        <xs:sequence>
            <xs:element name="via" type="viaType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>
    <!-- aliasType-->
    <xs:complexType name="aliasType">
        <xs:all>
            <xs:element name="regime" type="regimeType"/>
            <xs:element name="access_type" type="regimeType"/>
            <xs:element name="via_list" type="viaListType"/>
            <xs:element name="sss" type="sssType"/>
            <xs:element name="registrations" type="sipRegistrationsType"/>
            <xs:element name="active_calls" type="activeCallsType"/>
        </xs:all>
        <xs:attribute name="domain" type="xs:string" use="required"/>
        <xs:attribute name="iface" type="xs:string" use="required"/>
        <xs:attribute name="address" type="xs:string" use="required"/>
        <xs:attribute name="active" type="xs:boolean" use="required"/>
        <xs:attribute name="accessable_in" type="xs:boolean" use="required"/>
        <xs:attribute name="last_registration_time" type="xs:string" use="required"/>
        <xs:attribute name="accessibility_check_result" type="xs:string" use="required"/>
        <xs:attribute name="category" type="xs:string" use="required"/>
        <xs:attribute name="login" type="xs:string" use="required"/>
        <xs:attribute name="password" type="xs:string" use="required">
            <xs:annotation>
                <xs:documentation xml:lang="en">
                    In case of strong security restrictions password may be shown as ********
                </xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>
    <!-- in-->
    <xs:element name="in">
        <xs:complexType>
            <xs:all>
                <xs:element name="request">
                    <xs:complexType>
                        <xs:attribute name="address" type="xs:string" use="required"/>
                        <xs:attribute name="domain" type="xs:string" use="required"/>
                        <xs:attribute name="timerF" use="optional">
                            <xs:simpleType>
                                <xs:restriction base="xs:integer">
                                    <xs:minInclusive value="500"/>
                                    <xs:maxInclusive value="20000"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:attribute>
                        <xs:attribute name="sip_cluster" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">
                                    Obsolete attribute.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                        <xs:attribute name="core_cluster" type="xs:string" use="optional">
                            <xs:annotation>
                                <xs:documentation xml:lang="en">
                                    Obsolete attribute.
                                </xs:documentation>
                            </xs:annotation>
                        </xs:attribute>
                    </xs:complexType>
                </xs:element>
            </xs:all>
        </xs:complexType>
    </xs:element>
    <!-- out -->
    <xs:element name="out">
        <xs:complexType>
            <xs:all>
                <xs:element name="response">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="alias" type="aliasType" 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/get_extended_subscriber_card

<?xml version="1.0" encoding="UTF-8"?>
<in>
    <request address="240101" domain="biysk.local"/>
</in>
XML

Ответ: 200

<?xml version="1.0"?>
<out
    xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="get_extended_subscriber_card.xsd">
    <response>
        <alias domain="biysk.local" iface="064bc9652bfe3487" address="240101" active="true" accessable_in="true" category="ordinarySubscriber" login="240101" password="ext_101_SSW-3" last_registration_time="11.03.2021 09:30:42" accessibility_check_result="accessible: true, OPTIONS to <sip:240101@192.168.2.26>: 200 OK, cseq: 347119 OPTIONS. Request by node: sip1@ecss1">
            <regime name="" private_in="true" private_out="true" local_in="true" local_out="true" zone_in="true" zone_out="true" intercity_in="true" intercity_out="true" international_in="true" international_out="true" emergency_in="true" emergency_out="true"/>
            <access_type name="" private_in="true" private_out="true" local_in="true" local_out="true" zone_in="true" zone_out="true" intercity_in="true" intercity_out="true" international_in="true" international_out="true" emergency_in="true" emergency_out="true"/>
            <via_list>
                <via name="SIP/2.0/UDP 192.168.2.26:5060"/>
            </via_list>
            <sss>
                <ss name="cc_agent" family="CCAgent">
                    <property key="extra_number" value="[]"/>
                </ss>
                <ss name="chold" family="CHOLD">
                    <property key="disable_moh" value="false"/>
                    <property key="dtmf_sequence_as_flash" value="false"/>
                </ss>
                <ss name="clip" family="CLIP"/>
                <ss name="cnip" family="CNIP"/>
                <ss name="conference" family="Conference">
                    <property key="destroy_mode" value="by_no_master"/>
                    <property key="max_participants" value="16"/>
                </ss>
                <ss name="ctr" family="CTR"/>
                <ss name="meet_me_conference" family="meet_me_conference">
                    <property key="mode" value="master"/>
                    <property key="destroy_mode" value="by_no_more_calls"/>
                    <property key="room_number" value="[]"/>
                </ss>
                <ss name="teleconference" family="teleconference"/>
                <ss name="teleconference_manager" family="Teleconference">
                    <property key="second_line" value="[]"/>
                </ss>
            </sss>
            <registrations>
                <registration access_point="192.168.2.26:5060/UDP" reregister_date="11.03.2021 09:30:42" ttl="900" expires="546" uri="sip:240101@192.168.2.26:5060;transport=UDP;line=20457" first_via_host="192.168.2.26"/>
            </registrations>
            <active_calls/>
        </alias>
    </response>
</out>
XML