<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nx="http://schemas.nixxis.com/ApplicationServer" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="devices">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="device"  maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="key" use="required" type="xs:string">
              <xs:annotation>
                <xs:documentation>
                  Indicates the value to be searched for in user agent of the device.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="needSendRcvReinvite" use="required" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>
                  Indicates if send-receive must be forced when retrieving a call. 
                  Best is to set the value to false and test the device. 
                  When retrive does not work (no ACK on 200 OK, ending in disconnection), using true should solve the problem. 
                  Default to false.                  
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="noCustomHeaderAllowed" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>
                  Indicates if custom headers can be sent. Default to false.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="holderNoSendOnly" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>
                  Indicates if "sdp sendonly" must be requested to a call holder.
                  Default to false, meaning that "sdp sendonly" reinvite will be sent. 
                  Original goal was to avoid having an asterisk interpret the sendonly and replace it with music...
                  That is not a good solution because this can bring mixing rtp in some cases, option kept for backward compatibility...
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="sendonlyAddress" type="xs:string">
              <xs:annotation>
                <xs:documentation>
                  When rtp flow must be interrupted (for example when doing hold), the system uses sendonly or inactive in sdp. 
                  That is the default behavior. The problem is that some media gateways (asterisk for example) interpret sendonly or inactive as a request for hold music. 
                  To avoid that, this option can be used to specify an unreachable IP address to be used in the connection part of the sdp in place of using sendonly or inactive...
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="autoAnswerString" type="xs:string">
              <xs:annotation>
                <xs:documentation>
                  Defines the sip header to be used in order to make the phone automatically answer incoming calls. Default to null string, meaning no auto answer is allowed.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>

            <xs:attribute name="allowReferTransfer" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>
                  Indicates if transfers can be done using refers. Default to true.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="allowReinviteTransfer" type="xs:boolean">
              <xs:annotation>
                <xs:documentation>
                  Indicates if transfers can be done using re-invite. Default to true.
                </xs:documentation>
              </xs:annotation>
            </xs:attribute>
            <xs:attribute name="preferedTransferMethod">
              <xs:annotation>
                <xs:documentation>
                  Indicates what are the prefered method when executing a transfer. Defaults to the invite method.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="invite" />
                  <xs:enumeration value="refer" />
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="popupType" use="optional">
              <xs:annotation>
                <xs:documentation>
                  Indicates what kind of popup can be done by the device itself. 
                  The popup itself is done by using refer.
                </xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="none">
                    <xs:annotation>
                      <xs:documentation>
                        No popup can be done.
                      </xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="simple">
                    <xs:annotation>
                      <xs:documentation>
                        Simple popup can be done (basic text only)
                      </xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="web">
                    <xs:annotation>
                      <xs:documentation>
                        Real http popup can be done.
                      </xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
