<?xml version="1.0" encoding="UTF-8"?>

<!-- ********************************************************************** -->
<!-- Copyright (c) 2004-2005 Broadsoft, Inc.  All rights reserved.          -->
<!-- ********************************************************************** -->
<!--       O C I   X M L   S C H E M A  :  D A T A   T Y P E S              -->
<!--                                                                        -->
<!-- This file defines the XML Schema for the BroadSoft Application Server  -->
<!-- Open Client Interface (OCI).                                           -->
<!-- ********************************************************************** -->

<xs:schema xmlns:xs             = "http://www.w3.org/2001/XMLSchema"
           xmlns:core           = "C"
           xmlns                = ""
           attributeFormDefault = "qualified"
           elementFormDefault   = "qualified">

  <!-- ******************************************************************** -->
  <!-- M E S S A G E   P A R A M E T E R S                                  -->
  <!-- ******************************************************************** -->
  <!--
  The non-primitive attributes are listed here in alphabetical order.
  -->

  <xs:simpleType name="AccessCode">
    <xs:annotation>
      <xs:documentation>Digit Collection Access Code.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AccessDevice">
    <xs:annotation>
      <xs:documentation>
        Uniquely identifies an Identity/device profile created anywhere in the system.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="deviceLevel" type="AccessDeviceLevel"/>
      <xs:element name="deviceName" type="AccessDeviceName"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="AccessDeviceConfigurationRelativeURL">
    <xs:annotation>
      <xs:documentation>
        The relative URL for web based configuration of the device, appended after the IP
        Address of the device to identify the URL address for the web based configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceDescription">
    <xs:annotation>
      <xs:documentation>
        Access device description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceEnhancedConfigurationFileName">
    <xs:annotation>
      <xs:documentation>
        Access device enhanced configuration file name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceEnhancedConfigurationMode">
    <xs:annotation>
      <xs:documentation>
        Choices for the access device configuration mode.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Default"/>
      <xs:enumeration value="Manual"/>
      <xs:enumeration value="Custom"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceEnhancedConfigurationType14">
    <xs:annotation>
      <xs:documentation>
        Type of enhanced configuration supported by an access device.
        "2 File Configuration" was formerly called "CPE Type 1"
        "3 File Configuration" was formerly called "CPE Type 2"
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="2 File Configuration"/>
      <xs:enumeration value="3 File Configuration"/>
      <xs:enumeration value="SNAP"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AccessDeviceEndpointAdd">
    <xs:annotation>
      <xs:documentation>
        Access device end point used in the context of add.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="accessDevice" type="AccessDevice"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AccessDeviceEndpointKey">
    <xs:annotation>
      <xs:documentation>
        Access device end point in the context of a delete command.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="accessDevice" type="AccessDevice"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="AccessDeviceEndpointLinePort">
    <xs:annotation>
      <xs:documentation>
        Also known as address of record, the Line/Port identifies a device endpoint
        in standalone mode  or a SIPURI public identity in IMS mode.
        Line/port user@host or just the port.
        Validation:
        - don't allow sip:
        - allow a leading +
        - allow the following characters:
          alphanumeric   -   _   .   !   ~   *   '   (   )   @
        - lineports for sip devices configured with Proxy Addressing must have a host portion
        - lineports for sip devices configured with Device Addressing must not have a host portion
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="161"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AccessDeviceEndpointModify">
    <xs:annotation>
      <xs:documentation>
        Access device end point used in the context of modify.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="accessDevice" type="AccessDevice"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AccessDeviceEndpointRead14">
    <xs:annotation>
      <xs:documentation>
        Access device end point.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="accessDevice" type="AccessDevice"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" minOccurs="0"/>
      <xs:element name="staticRegistrationCapable" type="xs:boolean"/>
      <xs:element name="useDomain" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="AccessDeviceLevel">
    <xs:annotation>
      <xs:documentation>
        Identifies at which level in the system an identity/device profile is created.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="System"/>
      <xs:enumeration value="Service Provider"/>
      <xs:enumeration value="Group"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceMACAddress">
    <xs:annotation>
      <xs:documentation>
        Access device MAC address.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="12"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceName">
    <xs:annotation>
      <xs:documentation>
        Access device name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceProtocol">
    <xs:annotation>
      <xs:documentation>
        Access device protocol.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDevicePhysicalLocation">
    <xs:annotation>
      <xs:documentation>
        Physical geographic location of the device, used in conjunction with the Physical Location user service.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="1024"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceSerialNumber">
    <xs:annotation>
      <xs:documentation>
        Access device serial number.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceStatus">
    <xs:annotation>
      <xs:documentation>
        Choices for the access device status.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Online"/>
      <xs:enumeration value="Offline"/>
      <xs:enumeration value="Unavailable"/>
      <xs:enumeration value="Unknown"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AccessDeviceType">
    <xs:annotation>
      <xs:documentation>
        Access device type.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="StreetAddress">
    <xs:annotation>
      <xs:documentation>Street address information.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="addressLine1" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="80"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="addressLine2" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="80"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="city" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="stateOrProvince" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>This is a unique key value returned when reading and specified when writing.</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="stateOrProvinceDisplayName" minOccurs="0">
        <xs:simpleType>
          <xs:annotation>
            <xs:documentation>The display name is returned when reading and ignored when writing.</xs:documentation>
          </xs:annotation>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="zipOrPostalCode" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="country" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="50"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="AddressLocation">
    <xs:annotation>
      <xs:documentation>Address Location.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="AlternateTrunkIdentity">
    <xs:annotation>
      <xs:documentation>
        Alternate Trunk Identity
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="AnnouncementSelection">
    <xs:annotation>
      <xs:documentation>
        Announcement Selection.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Default"/>
      <xs:enumeration value="Personal"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="AssignedGroupServicesEntry">
    <xs:annotation>
      <xs:documentation>
        Assigned Group Services List Entry.
        The isActive element is true, false, or could be missing completely.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceName" type="GroupService"/>
      <xs:element name="isActive" type="xs:boolean" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="AssignedUserServicesEntry">
    <xs:annotation>
      <xs:documentation>
        Assigned User Services List Entry.
        The isActive element is true, false, or could be missing completely.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceName" type="UserService"/>
      <xs:element name="isActive" type="xs:boolean" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="AudioFileCodec">
    <xs:annotation>
      <xs:documentation>
        Audio file codec.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="None"/>
      <xs:enumeration value="G711"/>
      <xs:enumeration value="G729"/>
      <xs:enumeration value="G726"/>
      <xs:enumeration value="AMR"/>
    </xs:restriction>
  </xs:simpleType>

   <xs:simpleType name="AuthenticationMode">
      <xs:annotation>
        <xs:documentation>
          Choices for SIP Device Authentication
        </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:enumeration value="Enabled"/>
        <xs:enumeration value="Disabled"/>
        <xs:enumeration value="Enabled With Web Portal Credentials"/>
      </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BurstingMaxActiveCalls">
    <xs:annotation>
      <xs:documentation>Bursting Maximum Number of Active Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="999999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BurstingMaxIncomingCalls">
    <xs:annotation>
      <xs:documentation>Bursting Maximum Number of Incoming Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="999999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="BurstingMaxOutgoingCalls">
    <xs:annotation>
      <xs:documentation>Bursting Maximum Number of Outgoing Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="999999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallingLineIdLastName">
    <xs:annotation>
      <xs:documentation>
        Last Name for Calling Line Id Display.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallingLineIdFirstName">
    <xs:annotation>
      <xs:documentation>
        First Name for Calling Line Id Display.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallingPlanDigitPatternName">
    <xs:annotation>
      <xs:documentation>
        Name of a calling plan digit pattern.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxCallTimeForAnsweredCallsMinutes16">
    <xs:annotation>
      <xs:documentation>
        Maximum Call Time for Answered Calls
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="3"/>
      <xs:maxInclusive value="2880"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxCallTimeForUnansweredCallsMinutes">
    <xs:annotation>
      <xs:documentation>
        Maximum Call Time for Unanswered Calls
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="60"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxConferenceParties">
    <xs:annotation>
      <xs:documentation>
        Maximum number of Parties allowed in a conference call.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="4"/>
      <xs:maxInclusive value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxConcurrentRedirectedCalls">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Concurrent Redirected Calls
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="32"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxFindMeFollowMeDepth">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Find Me Follow Me Depth
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxConcurrentFindMeFollowMeInvocations">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Concurrent Find Me/Follow Me Invocations
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="32"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxRedirectionDepth">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Redirections Depth
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxSimultaneousCalls">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Simultaneous Calls
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="500"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxForks">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Forks
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxRedirections">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Redirections
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallProcessingMaxSimultaneousForwards">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of Simultaneous Forwards
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="32"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallTypeDigitMap">
    <xs:annotation>
      <xs:documentation>Call Type Digit Map.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallCenterReportingServerName">
    <xs:annotation>
      <xs:documentation>Call Center Reporting Server Name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallCenterReportingServerDescription">
    <xs:annotation>
      <xs:documentation>Call Center Reporting Server Description.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

 <xs:simpleType name="CallLogId">
     <xs:annotation>
       <xs:documentation>Call Log Id</xs:documentation>
     </xs:annotation>
     <xs:restriction base="xs:token">
       <xs:minLength value="1"/>
       <xs:maxLength value="30"/>
     </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CallLogsEntryName">
     <xs:annotation>
       <xs:documentation>
         Calling Name.
       </xs:documentation>
     </xs:annotation>
     <xs:restriction base="xs:token">
       <xs:minLength value="1"/>
       <xs:maxLength value="62"/>
     </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CallLogsEntry">
    <xs:annotation>
      <xs:documentation>
        Call Log entry describing a placed, received, or missed call.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="countryCode" type="CountryCode" minOccurs="0"/>
      <xs:element name="callLogId" type="CallLogId"/>
      <xs:element name="phoneNumber" type="OutgoingDNorSIPURI"/>
      <xs:element name="name" type="CallLogsEntryName"/>
      <xs:element name="time" type="xs:dateTime"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="CallLogsType">
      <xs:annotation>
        <xs:documentation>
          Call Log type.
        </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:enumeration value="Placed"/>
        <xs:enumeration value="Received"/>
        <xs:enumeration value="Missed"/>
      </xs:restriction>
   </xs:simpleType>


  <xs:simpleType name="CLIDPolicy">
        <xs:annotation>
          <xs:documentation>
            Calling Line ID Policy Selections.
          </xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Use DN"/>
          <xs:enumeration value="Use Configurable CLID"/>          
        </xs:restriction>
    </xs:simpleType>
    
  <xs:simpleType name="CommunicationBarringAuthorizationCode">
    <xs:annotation>
      <xs:documentation>
        Communication Barring Authorization Code.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="2"/>
      <xs:maxLength value="14"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="CommunicationBarringAuthorizationCodeDescription">
    <xs:annotation>
      <xs:documentation>
        Communication Barring Authorization Code Description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="CommunicationBarringAuthorizationCodeEntry">
    <xs:annotation>
      <xs:documentation>
        Communication Barring Authorization Code entry.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="code" type="CommunicationBarringAuthorizationCode"/>
      <xs:element name="description" type="CommunicationBarringAuthorizationCodeDescription" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="CommunicationBarringProfileName">
    <xs:annotation>
      <xs:documentation>
        Communication Barring Profile Name
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="Contact">
    <xs:annotation>
      <xs:documentation>Contact information.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="contactName" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="30"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="contactNumber" nillable="true" minOccurs="0">
        <xs:simpleType>
          <xs:restriction base="xs:token">
            <xs:minLength value="1"/>
            <xs:maxLength value="30"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="contactEmail" type="EmailAddress" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="CountryCode">
    <xs:annotation>
      <xs:documentation>Country dialing code.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:maxLength value="3"/>
      <xs:pattern value="[0-9]|[1-9][0-9]{1,2}"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CountryName">
    <xs:annotation>
      <xs:documentation>The name of a country.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CPEDeviceFileFormat">
    <xs:annotation>
      <xs:documentation>CPE device file format.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="265"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CPEDeviceResetEventType">
    <xs:annotation>
      <xs:documentation>
        Type of reset event for a CPE device.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Resync"/>
      <xs:enumeration value="Check Sync"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CPEFileDirectory">
    <xs:annotation>
      <xs:documentation>
        CPE Configuration File Directory.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CPESystemFileName">
    <xs:annotation>
      <xs:documentation>
        CPE system file name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="265"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CriteriaActivation">
    <xs:annotation>
      <xs:documentation>
        Criteria active status indicator
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="criteriaName" type="CriteriaName"/>
      <xs:element name="isActive" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CriteriaFromDn">
    <xs:annotation>
      <xs:documentation>
        The from dn criteria used within an add/get request.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="fromDnCriteriaSelection" type="CriteriaFromDnSelection"/>
      <xs:element name="includeAnonymousCallers" type="xs:boolean"/>
      <xs:element name="includeUnavailableCallers" type="xs:boolean"/>
      <xs:element name="phoneNumber" type="DN" minOccurs="0" maxOccurs="12"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CriteriaFromDnModify">
    <xs:annotation>
      <xs:documentation>
        The from dn criteria used within a modify request.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="fromDnCriteriaSelection" type="CriteriaFromDnSelection" minOccurs="0"/>
      <xs:element name="includeAnonymousCallers" type="xs:boolean" minOccurs="0"/>
      <xs:element name="includeUnavailableCallers" type="xs:boolean" minOccurs="0"/>
      <xs:element name="phoneNumberList" type="CriteriaReplacementDNList" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="CriteriaFromDnSelection">
    <xs:annotation>
      <xs:documentation>
        Selection criteria for a from dn.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Any"/>
      <xs:enumeration value="Specified Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="CriteriaName">
    <xs:annotation>
      <xs:documentation>Criteria Name</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CriteriaReplacementDNList">
    <xs:annotation>
      <xs:documentation>
        A list of criteria DNs that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="phoneNumber" type="DN" minOccurs="1" maxOccurs="12"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="CustomContactDirectoryName">
    <xs:annotation>
      <xs:documentation>
        Custom Contact Directory name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DayOfMonth">
    <xs:annotation>
      <xs:documentation>
        The day of month.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="31"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DayOfWeek">
    <xs:annotation>
      <xs:documentation>
        Days of the week (Sunday-Saturday).
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="Sunday"/>
      <xs:enumeration value="Monday"/>
      <xs:enumeration value="Tuesday"/>
      <xs:enumeration value="Wednesday"/>
      <xs:enumeration value="Thursday"/>
      <xs:enumeration value="Friday"/>
      <xs:enumeration value="Saturday"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DepartmentKey" abstract="true">
    <xs:annotation>
      <xs:documentation>
        Uniquely identifies a department system-wide.
        Departments are contained in either an enterprise or a group. Enterprise departments can be
        used by any or all groups within the enterprise. Department names are unique within a group and
        within an enterprise, but the same department name can exist in 2 different groups or in both
        a group and its parent enterprise. Therefore, to uniquely identify a department, we must know
        the department name and which enterprise or group contains the department.
        This type is extended by group and enterprise department keys.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DepartmentFullPathName">
    <xs:annotation>
      <xs:documentation>
        Department Full Path name. This the full path name of the department.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DepartmentName">
    <xs:annotation>
      <xs:documentation>
        Department name. This is only the name of the department itself, not the full path name
        of the department and all its parents.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DialPlanAccessCode">
    <xs:annotation>
      <xs:documentation>
        Dial Plan Access Code.
        The Access Code may contain digits 0-9, *, and #.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DialPlanAccessCodeDescription">
    <xs:annotation>
      <xs:documentation>
        Dial Plan Access Code Description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DigitAny">
    <xs:annotation>
      <xs:documentation>
        A single dialing digit. Valid values are 0-9,*,#.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="1"/>
      <xs:pattern value="[0-9]|\*|#"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementTagSetName">
    <xs:annotation>
      <xs:documentation>
        A static tag set name for access device files managed by the Device Management System on BroadWorks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DigitalSignatureAlgorithm">
    <xs:annotation>
      <xs:documentation>
        Possible algorithms for digital signatures supported by the provisioning server.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="MD5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DigitMap">
    <xs:annotation>
      <xs:documentation>Digit Collection Digit Map.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="2048"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DigitStarPound">
    <xs:annotation>
      <xs:documentation>
        A single dialing digit with valid values * and # only.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="1"/>
      <xs:pattern value="\*|#"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DN">
    <xs:annotation>
      <xs:documentation>
        Directory Number in E164 Format.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="23"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DNRange">
    <xs:annotation>
      <xs:documentation>
        Directory number range. The minimum and maximum values are inclusive.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="minPhoneNumber" type="DN"/>
      <xs:element name="maxPhoneNumber" type="DN"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DomainName">
    <xs:annotation>
      <xs:documentation>Network domain name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DtmfDigit">
    <xs:annotation>
      <xs:documentation>
        A single DTM dialing digit. Valid values are 0-9,*,#, A-D.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:length value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <!--
  maxLenth for DualModeVCCSubscriberPassword is changed from 8 to 20 as part of the fix for EV56618
  -->

  <xs:simpleType name="DualModeVCCSubscriberPassword">
    <xs:annotation>
      <xs:documentation>
        Dual Mode VCC subscriber password
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EmailAddress">
    <xs:annotation>
      <xs:documentation>Email Address</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Encoding">
    <xs:annotation>
      <xs:documentation>Character-encoding scheme.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EndpointType">
    <xs:annotation>
      <xs:documentation>
        Types of Endpoints in Broadworks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Primary"/>
      <xs:enumeration value="Shared Call Appearance"/>
      <xs:enumeration value="Video Add On"/>
      <xs:enumeration value="Public Service Identity"/>
      <xs:enumeration value="Music On Hold Internal"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseAdminNetworkPolicyAccess">
    <xs:annotation>
      <xs:documentation>
        This data type is applicable only for an Enterprise administrator.
        It specifies the Enterprise Administrator's policy for accessing network policies (e.g. - VoiceVPN).
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EnterpriseDepartmentKey">
    <xs:annotation>
      <xs:documentation>
        Uniquely identifies a department defined within an enterprise.
        To uniquely identify an enterprise department, we must know the department name and which
        enterprise contains the department.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DepartmentKey">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="name" type="DepartmentName"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="EnterpriseTrunkName">
    <xs:annotation>
      <xs:documentation>
        Enterprise Trunk name.
        Uniquely identifies an Enterprise Trunk in an enterprise or group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="EnterpriseVoiceVPNPolicySelection">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Location Selection.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Private"/>
      <xs:enumeration value="Public"/>
      <xs:enumeration value="Route"/>
      <xs:enumeration value="Treatment"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ExtendedFileResource">
      <xs:annotation>
        <xs:documentation>
          Represents either an existing file for the application server to use, or
          the contents of a file to transfer and an URL.
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="file" type="LabeledFileResource" minOccurs="0"/>
        <xs:element name="url" type="URL" nillable="true" minOccurs="0"/>
      </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ExtendedFileResourceSelection">
    <xs:annotation>
      <xs:documentation>
        Choices for extended file resource usage.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="File"/>
      <xs:enumeration value="URL"/>
      <xs:enumeration value="Default"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="ExtendedMediaFileResource">
      <xs:annotation>
        <xs:documentation>
          Represents either an existing file for the application server to use, or
          the contents of a file to transfer and an URL.
        </xs:documentation>
      </xs:annotation>
      <xs:sequence>
        <xs:element name="file" type="LabeledMediaFileResource" minOccurs="0"/>
        <xs:element name="url" type="URL" nillable="true" minOccurs="0"/>
      </xs:sequence>
  </xs:complexType>  

  <xs:simpleType name="Extension">
    <xs:annotation>
      <xs:documentation>
        Extension.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="2"/>
      <xs:maxLength value="6"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ExtensionRange">
    <xs:annotation>
      <xs:documentation>
        Extension range. The minimum and maximum values are inclusive.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="minExtension" type="Extension"/>
      <xs:element name="maxExtension" type="Extension"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="FeatureAccessCode">
    <xs:annotation>
      <xs:documentation>Feature Access Code</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="FeatureAccessCodeEntry">
    <xs:annotation>
      <xs:documentation>Feature Access Code Entry</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="featureAccessCodeName" type="FeatureAccessCodeName"/>
      <xs:element name="mainCode" type="FeatureAccessCode" minOccurs="0"/>
      <xs:element name="alternateCode" type="FeatureAccessCode" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="FeatureAccessCodeName">
    <xs:annotation>
      <xs:documentation>Feature Access Code Name</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileDescription">
    <xs:annotation>
      <xs:documentation>
        Description of a file resource.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileName">
    <xs:annotation>
      <xs:documentation>Name of a file on the filesystem.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileRepositoryName">
    <xs:annotation>
      <xs:documentation>
        File repository name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="FileResource">
    <xs:annotation>
      <xs:documentation>
        Represents either an existing file for the application server to use, or
        the contents of a file to transfer.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:choice>
        <xs:element name="sourceFileName" type="FileName"/>
        <xs:element name="fileContent" type="xs:base64Binary"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="FirstName">
    <xs:annotation>
      <xs:documentation>
        First Name is the first name of a user or an administrator.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FTPRemoteDirectory">
    <xs:annotation>
      <xs:documentation>
        FTP remote directory.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="255"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FTPUserId">
    <xs:annotation>
      <xs:documentation>
        A user id for an FTP server.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FTPUserPassword">
    <xs:annotation>
      <xs:documentation>
        A password for an FTP server.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupCallingPlanAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for accessing group level and user level calling plan configuration.
        "Full" provides full control over the configuration of group-level and user-level calling plans.
        "Restricted" indicates
        1) not to provide access to group-level calling plan configuration,
        2) to provide access to only collect calls for user level incoming calling plan,
        3) to provide access to only international, operator assisted, 700/900, 976, and casual calls for user level outgoing calling plan.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Restricted"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupCLIDPolicy">
      <xs:annotation>
        <xs:documentation>
          Calling Line ID Policy Selections.
        </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:enumeration value="Use DN"/>
        <xs:enumeration value="Use Configurable CLID"/>
        <xs:enumeration value="Use Group CLID"/>
      </xs:restriction>
    </xs:simpleType>



  <xs:simpleType name="GroupExtensionAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for accessing extension dialing configuration (i.e. - length of extensions).
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupLDAPIntegrationAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for accessing LDAP Integration configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupPasscodeRulesLevel">
    <xs:annotation>
      <xs:documentation>
        Choices for the group passcode rule to decide which type of rules to use.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="System"/>
      <xs:enumeration value="Service Provider"/>
      <xs:enumeration value="Group"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupVoiceMessagingAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for user access to his voice messaging configuration.
        "Full" indicates full control over the voice messaging configuration.
        "Restricted" indicates that the choice to either use unified messaging option (whereby the user can configure a mail server on which messages are stored)
        or to forward the voice message to a designated email address is not available.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Restricted"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupDepartmentAdminTrunkGroupAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for department administrator's access to trunk group configuration.
        "Full" indicates full access to trunk groups in the department.
        "None" indicates no access to trunk groups in the department.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupDepartmentAdminUserAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for department administrator's access to user configuration.
        "Full" indicates full access to users in the department.
        "Read-Only Profile" indicates
          1) the department administrator is restricted from adding or removing users, and
          2) read-only access is granted to the user's profile.
        "No Profile" indicates
          1) the department administrator is restricted from adding or removing users, and
          2) no access is granted to the user's profile.
        "None" indicates no access to users in the department.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only Profile"/>
      <xs:enumeration value="No Profile"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminProfileAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to the group profile.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminTrunkGroupAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to trunk groups.
        "Full" indicates full access to add/modify/delete trunk groups in the group.
        "Full Resources" indicates
          1) Restricted from adding or removing trunk groups, and
          2) Full access to trunk group resources
        "Read-Only Resources" indicates
          1) Restricted from adding or removing trunk groups, and
          2) Read-only access to trunk group resources
        "None" indicates no access to trunk groups in the group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Full Resources"/>
      <xs:enumeration value="Read-Only Resources"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminUserAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to user configuration.
        "Full" indicates full access to users in the group.
        "Full Profile" indicates
          1) the group administrator is restricted from adding or removing users, but
          2) has full access to the user's profile
        "Read-Only Profile" indicates
          1) the group administrator is restricted from adding or removing users, and
          2) read-only access is granted to the user's profile.
        "No Profile" indicates
          1) the group administrator is restricted from adding or removing users, and
          2) no access is granted to the user's profile.
        "None" indicates no access to users in the group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Full Profile"/>
      <xs:enumeration value="Read-Only Profile"/>
      <xs:enumeration value="No Profile"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminAdminAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to group administrators and department administrators.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminDepartmentAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to departments.
        "Full" indicates full access to departments.
        "Read-Only" indicates read-only access to the department list
        "None" indicates no access to the department list
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminAccessDeviceAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to access devices.
       "Full" indicates full access to access devices.
       "Associate User With Device" indicates
         1) read-only access to devices, but
         2) the group administrator may associate users with devices
       "Read-Only" indicates read-only access to devices and user-device associations
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Associate User With Device"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminEnhancedServiceInstanceAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to enhanced service instances (e.g. - instances of Auto Attendants, Call Capacity Groups,
        Conference Bridges, Hunt Groups, Call Centers, Series Completion Groups, etc.).
        "Full" indicates full access to enhanced service instances.
        "Modify-Only" indicates
          1) the group administrator is restricted from adding or removing enhanced service instances, but
          2) may modify existing instances.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Modify-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminServiceAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to assigning services to groups and users.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminFeatureAccessCodeAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to feature access codes.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupAdminPhoneNumberExtensionAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a group administrator's access to assigning phone numbers and extensions.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="GroupDepartmentKey">
    <xs:annotation>
      <xs:documentation>
        Uniquely identifies a department defined within a group.
        To uniquely identify a group department, we must know the department name and which
        group contains the department.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="DepartmentKey">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="groupId" type="GroupId"/>
          <xs:element name="name" type="DepartmentName"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="GroupId">
    <xs:annotation>
      <xs:documentation>
        Group Id identifies a group within a service provider or enterprise. The group id is not
        unique system wide. It must be combined with a service provider id to be unique across the system.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupName">
    <xs:annotation>
      <xs:documentation>Group display name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupCallingLineIdName">
    <xs:annotation>
      <xs:documentation>Group calling line ID name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>



  <xs:simpleType name="GroupService">
    <xs:annotation>
      <xs:documentation>
        Group level services.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Account/Authorization Codes"/>
      <xs:enumeration value="Auto Attendant"/>
      <xs:enumeration value="Auto Attendant - Video"/>
      <xs:enumeration value="Call Capacity Management"/>
      <xs:enumeration value="Call Park"/>
      <xs:enumeration value="Call Pickup"/>
      <xs:enumeration value="City-Wide Centrex"/>
      <xs:enumeration value="Custom Ringback Group"/>
      <xs:enumeration value="Custom Ringback Group - Video"/>
      <xs:enumeration value="Emergency Zones"/>
      <xs:enumeration value="Enhanced Outgoing Calling Plan"/>
      <xs:enumeration value="Hunt Group"/>
      <xs:enumeration value="Incoming Calling Plan"/>
      <xs:enumeration value="Instant Conferencing"/>
      <xs:enumeration value="Instant Group Call"/>
      <xs:enumeration value="Intercept Group"/>
      <xs:enumeration value="Inventory Report"/>
      <xs:enumeration value="LDAP Integration"/>
      <xs:enumeration value="Music On Hold"/>
      <xs:enumeration value="Music On Hold - Video"/>
      <xs:enumeration value="Outgoing Calling Plan"/>
      <xs:enumeration value="Preferred Carrier Group"/>
      <xs:enumeration value="Series Completion"/>
      <xs:enumeration value="Service Scripts Group"/>
      <xs:enumeration value="Trunk Group"/>
      <xs:enumeration value="Voice Messaging Group"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="GroupServiceAuthorization">
    <xs:annotation>
      <xs:documentation>
        Authorize (with quantity) or unauthorize a group service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceName" type="GroupService"/>
      <xs:choice>
        <xs:element name="authorizedQuantity" type="UnboundedPositiveInt"/>
        <xs:element name="unauthorized" type="xs:boolean" fixed="true"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="GroupUserAuthenticationAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for a user's access to their Authentication service configuration.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupUserGroupDirectoryAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for a user's access to the group or enterprise directory.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupUserCallLogAccess">
      <xs:annotation>
        <xs:documentation>
          Policy for user to delete call logs
        </xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:enumeration value="Full"/>
        <xs:enumeration value="Read-Only"/>
      </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="GroupUserProfileAccess">
    <xs:annotation>
      <xs:documentation>
        Group's policy for a user's access to his profile.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HiraganaLastName">
    <xs:annotation>
      <xs:documentation>
        Hiragana Last Name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HiraganaFirstName">
    <xs:annotation>
      <xs:documentation>
        Hiragana First Name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>
  
<xs:complexType name="Holiday">
    <xs:annotation>
      <xs:documentation>
        Holiday entry.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="holidayName" type="HolidayName"/>
      <xs:element name="startDate" type="xs:date"/>
      <xs:element name="endDate" type="xs:date" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="HolidayName">
    <xs:annotation>
      <xs:documentation>
        Holiday name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="HolidayScheduleName">
    <xs:annotation>
      <xs:documentation>
        Holiday name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="HolidayScheduleType">
    <xs:annotation>
      <xs:documentation>
        Holiday schedule type.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="User"/>
      <xs:enumeration value="Group"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="HolidaySchedule">
    <xs:annotation>
      <xs:documentation>
        Holiday Schedule.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="type" type="HolidayScheduleType"/>
      <xs:element name="name" type="HolidayScheduleName"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="Hour">
    <xs:annotation>
      <xs:documentation>
        Hour.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="23"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HotelingAssociationLimitHours">
    <xs:annotation>
      <xs:documentation>
        Maximum time limit for hoteling guests association to hoteling hosts
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="HuntAgentWeight">
    <xs:annotation>
      <xs:documentation>
        The weighted call distribution weight for an agent.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="agentUserId" type="UserId"/>
      <xs:element name="weight" type="HuntWeight"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="HuntForwardTimeoutSeconds">
    <xs:annotation>
      <xs:documentation>
        Time to wait for any agent to answer before forwarding the caller elsewhere.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="7200"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HuntNoAnswerRings">
    <xs:annotation>
      <xs:documentation>
        Number of rings to wait for the currently hunted agent to answer before
        hunting to the next available agent.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="20"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HuntPolicy">
    <xs:annotation>
      <xs:documentation>
        Policy for distributing calls within a hunt group or call center.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Circular"/>
      <xs:enumeration value="Regular"/>
      <xs:enumeration value="Simultaneous"/>
      <xs:enumeration value="Uniform"/>
      <xs:enumeration value="Weighted"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="HuntWeight">
    <xs:annotation>
      <xs:documentation>
        Call distribution weight for an agent.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="100"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IMSUserState">
    <xs:annotation>
      <xs:documentation>
        IMS User State per the 3GPP TS 29.328 V6.3.0 spec.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Not Registered"/>
      <xs:enumeration value="Registered"/>
      <xs:enumeration value="Registered UnReg Services"/>
      <xs:enumeration value="Authentication Pending"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="IPAddress">
    <xs:annotation>
      <xs:documentation>
        Numeric IP Address.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="IPAddressRange">
    <xs:annotation>
      <xs:documentation>
        IP Address Range.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="minIpAddress" type="IPAddress"/>
      <xs:element name="maxIpAddress" type="IPAddress"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="InformationalDN">
    <xs:annotation>
      <xs:documentation>
        A no validation DN field.  To be phased out, not for new
        attributes.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="LabeledFileResource">
    <xs:annotation>
      <xs:documentation>
        Represents either an existing file for the application server to use, or
        the contents of a file to transfer with a description.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="description" type="FileDescription"/>
      <xs:choice>
        <xs:element name="sourceFileName" type="FileName"/>
        <xs:element name="content" type="xs:base64Binary"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="LabeledMediaFileResource">
    <xs:annotation>
      <xs:documentation>
        Represents either an existing file for the application server to use, or
        the contents of a file to transfer with a description.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="description" type="FileDescription"/>
      <xs:element name="mediaType" type="MediaFileType"/>
      <xs:choice>
        <xs:element name="sourceFileName" type="FileName"/>
        <xs:element name="content" type="xs:base64Binary"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>  

  <xs:simpleType name="Language">
    <xs:annotation>
      <xs:documentation>
        Language identifies the language of a user or an administrator.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LastName">
    <xs:annotation>
      <xs:documentation>
        Last Name is the last name of a user or an administrator.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LocationDialingCode">
    <xs:annotation>
      <xs:documentation>
        Group location dialing code for groups that are part of a enterprise.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LoginToken">
    <xs:annotation>
      <xs:documentation>
        Login Token.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="LoginType">
    <xs:annotation>
      <xs:documentation>
        The login type of the admin/user.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="System"/>
      <xs:enumeration value="Provisioning"/>
      <xs:enumeration value="Service Provider"/>
      <xs:enumeration value="Group"/>
      <xs:enumeration value="Group Department"/>
      <xs:enumeration value="User"/>
      <xs:enumeration value="Lawful Intercept"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MaxActiveCalls">
    <xs:annotation>
      <xs:documentation>Maximum Number of Active Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MaxFailedLoginAttempts">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to specify the maximum allowed failed login attempts.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MaxIncomingCalls">
    <xs:annotation>
      <xs:documentation>Maximum Number of Incoming Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="999999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MaximumMonitoredUsers">
    <xs:annotation>
      <xs:documentation>
        Maximum number of users allowed in a monitored user list.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="1000"/>
    </xs:restriction>
  </xs:simpleType>

<xs:simpleType name="MaxNoAnswerNumberOfRings">
    <xs:annotation>
      <xs:documentation>
        Maximum Number of No Answer Rings.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="6"/>
      <xs:maxInclusive value="20"/>
    </xs:restriction>
  </xs:simpleType>  


  <xs:simpleType name="MaxOutgoingCalls">
    <xs:annotation>
      <xs:documentation>Maximum Number of Outgoing Calls</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="999999"/>
    </xs:restriction>
  </xs:simpleType>



  <xs:simpleType name="MediaPolicySelection">
    <xs:annotation>
      <xs:documentation>
        Media Policy Selections.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Use Uncompressed Codec"/>
      <xs:enumeration value="Use Supported Media Set"/>
      <xs:enumeration value="No Restrictions"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MediaSetName">
    <xs:annotation>
      <xs:documentation>
        Media Set name
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="MediaFileType">
    <xs:annotation>
      <xs:documentation>
        The media type of media data.
        WMA - Windows Media Audio file
        WAV - A WAV file
        3GP - A 3GP file
        MOV - A MOV file using a H.263 or H.264 codec.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="WMA"/>
      <xs:enumeration value="WAV"/>
      <xs:enumeration value="3GP"/>
      <xs:enumeration value="MOV"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="Minute">
    <xs:annotation>
      <xs:documentation>
        Minute.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="59"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="MixedCallLogsEntry">
    <xs:annotation>
      <xs:documentation>
        Call Log entry describing a placed, received, or missed call.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="callLogType" type="CallLogsType"/>
      <xs:element name="countryCode" type="CountryCode" minOccurs="0"/>
      <xs:element name="callLogId" type="CallLogId"/>
      <xs:element name="phoneNumber" type="OutgoingDNorSIPURI"/>
      <xs:element name="name" type="CallLogsEntryName"/>
      <xs:element name="time" type="xs:dateTime"/>
    </xs:sequence>
  </xs:complexType>

  <!--
  maxLenth for MobilityManagerProvisioningUserName is changed from 16 to 15 as part of the fix for EV56618
  -->
  <xs:simpleType name="MobilityManagerProvisioningUserName">
    <xs:annotation>
      <xs:documentation>
        Mobility Manager provisioning user name
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <!--
  maxLenth for MobilityManagerProvisioningPassword is changed from 8 to 15 as part of the fix for EV56618
  -->

  <xs:simpleType name="MobilityManagerProvisioningPassword">
    <xs:annotation>
      <xs:documentation>
        Mobility Manager provisioning password
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="MobilityManagerServiceKey">
    <xs:annotation>
      <xs:documentation>
        Mobility Manager service key
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="999"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NationalPrefix">
    <xs:annotation>
      <xs:documentation>The national prefix dialing digits.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="2"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="NetAddress">
    <xs:annotation>
      <xs:documentation>IP Address, hostname, or domain.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="NetworkClassOfServiceCommunicationBarringProfile">
    <xs:annotation>
      <xs:documentation>
        Communication Barring Profile defined as part of the Network Class
        Of Service. There can be only one primary profile within a Network
        Class Of Service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="CommunicationBarringProfileName"/>
      <xs:element name="isPrimary" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="NetworkClassOfServiceDescription">
    <xs:annotation>
      <xs:documentation>
        Network Class of Service description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="NetworkClassOfServiceName">
    <xs:annotation>
      <xs:documentation>
        Network Class of Service name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="NetworkUsageSelection">
    <xs:annotation>
      <xs:documentation>
        Network Usage types.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Force All Calls"/>
      <xs:enumeration value="Force All Except Extension and Location Calls"/>
      <xs:enumeration value="Do Not Force Enterprise and Group Calls"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="NoChargeTreatmentHandling">
    <xs:annotation>
      <xs:documentation>
        No charge treatments are handled by answering the call (via a 200 OK message)
        or with early media (via a 18x message)
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Answer"/>
      <xs:enumeration value="Early Media"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="OCICallControlApplicationId">
    <xs:annotation>
      <xs:documentation>
        A OCI Call Control Application Id.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>    

  <xs:simpleType name="OCILocale">
    <xs:annotation>
      <xs:documentation>
        (ISO Language Code)_(ISO Country Code) or (ISO Language Code) only.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:maxLength value="5"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OCIReportingConnectionPingIntervalSeconds">
    <xs:annotation>
      <xs:documentation>
        Connection ping interval in seconds
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="86400"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OrganizationType">
    <xs:annotation>
      <xs:documentation>
        Types of organizations.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Service Provider"/>
      <xs:enumeration value="Enterprise"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OutgoingDN">
    <xs:annotation>
      <xs:documentation>
        An outgoing phone number or a number meant to be dialed. It is longer
        than a DN so that equal access digits or access code digits may be
        be included.  It cannot be a SIP URL.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OverloadControlsMinTimeInZoneMilliseconds">
    <xs:annotation>
      <xs:documentation>
        Overload Controls minimum time in zone milliseconds.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1000"/>
      <xs:maxInclusive value="600000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OverloadControlsNumberOfSamples">
    <xs:annotation>
      <xs:documentation>
        Overload Controls number of samples.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="10"/>
      <xs:maxInclusive value="50000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OverloadControlsZoneEntryDelayMilliseconds">
    <xs:annotation>
      <xs:documentation>
        Overload Controls zone entry delay in milliseconds.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="500"/>
      <xs:maxInclusive value="60000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OverloadControlsZoneExitDelayMilliseconds">
    <xs:annotation>
      <xs:documentation>
        Overload Controls zone exit delay in milliseconds.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="500"/>
      <xs:maxInclusive value="60000"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Passcode">
    <xs:annotation>
      <xs:documentation>
        Portal passcode
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasscodeExpiresDays">
    <xs:annotation>
      <xs:documentation>
        Portal passcode expiration days.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="15"/>
      <xs:maxInclusive value="180"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasscodeMaxLength">
    <xs:annotation>
      <xs:documentation>
        Maximum length of portal passcode.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="3"/>
      <xs:maxInclusive value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasscodeMinLength">
    <xs:annotation>
      <xs:documentation>
        Minimum length of portal passcode.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="2"/>
      <xs:maxInclusive value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Password">
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="60"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordExpiresDays">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to specify when passwords expire.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="199"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordHistoryCount">
    <xs:annotation>
      <xs:documentation>
        Number of previous passwords to keep.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordMinDigits">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to require at least this many numeric digits in passwords.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordMinLength">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to require at least this total characters in passwords.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="3"/>
      <xs:maxInclusive value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordMinLowerCaseLetters">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to require at least this many lowercase letters in passwords.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordMinNonAlphanumericCharacters">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to require at least this many non-alphanumeric characters in passwords.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PasswordMinUpperCaseLetters">
    <xs:annotation>
      <xs:documentation>
        Password Rules can be used to require at least this many uppercase letters in passwords.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PhoneListEntry">
    <xs:annotation>
      <xs:documentation>Phone list entry.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="entryName" type="PhoneListEntryName"/>
      <xs:element name="phoneNumber" type="OutgoingDN"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="PhoneListEntryName">
    <xs:annotation>
      <xs:documentation>
        The name in a phone list entry.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="OutgoingDNorSIPURI">
    <xs:annotation>
      <xs:documentation>
        Phone Number or SIP URI that can be used to dial.
        URI Validation:
        - must be of the format string@string where string is at least one valid character and there is one and only one @.
        - don't allow sip:
        - allow the following characters in the user portions:
          alphanumeric   -   _   .   !   ~   *   '   (   )
        - allow the following characters in the host portion:
          alphanumeric   -   .
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="161"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PolicyAccess">
    <xs:annotation>
      <xs:documentation>
        Possible values for administrative access policy settings.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Restricted-FullProfile"/>
      <xs:enumeration value="Restricted"/>
      <xs:enumeration value="Restricted-NoAuthorize"/>
      <xs:enumeration value="Restricted-NoUserAssociation"/>
      <xs:enumeration value="Restricted-ReadProfile"/>
      <xs:enumeration value="Restricted-NoProfile"/>
      <xs:enumeration value="Restricted-NoGroup"/>
      <xs:enumeration value="Restricted-FullResource"/>
      <xs:enumeration value="Restricted-ReadResource"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Port">
    <xs:annotation>
      <xs:documentation>
        TCP/IP Port.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="65535"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Port1025">
    <xs:annotation>
      <xs:documentation>
        TCP/IP Port number above the well-known range.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1025"/>
      <xs:maxInclusive value="65535"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Port1026">
    <xs:annotation>
      <xs:documentation>
        TCP/IP Port.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1026"/>
      <xs:maxInclusive value="65534"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Port1027">
    <xs:annotation>
      <xs:documentation>
        TCP/IP Port.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1027"/>
      <xs:maxInclusive value="65535"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="PortalMaxFailedLoginAttempts">
    <xs:annotation>
      <xs:documentation>
        Maximum allowed portal failed login attempts.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="2"/>
      <xs:maxInclusive value="10"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PublicUserIdentity">
    <xs:annotation>
      <xs:documentation>
        Public User Identity
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="sipURI" type="SIPURI"/>
      <xs:element name="telURI" type="DN"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="RandomPort">
    <xs:annotation>
      <xs:documentation>
        Represents either a random port number, or a specific port number.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="random" type="xs:token" fixed="Random"/>
      <xs:element name="port" type="Port"/>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="ReplacementOutgoingDNList">
    <xs:annotation>
      <xs:documentation>
        A list of outgoing dns that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="phoneNumber" type="OutgoingDN" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReplacementOutgoingDNorSIPURIList">
    <xs:annotation>
      <xs:documentation>
        A list of phone numbers or sipuris that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="phoneNumber" type="OutgoingDNorSIPURI" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReplacementServicePackNameList">
    <xs:annotation>
      <xs:documentation>
        A list of service packs that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="servicePackName" type="ServicePackName" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReplacementSIPAliasList">
    <xs:annotation>
      <xs:documentation>
        A list of SIP aliases that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="sipAlias" type="SIPURI" minOccurs="1" maxOccurs="3"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReplacementUserIdList">
    <xs:annotation>
      <xs:documentation>
        A list of userIds that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="userId" type="UserId" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ReplacementUserServiceList">
    <xs:annotation>
      <xs:documentation>
        A list of user services that replaces a previously configured list.
        By convention, an element of this type may be set nill to clear the list.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceName" type="UserService" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="ResponsePageSize">
    <xs:annotation>
      <xs:documentation>
        Maximum number of rows to return in response to a paging request for data
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="100"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="ResponsePagingControl">
    <xs:annotation>
      <xs:documentation>
        Used in queries to restrict the set of result rows when making a request that can result in
        a large dataset. The client specifies the starting row and the number of rows requested. 
        The server only provides those rows in results, if available.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="responseStartIndex" type="ResponseStartIndex"/>
      <xs:element name="responsePageSize" type="ResponsePageSize"/>
    </xs:sequence>
  </xs:complexType>  
  
  <xs:simpleType name="ResponseStartIndex">
    <xs:annotation>
      <xs:documentation>
        The starting row number to return in a response.
        The first row is numbered starting at 1, not 0.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="RoutingProfile">
    <xs:annotation>
      <xs:documentation>
        Routing Profile.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="4" />
      <xs:maxLength value="12" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="ServiceActivation">
    <xs:annotation>
      <xs:documentation>
        Service Instance active status indicator
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceUserId" type="UserId"/>
      <xs:element name="isActive" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ServiceInstanceName">
    <xs:annotation>
      <xs:documentation>
        Service Instance Name for a service without a user id.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceInstanceProfileName">
    <xs:annotation>
      <xs:documentation>
        Service Instance Name for a service with a user id.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="ServiceInstanceAddProfile">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for group service.
        Prior to release 14 this was called ServiceInstanceProfile.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="ServiceInstanceProfileName"/>
      <xs:element name="callingLineIdLastName" type="CallingLineIdLastName"/>
      <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName"/>
      <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
      <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
      <xs:element name="phoneNumber" type="DN" minOccurs="0"/>
      <xs:element name="extension" type="Extension" minOccurs="0"/>
      <xs:element name="password" type="Password" minOccurs="0"/>
      <xs:element name="department" type="DepartmentKey" minOccurs="0"/>
      <xs:element name="language" type="Language" minOccurs="0"/>
      <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
      <xs:element name="alias" type="SIPURI" minOccurs="0" maxOccurs="3"/>
      <xs:element name="publicUserIdentity" type="SIPURI" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ServiceInstanceAddProfileCallCenter">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for a call center.
        Password is required.
        Prior to release 14 this was called ServiceInstanceProfile.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ServiceInstanceAddProfile">
        <xs:sequence>
          <xs:element name="name" type="ServiceInstanceProfileName"/>
          <xs:element name="callingLineIdLastName" type="CallingLineIdLastName"/>
          <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName"/>
          <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
          <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
          <xs:element name="phoneNumber" type="DN" minOccurs="0"/>
          <xs:element name="extension" type="Extension" minOccurs="0"/>
          <xs:element name="password" type="Password"/>
          <xs:element name="department" type="DepartmentKey" minOccurs="0"/>
          <xs:element name="language" type="Language" minOccurs="0"/>
          <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
          <xs:element name="alias" type="SIPURI" minOccurs="0" maxOccurs="3"/>
          <xs:element name="publicUserIdentity" type="SIPURI" minOccurs="0"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ServiceInstanceAddProfileTrunkGroup">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for a trunk group.
        The publicUserIdentity element is not part of ServiceInstanceAddProfileTrunkGroup.
        Prior to release 14 this was called ServiceInstanceProfile.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ServiceInstanceAddProfile">
        <xs:sequence>
          <xs:element name="name" type="ServiceInstanceProfileName"/>
          <xs:element name="callingLineIdLastName" type="CallingLineIdLastName"/>
          <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName"/>
          <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
          <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
          <xs:element name="phoneNumber" type="DN" minOccurs="0"/>
          <xs:element name="extension" type="Extension" minOccurs="0"/>
          <xs:element name="password" type="Password" minOccurs="0"/>
          <xs:element name="department" type="DepartmentKey" minOccurs="0"/>
          <xs:element name="language" type="Language" minOccurs="0"/>
          <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
          <xs:element name="alias" type="SIPURI" minOccurs="0" maxOccurs="3"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ServiceInstanceModifyProfile">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for group service used when modifying an existing service instance.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="ServiceInstanceProfileName" minOccurs="0"/>
      <xs:element name="callingLineIdLastName" type="CallingLineIdLastName" minOccurs="0"/>
      <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName" minOccurs="0"/>
      <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
      <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
      <xs:element name="phoneNumber" type="DN" nillable="true" minOccurs="0"/>
      <xs:element name="extension" type="Extension" nillable="true" minOccurs="0"/>
      <xs:element name="password" type="Password" minOccurs="0"/>
      <xs:element name="department" type="DepartmentKey" nillable="true" minOccurs="0"/>
      <xs:element name="language" type="Language" minOccurs="0"/>
      <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
      <xs:element name="sipAliasList" type="ReplacementSIPAliasList" nillable="true" minOccurs="0"/>
      <xs:element name="publicUserIdentity" type="SIPURI" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ServiceInstanceModifyProfileTrunkGroup">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for a trunk group used when modifying an existing service instance.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:restriction base="ServiceInstanceModifyProfile">
        <xs:sequence>
          <xs:element name="name" type="ServiceInstanceProfileName" minOccurs="0"/>
          <xs:element name="callingLineIdLastName" type="CallingLineIdLastName" minOccurs="0"/>
          <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName" minOccurs="0"/>
          <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
          <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
          <xs:element name="phoneNumber" type="DN" nillable="true" minOccurs="0"/>
          <xs:element name="extension" type="Extension" nillable="true" minOccurs="0"/>
          <xs:element name="password" type="Password" minOccurs="0"/>
          <xs:element name="department" type="DepartmentKey" nillable="true" minOccurs="0"/>
          <xs:element name="language" type="Language" minOccurs="0"/>
          <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
          <xs:element name="sipAliasList" type="ReplacementSIPAliasList" nillable="true" minOccurs="0"/>
        </xs:sequence>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="ServiceInstanceReadProfile">
    <xs:annotation>
      <xs:documentation>
        Service Profile Information for group service.
        It is identical to the ServiceInstanceAddProfile, but without the password.
        Prior to release 14 this was called ServiceInstanceProfile.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="ServiceInstanceProfileName"/>
      <xs:element name="callingLineIdLastName" type="CallingLineIdLastName"/>
      <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName"/>
      <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
      <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
      <xs:element name="phoneNumber" type="DN" minOccurs="0"/>
      <xs:element name="extension" type="Extension" minOccurs="0"/>
      <xs:element name="department" type="DepartmentKey" minOccurs="0"/>
      <xs:element name="language" type="Language" minOccurs="0"/>
      <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
      <xs:element name="timeZoneDisplayName" type="TimeZoneDisplayName" minOccurs="0"/>
      <xs:element name="alias" type="SIPURI" minOccurs="0" maxOccurs="3"/>
      <xs:element name="publicUserIdentity" type="SIPURI" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="ServicePackAuthorization">
    <xs:annotation>
      <xs:documentation>
        Authorize (with quantity) or unauthorize a service pack.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="servicePackName" type="ServicePackName"/>
      <xs:choice>
        <xs:element name="authorizedQuantity" type="UnboundedPositiveInt"/>
        <xs:element name="unauthorized" type="xs:boolean" fixed="true"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="ServicePackName">
    <xs:annotation>
      <xs:documentation>Service Pack name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServicePackDescription">
    <xs:annotation>
      <xs:documentation>Service Pack description.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminAccessDeviceAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing access devices.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Associate User With Device"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminAdminAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing other
        Service Provider Administrator's within the same service provider.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminDepartmentAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing department lists
        within the service provider.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminGroupAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing groups
        within the service provider.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Restricted from Adding or Removing Groups"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminPhoneNumberExtensionAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing phone numbers or
        extensions.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Assign To Services and Users"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminProfileAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing
        the service provider profile information.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Read-Only"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminServiceAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing services.
        "No Authorization" was added in release 14.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="No Authorization"/>
      <xs:enumeration value="Read-Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminServicePackAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing service packs.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminType">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator type
        "Normal" indicates the service provider admin is a normal admin.
        "Customer" indicates the service provider admin is a customer admin.
        "Password Reset Only" indicates the service provider admin is a password reset only admin.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Normal"/>
      <xs:enumeration value="Customer"/>
      <xs:enumeration value="Password Reset Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminUserAccess">
    <xs:annotation>
      <xs:documentation>
        Policy for a service provider administrator's access to user configuration.
        "Full" indicates full access to users in the service provider.
        "Full Profile" indicates
          1) the service provider administrator is restricted from adding or removing users, but
          2) has full access to the user's profile
        "Read-Only Profile" indicates
          1) the service provider administrator is restricted from adding or removing users, and
          2) read-only access is granted to the user's profile.
        "No Profile" indicates
          1) the service provider administrator is restricted from adding or removing users, and
          2) no access is granted to the user's profile.
        "None" indicates no access to users in the service provider.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="Full Profile"/>
      <xs:enumeration value="Read-Only Profile"/>
      <xs:enumeration value="No Profile"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderAdminWebBrandingAccess">
    <xs:annotation>
      <xs:documentation>
        Service Provider Administrator's policy for accessing web branding.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Full"/>
      <xs:enumeration value="None"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderConferenceURISettingLevel">
    <xs:annotation>
      <xs:documentation>
        Choices for the service provider conference URI
        setting to decide which level of settings to use.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="System"/>
      <xs:enumeration value="Service Provider"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ServiceProviderId">
    <xs:annotation>
      <xs:documentation>Service Provider Id uniquely identifies a service provider.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SharedCallAppearanceMaximumAppearances">
    <xs:annotation>
      <xs:documentation>
        Maximum Shared Call Appearances.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SharedCallAppearanceBridgeWarningTone">
    <xs:annotation>
      <xs:documentation>
        Warning tone types for Shared Call Appearance.
        The bridge warning tone types are none, barge-in, barge-in repeat.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="None"/>
      <xs:enumeration value="Barge-In"/>
      <xs:enumeration value="Barge-In and Repeat"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SignalingAddressType">
    <xs:annotation>
      <xs:documentation>
        Device type signaling address types.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Non-intelligent Device Addressing"/>
      <xs:enumeration value="Non-intelligent Proxy Addressing"/>
      <xs:enumeration value="Intelligent Device Addressing"/>
      <xs:enumeration value="Intelligent Proxy Addressing"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SignedPassword">
    <xs:annotation>
      <xs:documentation>
        Signed Password.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SimultaneousRingSelection">
    <xs:annotation>
      <xs:documentation>
        Simultaneous Ring Selection.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Do not Ring if on a Call"/>
      <xs:enumeration value="Ring for all Incoming Calls"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SIPContact">
    <xs:annotation>
      <xs:documentation>
        SIP Registration Contact without the sip: prefix.
        Validation:
         - do not allow sip:
         - allow the following characters:
           alphanumeric   ampersand    =   +   $   ,   ;   ?   /   -   _   .   !   ~   *   '   (   )   :  @
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="1020"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SIPURI">
    <xs:annotation>
      <xs:documentation>
        SIP URI.
        The SIP URI is used in many different places in the schema.
        If the SIPURI is an alias, the Validation rules are:
        - don't allow sip:
        - allow the following characters:
          alphanumeric   -   _   .   !   ~   *   '   (   )   @
        - exactly one @ symbol
        - user portion and host portion are both required
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="161"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SIPAuthenticationUserName">
    <xs:annotation>
      <xs:documentation>SIP Authentication User Name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SIPAuthenticationPassword">
    <xs:annotation>
      <xs:documentation>SIP Authentication Password</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SpeedDialPrefix">
    <xs:annotation>
      <xs:documentation>
        Speed dial prefix.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="2"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SpeedDialDescription">
    <xs:annotation>
      <xs:documentation>
        Speed dial prefix.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="SystemAdminType">
    <xs:annotation>
      <xs:documentation>
        System Administrator types.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="System"/>
      <xs:enumeration value="Provisioning"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:simpleType name="SystemUserCallingLineIdSelection">
    <xs:annotation>
      <xs:documentation>
        System User Calling Line Id Options.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Disable All"/>
      <xs:enumeration value="Enable All"/>
      <xs:enumeration value="Enable All Except Emergency"/>
      <xs:enumeration value="Enable Emergency Only"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="SystemUserRingTimeoutSeconds">
    <xs:annotation>
      <xs:documentation>
        Ring timeout for a user.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="180"/>
    </xs:restriction>
  </xs:simpleType>  

  <xs:complexType name="TimeInterval">
    <xs:annotation>
      <xs:documentation>
        Time Interval.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="startDayOfWeek" type="DayOfWeek"/>
      <xs:element name="startHour" type="Hour"/>
      <xs:element name="startMinute" type="Minute"/>
      <xs:element name="endDayOfWeek" type="DayOfWeek"/>
      <xs:element name="endHour" type="Hour"/>
      <xs:element name="endMinute" type="Minute"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TimeSchedule">
    <xs:annotation>
      <xs:documentation>
        The from dn criteria.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="type" type="TimeScheduleType"/>
      <xs:element name="name" type="TimeScheduleName"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="TimeScheduleName">
    <xs:annotation>
      <xs:documentation>
        Time schedule name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TimeScheduleType">
    <xs:annotation>
      <xs:documentation>
        Time schedule type.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="User"/>
      <xs:enumeration value="Group"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TimeZone">
    <xs:annotation>
      <xs:documentation>Time zone key.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="127"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TimeZoneDisplayName">
    <xs:annotation>
      <xs:documentation>
        Localized Time Zone Display Name
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="127"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Title">
    <xs:annotation>
      <xs:documentation>Title.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TransportProtocol">
    <xs:annotation>
      <xs:documentation>
        Network Transport Protocol.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="UDP"/>
      <xs:enumeration value="TCP"/>
      <xs:enumeration value="Unspecified"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TrapInitialThreshold">
    <xs:annotation>
      <xs:documentation>
        An SNMP trap will be sent when the number of counted events crosses this threshold value.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TrapOffsetThreshold">
    <xs:annotation>
      <xs:documentation>
        Subsequent SNMP traps will be sent after the intial trap each time the number of
        counted events increases by this value since the last trap.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="Treatment">
    <xs:annotation>
      <xs:documentation>Treatment name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="161"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:complexType name="TrunkAddressingAdd">
    <xs:annotation>
      <xs:documentation>
        Trunk group endpoint.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="trunkGroupDeviceEndpoint" type="TrunkGroupDeviceEndpointAdd" minOccurs="0"/>
      <xs:element name="enterpriseTrunkName" type="EnterpriseTrunkName" minOccurs="0"/>
      <xs:element name="alternateTrunkIdentity" type="AlternateTrunkIdentity" minOccurs="0"/>      
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="TrunkAddressingModify">
    <xs:annotation>
      <xs:documentation>
        Trunk group endpoint.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="trunkGroupDeviceEndpoint" type="TrunkGroupDeviceEndpointModify" nillable="true" minOccurs="0"/>
      <xs:element name="enterpriseTrunkName" type="EnterpriseTrunkName" nillable="true" minOccurs="0"/>
      <xs:element name="alternateTrunkIdentity" type="AlternateTrunkIdentity" nillable="true" minOccurs="0"/>      
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="TrunkAddressingRead">
    <xs:annotation>
      <xs:documentation>
        Trunk group endpoint.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="trunkGroupDeviceEndpoint" type="TrunkGroupDeviceEndpointRead14sp4" minOccurs="0"/>
      <xs:element name="enterpriseTrunkName" type="EnterpriseTrunkName" minOccurs="0"/>
      <xs:element name="alternateTrunkIdentity" type="AlternateTrunkIdentity" minOccurs="0"/>      
    </xs:sequence>
  </xs:complexType>
  
  <xs:simpleType name="TrunkGroupCapacityExceededAction">
    <xs:annotation>
      <xs:documentation>
        Trunk Group capacity exceeded action.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Forward"/>
      <xs:enumeration value="Reroute"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="TrunkGroupDeviceEndpointAdd">
    <xs:annotation>
      <xs:documentation>
        Trunk group device endpoint used in the context of modify.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="TrunkGroupDeviceName"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="TrunkGroupDeviceEndpointRead14sp4">
    <xs:annotation>
      <xs:documentation>
        Trunk group device endpoint.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="TrunkGroupName"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" minOccurs="0"/>
      <xs:element name="staticRegistrationCapable" type="xs:boolean"/>
      <xs:element name="useDomain" type="xs:boolean"/>
      <xs:element name="isPilotUser" type="xs:boolean"/>
    </xs:sequence>
  </xs:complexType>


  <xs:complexType name="TrunkGroupDeviceEndpointModify">
    <xs:annotation>
      <xs:documentation>
        Trunk group device endpoint used in the context of modify.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="name" type="TrunkGroupDeviceName"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="TrunkGroupDeviceName">
    <xs:annotation>
      <xs:documentation>
        Trunk Group device name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="TrunkGroupInvitationTimeoutSeconds">
    <xs:annotation>
      <xs:documentation>
        The timer to start when an invitation is sent to a device associated with a trunk group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="15"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="TrunkGroupKey">
    <xs:annotation>
      <xs:documentation>
        Uniquely identifies a Trunk Group system-wide.
        The trunkGroupName is unique within a group, but not unique system-wide.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceProviderId" type="ServiceProviderId"/>
      <xs:element name="groupId" type="GroupId"/>
      <xs:element name="name" type="TrunkGroupName"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="TrunkGroupName">
    <xs:annotation>
      <xs:documentation>
        Trunk Group name.
        Uniquely identifies a Trunk Group within a business (or family) group.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="TrunkGroupPilotUser">
    <xs:annotation>
      <xs:documentation>
        Trunk Group pilot user information used when adding a Trunk Group.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="userId" type="UserId"/>
      <xs:element name="lastName" type="LastName"/>
      <xs:element name="firstName" type="FirstName"/>
      <xs:element name="callingLineIdLastName" type="CallingLineIdLastName"/>
      <xs:element name="callingLineIdFirstName" type="CallingLineIdFirstName"/>
      <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
      <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
      <xs:element name="password" type="Password" minOccurs="0"/>
      <xs:element name="department" type="DepartmentKey" minOccurs="0"/>
      <xs:element name="language" type="Language" minOccurs="0"/>
      <xs:element name="timeZone" type="TimeZone" minOccurs="0"/>
      <xs:element name="linePort" type="AccessDeviceEndpointLinePort"/>
      <xs:element name="contact" type="SIPContact" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="UnboundedNonNegativeInt">
    <xs:annotation>
      <xs:documentation>
        Unbounded Quantity. Can either be unlimited or a non-negative int quantity.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="unlimited" type="xs:boolean" fixed="true"/>
      <xs:element name="quantity">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="0"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="UnboundedPositiveInt">
    <xs:annotation>
      <xs:documentation>
        Unbounded Quantity. Can either be unlimited or a positive int quantity.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>
      <xs:element name="unlimited" type="xs:boolean" fixed="true"/>
      <xs:element name="quantity">
        <xs:simpleType>
          <xs:restriction base="xs:int">
            <xs:minInclusive value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:choice>
  </xs:complexType>

  <xs:complexType name="UserDisplayNames">
    <xs:annotation>
      <xs:documentation>
        The parts of a user's display name that a client can display in whatever way is appropriate
        for the client application.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="lastName" type="LastName"/>
      <xs:element name="firstName" type="FirstName"/>
      <xs:element name="hiraganaLastName" type="HiraganaLastName" minOccurs="0"/>
      <xs:element name="hiraganaFirstName" type="HiraganaFirstName" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="UserId">
    <xs:annotation>
      <xs:documentation>
        A user id consists of a user-portion optionally followed by an @ sign and a domain name.
        If the domain is not specified, it is assumed to be the system default domain.
        The domain is required when adding normal users and virtual users, i.e. Auto Attendants,
        Hunt Groups, Call Centers....
        The domain must not be specified for system-level and service-provider-level administrators.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="161"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="UserService">
    <xs:annotation>
      <xs:documentation>
        User level services.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Advice Of Charge"/>
      <xs:enumeration value="Alternate Numbers"/>
      <xs:enumeration value="Anonymous Call Rejection"/>
      <xs:enumeration value="Attendant Console"/>
      <xs:enumeration value="Authentication"/>
      <xs:enumeration value="Automatic Callback"/>
      <xs:enumeration value="Automatic Hold/Retrieve"/>
      <xs:enumeration value="Barge-in Exempt"/>
      <xs:enumeration value="Basic Call Logs"/>
      <xs:enumeration value="Bria For BroadWorks"/>
      <xs:enumeration value="BroadWorks Agent"/>
      <xs:enumeration value="BroadWorks Anywhere"/>
      <xs:enumeration value="BroadWorks Receptionist - Office"/>
      <xs:enumeration value="BroadWorks Receptionist - Small Business"/>
      <xs:enumeration value="BroadWorks Supervisor"/>
      <xs:enumeration value="Busy Lamp Field"/>
      <xs:enumeration value="Call Center - Basic"/>
      <xs:enumeration value="Call Center - Standard"/>
      <xs:enumeration value="Call Center - Premium"/>
      <xs:enumeration value="Call Forwarding Always"/>
      <xs:enumeration value="Call Forwarding Busy"/>
      <xs:enumeration value="Call Forwarding No Answer"/>
      <xs:enumeration value="Call Forwarding Not Reachable"/>
      <xs:enumeration value="Call Forwarding Selective"/>
      <xs:enumeration value="Call Notify"/>
      <xs:enumeration value="Call Return"/>
      <xs:enumeration value="Call Transfer"/>
      <xs:enumeration value="Call Waiting"/>
      <xs:enumeration value="Calling Line ID Blocking Override"/>
      <xs:enumeration value="Calling Line ID Delivery Blocking"/>
      <xs:enumeration value="Calling Name Retrieval"/>
      <xs:enumeration value="Calling Party Category"/>
      <xs:enumeration value="Charge Number"/>
      <xs:enumeration value="Client Call Control"/>
      <xs:enumeration value="Client Call Control II"/>
      <xs:enumeration value="Client License 1"/>
      <xs:enumeration value="Client License 2"/>
      <xs:enumeration value="Client License 3"/>
      <!-- Client License 4 = BroadWorks Receptionist - Enterprise -->
      <xs:enumeration value="Client License 4"/>
      <xs:enumeration value="Client License 5"/>
      <xs:enumeration value="Client License 6"/>
      <xs:enumeration value="Client License 7"/>
      <xs:enumeration value="Client License 8"/>
      <xs:enumeration value="Client License 9"/>
      <xs:enumeration value="Client License 10"/>
      <xs:enumeration value="Client License 11"/>
      <xs:enumeration value="Client License 12"/>
      <xs:enumeration value="Client License 13"/>
      <xs:enumeration value="Client License 14"/>
      <xs:enumeration value="Client License 15"/>
      <xs:enumeration value="Client License 16"/>
      <xs:enumeration value="Client License 17"/>
      <xs:enumeration value="Client License 18"/>
      <xs:enumeration value="Client License 19"/>
      <xs:enumeration value="Client License 20"/>
      <xs:enumeration value="CommPilot Call Manager"/>
      <xs:enumeration value="CommPilot Express"/>
      <xs:enumeration value="CommPilot Express SR"/>
      <xs:enumeration value="CommPilot Lite"/>
      <xs:enumeration value="CommPilot Receptionist"/>
      <xs:enumeration value="CommPilot Residential"/>
      <xs:enumeration value="CommPilot Small Business"/>
      <xs:enumeration value="Connected Line Identification Presentation"/>
      <xs:enumeration value="Connected Line Identification Restriction"/>
      <xs:enumeration value="Customer Originated Trace"/>
      <xs:enumeration value="Custom Ringback User"/>      
      <xs:enumeration value="Custom Ringback User - Call Waiting"/>
      <xs:enumeration value="Custom Ringback User - Video"/>
      <xs:enumeration value="Directed Call Pickup"/>
      <xs:enumeration value="Directed Call Pickup with Barge-in"/>
      <xs:enumeration value="Directory Number Hunting"/>
      <xs:enumeration value="Diversion Inhibitor"/>
      <xs:enumeration value="Do Not Disturb"/>
      <xs:enumeration value="Dual-Mode VCC"/>
      <xs:enumeration value="Enhanced Call Logs"/>
      <xs:enumeration value="External Calling Line ID Delivery"/>
      <xs:enumeration value="External Custom Ringback"/>
      <xs:enumeration value="Fax Messaging"/>
      <xs:enumeration value="Flash Call Hold"/>
      <xs:enumeration value="Hoteling Guest"/>
      <xs:enumeration value="Hoteling Host"/>
      <xs:enumeration value="In-Call Service Activation"/>
      <xs:enumeration value="IN Integration"/>
      <xs:enumeration value="Intelligent Network Service Control"/>
      <xs:enumeration value="Intercept User"/>
      <xs:enumeration value="Internal Calling Line ID Delivery"/>
      <xs:enumeration value="Last Number Redial"/>
      <xs:enumeration value="Malicious Call Trace"/>
      <xs:enumeration value="Mobile Extension to Extension Dialing"/>
      <xs:enumeration value="Mobility"/>
      <xs:enumeration value="Multiple Call Arrangement"/>
      <xs:enumeration value="Music On Hold User"/>
      <xs:enumeration value="Video On Hold User"/>
      <xs:enumeration value="MWI Delivery to Mobile Endpoint"/>
      <xs:enumeration value="N-Way Call"/>
      <xs:enumeration value="Outlook Integration"/>
      <xs:enumeration value="Physical Location"/>
      <xs:enumeration value="Polycom Phone Services"/>
      <xs:enumeration value="Preferred Carrier User"/>
      <xs:enumeration value="Prepaid"/>      
      <xs:enumeration value="Priority Alert"/>
      <xs:enumeration value="Privacy"/>
      <xs:enumeration value="Push to Talk"/>
      <xs:enumeration value="Remote Office"/>
      <xs:enumeration value="SMDI Message Desk"/>
      <xs:enumeration value="Selective Call Acceptance"/>
      <xs:enumeration value="Selective Call Rejection"/>
      <xs:enumeration value="Sequential Ring"/>
      <xs:enumeration value="Service Scripts User"/>
      <xs:enumeration value="Shared Call Appearance"/>
      <xs:enumeration value="Shared Call Appearance 5"/>
      <xs:enumeration value="Shared Call Appearance 10"/>
      <xs:enumeration value="Shared Call Appearance 15"/>
      <xs:enumeration value="Shared Call Appearance 20"/>
      <xs:enumeration value="Shared Call Appearance 25"/>
      <xs:enumeration value="Shared Call Appearance 30"/>
      <xs:enumeration value="Shared Call Appearance 35"/>
      <xs:enumeration value="Simultaneous Ring Family"/>
      <xs:enumeration value="Simultaneous Ring Personal"/>
      <xs:enumeration value="Speed Dial 100"/>
      <xs:enumeration value="Speed Dial 8"/>
      <xs:enumeration value="Third-Party MWI Control"/>
      <xs:enumeration value="Third-Party Voice Mail Support"/>
      <xs:enumeration value="Three-Way Call"/>
      <xs:enumeration value="Two-Stage Dialing"/>
      <xs:enumeration value="Video Add-On"/>
      <xs:enumeration value="Voice Messaging User"/>
      <xs:enumeration value="Voice Messaging User - Video"/>
      <xs:enumeration value="Voice Portal Calling"/>
      <xs:enumeration value="Zone Calling Restrictions"/>      
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="UserServiceAuthorization">
    <xs:annotation>
      <xs:documentation>
        Authorize (with quantity) or unauthorize a user service.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="serviceName" type="UserService"/>
      <xs:choice>
        <xs:element name="authorizedQuantity" type="UnboundedPositiveInt"/>
        <xs:element name="unauthorized" type="xs:boolean" fixed="true"/>
      </xs:choice>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="UserType">
    <xs:annotation>
      <xs:documentation>
        Types of users in Broadworks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Normal"/>
      <xs:enumeration value="Auto Attendant"/>
      <xs:enumeration value="Call Center"/>
      <xs:enumeration value="Hunt Group"/>
      <xs:enumeration value="Instant Group Call"/>
      <xs:enumeration value="Instant Conferencing"/>
      <xs:enumeration value="Music On Hold"/>
      <xs:enumeration value="Voice Messaging"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="URL">
    <xs:annotation>
      <xs:documentation>URL.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="WebBasedConfigURL">
    <xs:annotation>
      <xs:documentation>
        Web based configuration URL.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="YahooId">
    <xs:annotation>
      <xs:documentation>Yahoo Id.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ZoneCallingRestrictionsZoneName">
    <xs:annotation>
      <xs:documentation>Zone Name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DeviceManagementDeviceTypeModifyOptions16">
    <xs:annotation>
      <xs:documentation>
        Device Management System device type options during a modify request.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="deviceAccessProtocol" type="DeviceAccessProtocol16" minOccurs="0"/>
      <xs:element name="tagMode" type="DeviceManagementTagMode" minOccurs="0"/>
      <xs:element name="tagSet" type="DeviceManagementTagSet" minOccurs="0" nillable="true"/>
      <xs:element name="allowDeviceProfileCustomTagSet" type="xs:boolean" minOccurs="0"/>
      <xs:element name="allowGroupCustomTagSet" type="xs:boolean" minOccurs="0"/>
      <xs:element name="sendEmailUponResetFailure" type="xs:boolean" minOccurs="0"/>
      <xs:element name="deviceAccessNetAddress" type="NetAddress" minOccurs="0" nillable="true"/>
      <xs:element name="deviceAccessPort" type="Port" minOccurs="0" nillable="true"/>
      <xs:element name="deviceAccessContext" type="DeviceAccessContext" minOccurs="0" nillable="true"/>
      <xs:element name="defaultDeviceLanguage" type="DeviceLanguage" minOccurs="0" nillable="true"/>
      <xs:element name="defaultDeviceEncoding" type="Encoding" minOccurs="0" nillable="true"/>
      <xs:element name="accessDeviceCredentials" type="DeviceManagementUserNamePassword16" minOccurs="0" nillable="true"/>
      <xs:element name="useHttpDigestAuthentication" type="xs:boolean" minOccurs="0"/>
      <xs:element name="macBasedFileAuthentication" type="xs:boolean" minOccurs="0"/>
      <xs:element name="userNamePasswordFileAuthentication" type="xs:boolean" minOccurs="0"/>
      <xs:element name="macInNonRequestURI" type="xs:boolean" minOccurs="0"/>
      <xs:element name="macFormatInNonRequestURI" type="DeviceManagementAccessURI" minOccurs="0" nillable="true"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CPEDeviceOptions16">
    <xs:annotation>
      <xs:documentation>
        CPE device's options.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="enableMonitoring" type="xs:boolean"/>
      <xs:element name="resetEvent" type="CPEDeviceResetEventType" minOccurs="0"/>
      <xs:element name="configType" type="AccessDeviceEnhancedConfigurationType14"/>
      <xs:element name="systemFileName" type="CPESystemFileName" minOccurs="0"/>
      <xs:element name="deviceFileFormat" type="CPEDeviceFileFormat" minOccurs="0"/>
      <xs:element name="deviceManagementDeviceTypeOptions" type="DeviceManagementDeviceTypeOptions16" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DeviceManagementDeviceTypeOptions16">
    <xs:annotation>
      <xs:documentation>
        Device Management System device type options.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="deviceAccessProtocol" type="DeviceAccessProtocol16"/>
      <xs:element name="tagMode" type="DeviceManagementTagMode"/>
      <xs:element name="tagSet" type="DeviceManagementTagSet" minOccurs="0"/>
      <xs:element name="allowDeviceProfileCustomTagSet" type="xs:boolean"/>
      <xs:element name="allowGroupCustomTagSet" type="xs:boolean"/>
      <xs:element name="sendEmailUponResetFailure" type="xs:boolean"/>
      <xs:element name="deviceAccessNetAddress" type="NetAddress" minOccurs="0"/>
      <xs:element name="deviceAccessPort" type="Port" minOccurs="0"/>
      <xs:element name="deviceAccessContext" type="DeviceAccessContext" minOccurs="0"/>
      <xs:element name="deviceAccessURI" type="DeviceManagementAccessURI" minOccurs="0"/>
      <xs:element name="defaultDeviceLanguage" type="DeviceLanguage" minOccurs="0"/>
      <xs:element name="defaultDeviceEncoding" type="Encoding" minOccurs="0"/>
      <xs:element name="accessDeviceCredentials" type="DeviceManagementUserNamePassword16" minOccurs="0"/>
      <xs:element name="useHttpDigestAuthentication" type="xs:boolean"/>
      <xs:element name="macBasedFileAuthentication" type="xs:boolean"/>
      <xs:element name="userNamePasswordFileAuthentication" type="xs:boolean"/>
      <xs:element name="macInNonRequestURI" type="xs:boolean"/>
      <xs:element name="macFormatInNonRequestURI" type="DeviceManagementAccessURI" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="CPEDeviceOptionsRead16">
    <xs:annotation>
      <xs:documentation>
        CPE device's options.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="enableMonitoring" type="xs:boolean"/>
      <xs:element name="resetEvent" type="CPEDeviceResetEventType" minOccurs="0"/>
      <xs:element name="configType" type="AccessDeviceEnhancedConfigurationType14"/>
      <xs:element name="systemFileName" type="CPESystemFileName" minOccurs="0"/>
      <xs:element name="deviceFileFormat" type="CPEDeviceFileFormat" minOccurs="0"/>
      <xs:element name="deviceManagementDeviceTypeOptions" type="DeviceManagementDeviceTypeOptionsRead16" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="DeviceManagementDeviceTypeOptionsRead16">
    <xs:annotation>
      <xs:documentation>
        Device Management System device type options.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="deviceAccessProtocol" type="DeviceAccessProtocol16"/>
      <xs:element name="tagMode" type="DeviceManagementTagMode"/>
      <xs:element name="tagSet" type="DeviceManagementTagSet" minOccurs="0"/>
      <xs:element name="allowDeviceProfileCustomTagSet" type="xs:boolean"/>
      <xs:element name="allowGroupCustomTagSet" type="xs:boolean"/>
      <xs:element name="sendEmailUponResetFailure" type="xs:boolean"/>
      <xs:element name="deviceAccessNetAddress" type="NetAddress" minOccurs="0"/>
      <xs:element name="deviceAccessPort" type="Port" minOccurs="0"/>
      <xs:element name="deviceAccessContext" type="DeviceAccessContext" minOccurs="0"/>
      <xs:element name="deviceAccessURI" type="DeviceManagementAccessURI" minOccurs="0"/>
      <xs:element name="defaultDeviceLanguage" type="DeviceLanguage" minOccurs="0"/>
      <xs:element name="defaultDeviceEncoding" type="Encoding" minOccurs="0"/>
      <xs:element name="accessDeviceCredentials" type="UserId" minOccurs="0"/>
      <xs:element name="useHttpDigestAuthentication" type="xs:boolean"/>
      <xs:element name="macBasedFileAuthentication" type="xs:boolean"/>
      <xs:element name="userNamePasswordFileAuthentication" type="xs:boolean"/>
      <xs:element name="macInNonRequestURI" type="xs:boolean"/>
      <xs:element name="macFormatInNonRequestURI" type="DeviceManagementAccessURI" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DeviceManagementFileFormat">
    <xs:annotation>
      <xs:documentation>
        The file name format for an access device file managed by the Device Management System on BroadWorks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="128"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementFileCategory">
    <xs:annotation>
      <xs:documentation>
        The file category for an access device file managed by the Device Management System on BroadWorks. A static file has no variable content and only one copy is required on the repository.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Static"/>
      <xs:enumeration value="Dynamic Group"/>
      <xs:enumeration value="Dynamic Profile"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceTypeFileEnhancedConfigurationMode">
    <xs:annotation>
      <xs:documentation>
        Choices for the device type configuration mode.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Manual"/>
      <xs:enumeration value="Custom"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceAccessContext">
    <xs:annotation>
      <xs:documentation>
        The Xtended Services Platform Device Management System webapp context name deployed to serve device access requests.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="DeviceManagementUserNamePassword16">
    <xs:annotation>
      <xs:documentation>
        Access device credentials.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="userName" type="UserId"/>
      <xs:element name="password" type="Password"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DeviceAccessProtocol16">
    <xs:annotation>
      <xs:documentation>
        Protocols that an access device can use to fetch files from BroadWorks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Http"/>
      <xs:enumeration value="Https"/>
      <xs:enumeration value="FTP"/>
      <xs:enumeration value="TFTP"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceLanguage">
    <xs:annotation>
      <xs:documentation>
        A device language name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementTagSet">
    <xs:annotation>
      <xs:documentation>
        A static tag set name.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementAccessURI">
    <xs:annotation>
      <xs:documentation>
        The access URI that a device uses to access files on BroadWorks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementTagMode">
    <xs:annotation>
      <xs:documentation>
        Defines the tag sets used when device configuration files are built.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="None"/>
      <xs:enumeration value="System"/>
      <xs:enumeration value="System And Custom"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="CPEDeviceModifyOptions16">
    <xs:annotation>
      <xs:documentation>
        CPE device's options when used with a modify request.
        The following options are not changeable:
          configType
          systemFileName
          deviceFileFormat
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="enableMonitoring" type="xs:boolean" minOccurs="0"/>
      <xs:element name="resetEvent" type="CPEDeviceResetEventType" nillable="true" minOccurs="0"/>
      <xs:element name="deviceManagementDeviceTypeOptions" type="DeviceManagementDeviceTypeModifyOptions16" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="DeviceManagementTagName">
    <xs:annotation>
      <xs:documentation>
        A static tag name for access device files managed by the Device Management System on BroadWorks.
        The static tag name must start and end with a % with no other % in between. The tag must not
        start with %BW.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="64"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementTagValue">
    <xs:annotation>
      <xs:documentation>
        A static tag value for access device files managed by the Device Management System on BroadWorks.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="256"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DeviceManagementSystemDeviceAccessClusterNumber">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="1"/>
      <xs:maxInclusive value="100"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileRepositoryAccessType">
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileRepositoryUserName">
    <xs:annotation>
      <xs:documentation>
        A user id for a File Repository.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="FileRepositoryUserPassword">
    <xs:annotation>
      <xs:documentation>
        A password for a File Repository.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="RealmName">
    <xs:annotation>
      <xs:documentation>Realm Name.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="265"/>
    </xs:restriction>
  </xs:simpleType>
  
    <xs:simpleType name="Md5Hash">
      <xs:annotation>
        <xs:documentation>Byte Representation of a Md5 Hash.</xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:minLength value="32"/>
        <xs:maxLength value="32"/>
      </xs:restriction>
  </xs:simpleType>

    <xs:simpleType name="DigestHa1Complement">
      <xs:annotation>
        <xs:documentation>Ha1 Complement of a Http Digest Authentication.</xs:documentation>
      </xs:annotation>
      <xs:restriction base="xs:token">
        <xs:minLength value="32"/>
        <xs:maxLength value="256"/>
      </xs:restriction>
  </xs:simpleType>
  
</xs:schema>

