<?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  :  E N T E R P R I S E   P A R T             -->
<!--                                                                           -->
<!-- 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">

  <xs:import namespace      = "C"
             schemaLocation = "OCISchemaBASE.xsd"/>

  <xs:include schemaLocation="OCISchemaDataTypes.xsd"/>
  <xs:include schemaLocation="OCISchemaSearchCriteria.xsd"/>

  <!-- ***************************************************************************** -->
  <!-- E N T E R P R I S E   R E Q U E S T S   A N D   R E S P O N S E S             -->
  <!-- ***************************************************************************** -->
  <!--
  IMPORTANT NOTE: An Enterprise is a special kind of Service Provider. The commands
  that are exclusively for Enterprises are placed here. However, many commands are
  applicable to both Service Providers and Enterprises. The commmands that work on
  both Service Providers and Enterprises are placed in the Service Providers schema.

  Requests and responses are listed here in alphabetical order.
  The non-primitive attributes inside the commands are defined in another
  section of the schema.

  Requests in this schema file:
    EnterpriseCommonPhoneListAddListRequest
    EnterpriseCommonPhoneListDeleteListRequest
    EnterpriseCommonPhoneListGetListRequest
    EnterpriseCommonPhoneListModifyRequest
    EnterpriseDepartmentAddRequest
    EnterpriseDepartmentDeleteRequest
    EnterpriseDepartmentGetAvailableParentListRequest
    EnterpriseDepartmentGetListRequest
    EnterpriseDepartmentModifyRequest
    EnterprisePhoneDirectoryGetListRequest
    EnterpriseVoiceVPNAddPolicyRequest
    EnterpriseVoiceVPNDeletePolicyRequest
    EnterpriseVoiceVPNGetDefaultRequest
    EnterpriseVoiceVPNGetPolicyRequest
    EnterpriseVoiceVPNGetPolicyListRequest
    EnterpriseVoiceVPNGetRequest14sp3
    EnterpriseVoiceVPNModifyPolicyRequest
    EnterpriseVoiceVPNModifyRequest
  -->

  <xs:complexType name="EnterpriseCommonPhoneListAddListRequest">
    <xs:annotation>
      <xs:documentation>
        Add one or more entries to an enterprise's common phone list.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="entry" type="PhoneListEntry" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseCommonPhoneListDeleteListRequest">
    <xs:annotation>
      <xs:documentation>
        Delete one or more entries from an enterprise's common phone list.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="entryName" type="PhoneListEntryName" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseCommonPhoneListGetListRequest">
    <xs:annotation>
      <xs:documentation>
        Get an enterprise's common phone list.
        The response is either a EnterpriseCommonPhoneListGetListResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseCommonPhoneListGetListResponse">
    <xs:annotation>
      <xs:documentation>
        Response to the EnterpriseCommonPhoneListGetListRequest.
        The response contains the enterprise's common phone list.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="entry" type="PhoneListEntry" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseCommonPhoneListModifyRequest">
    <xs:annotation>
      <xs:documentation>
        Modify an entry in an enterprise's common phone list.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="entryName" type="PhoneListEntryName"/>
          <xs:element name="newEntryName" type="PhoneListEntryName"  minOccurs="0"/>
          <xs:element name="phoneNumber" type="OutgoingDN" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentAddRequest">
    <xs:annotation>
      <xs:documentation>
        Add a department to enterprise.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="departmentName" type="DepartmentName"/>
          <xs:element name="parentDepartmentKey" type="EnterpriseDepartmentKey" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentDeleteRequest">
    <xs:annotation>
      <xs:documentation>
       Delete a department from an enterprise.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="departmentName" type="DepartmentName"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentGetAvailableParentListRequest">
    <xs:annotation>
      <xs:documentation>
        Get a list of enterprise level departments in an enterprise that could be the parent of the
        specified department. The department itself and all its decendents are not eligible to be
        the parent department.
        The response is either EnterpriseDepartmentGetAvailableParentListResponse or ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="departmentName" type="DepartmentName"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentGetAvailableParentListResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseDepartmentGetAvailableParentListRequest.
        The response includes two parallel arrays of department keys and department display names.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="departmentKey" type="DepartmentKey" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="fullPathName" type="DepartmentFullPathName" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseDepartmentGetListRequest">
    <xs:annotation>
      <xs:documentation>
        Request a list of departments in an enterprise. You may request only the
        list of departments defined at the enterprise-level, or you may request
        the list of all departments in the enterprise including all the departments
        defined within the groups inside the enterprise.
        The response is either EnterpriseDepartmentGetListResponse or ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="includeGroupDepartments" type="xs:boolean"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentGetListResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseDepartmentGetListRequest.
        The response includes two parallel arrays of department keys and department display names.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="departmentKey" type="DepartmentKey" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="fullPathName" type="DepartmentFullPathName" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

 <xs:complexType name="EnterpriseDepartmentModifyRequest">
    <xs:annotation>
      <xs:documentation>
        Modify a department of an enterprise.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="departmentName" type="DepartmentName"/>
          <xs:element name="newDepartmentName" type="DepartmentName" minOccurs="0"/>
          <xs:element name="newParentDepartmentKey" type="EnterpriseDepartmentKey" nillable="true" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterprisePhoneDirectoryGetListRequest">
    <xs:annotation>
      <xs:documentation>
        Request a table containing the phone directory for an enterprise.
        The directory includes all users in the enterprise and all entries in the enterprise common phone list.
        It is possible to search by various criteria to restrict the number of rows returned.
        Multiple search criteria are logically ANDed together.
        The response is either EnterprisePhoneDirectoryGetListResponse or ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="enterpriseId" type="ServiceProviderId"/>
          <xs:element name="isExtendedInfoRequested" type="xs:boolean"/>
          <xs:element name="responseSizeLimit" type="ResponseSizeLimit" minOccurs="0"/>
          <xs:element name="searchCriteriaUserLastName"        type="SearchCriteriaUserLastName" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaUserFirstName"       type="SearchCriteriaUserFirstName" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaDn"                  type="SearchCriteriaDn" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaGroupLocationCode"   type="SearchCriteriaGroupLocationCode" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaExtension"           type="SearchCriteriaExtension" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaMobilePhoneNumber"   type="SearchCriteriaMobilePhoneNumber" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaEmailAddress"        type="SearchCriteriaEmailAddress" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaYahooId"             type="SearchCriteriaYahooId" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaExactUserGroup"      type="SearchCriteriaExactUserGroup" minOccurs="0"/>
          <xs:element name="searchCriteriaExactUserDepartment" type="SearchCriteriaExactUserDepartment" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterprisePhoneDirectoryGetListResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterprisePhoneDirectoryGetListRequest.
        Contains a table with  a row for each phone number and column headings :
        "Name", "Number", "Extension", "Mobile", "Email Address", "Department", "Hiragana Name", "Group Id", "Yahoo Id".
        If extended directory information is requested, the following columns are also included:
        "First Name", "Last Name", "User Id", "Pager", "Title", "Time Zone", "Location", "Address Line 1", "Address Line 2",
        "City", "State", "Zip", "Country".
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="directoryTable" type="core:OCITable"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNAddPolicyRequest">
    <xs:annotation>
      <xs:documentation>
        Add the enterprise level data associated with a Voice VPN location code.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="locationDialingCode" type="EnterpriseVoiceVPNLocationCode"/>
          <xs:element name="minExtensionLength" type="EnterpriseVoiceVPNExtensionLength"/>
          <xs:element name="maxExtensionLength" type="EnterpriseVoiceVPNExtensionLength"/>
          <xs:element name="description" type="EnterpriseVoiceVPNDescription" minOccurs="0"/>
          <xs:element name="routeGroupId" type="GroupId" minOccurs="0"/>
          <xs:element name="policySelection" type="EnterpriseVoiceVPNPolicySelection"/>
          <xs:choice>
            <xs:element name="digitManipulation" type="EnterpriseVoiceVPNDigitManipulation" minOccurs="0" maxOccurs="8"/>
            <xs:element name="treatmentId" type="EnterpriseVoiceVPNTreatmentId" minOccurs="0"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNDeletePolicyRequest">
    <xs:annotation>
      <xs:documentation>
        Delete a enterprise voice VPN location.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="locationDialingCode" type="EnterpriseVoiceVPNLocationCode"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetDefaultRequest">
    <xs:annotation>
      <xs:documentation>
        Request the Voice VPN default settings for the enterprise.
        The response is EnterpriseVoiceVPNGetDefaultResponse or ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetDefaultResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseVoiceVPNGetDefaultResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="policySelection" type="EnterpriseVoiceVPNPolicySelection" minOccurs="4" maxOccurs="4"/>
          <xs:element name="digitManipulationOperation" type="EnterpriseVoiceVPNDigitManipulationOperation" minOccurs="12" maxOccurs="12"/>
          <xs:element name="routeGroupId" type="GroupId" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="treatment" type="EnterpriseVoiceVPNTreatmentEntry" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetPolicyRequest">
    <xs:annotation>
      <xs:documentation>
        Request the enterprise level data associated with Voice VPN location code.
        The response is either a EnterpriseVoiceVPNGetPolicyResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="locationDialingCode" type="EnterpriseVoiceVPNLocationCode"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetPolicyResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseVoiceVPNGetPolicyRequest.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="minExtensionLength" type="EnterpriseVoiceVPNExtensionLength"/>
          <xs:element name="maxExtensionLength" type="EnterpriseVoiceVPNExtensionLength"/>
          <xs:element name="description" type="EnterpriseVoiceVPNDescription" minOccurs="0"/>
          <xs:element name="routeGroupId" type="GroupId" minOccurs="0"/>
          <xs:element name="policySelection" type="EnterpriseVoiceVPNPolicySelection"/>
          <xs:choice>
            <xs:element name="digitManipulation" type="EnterpriseVoiceVPNDigitManipulation" minOccurs="0" maxOccurs="8"/>
            <xs:element name="treatmentId" type="EnterpriseVoiceVPNTreatmentId" minOccurs="0"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetRequest14sp3">
    <xs:annotation>
      <xs:documentation>
        Request the enterprise level data associated with Voice VPN.
        The response is either a EnterpriseVoiceVPNGetResponse14sp3 or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetResponse14sp3">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseVoiceVPNGetRequest14sp3.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="isActive" type="xs:boolean"/>
          <xs:element name="defaultSelection" type="EnterpriseVoiceVPNDefaultSelection"/>
          <xs:element name="e164Selection" type="EnterpriseVoiceVPNNonMatchingE164NumberSelection"/>
          <xs:element name="usePhoneContext" type="xs:boolean"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetPolicyListRequest">
    <xs:annotation>
      <xs:documentation>
        Request the list of Voice VPN locations.
        It is possible to search by various criteria to restrict the number of rows returned.
        Multiple search criteria are logically ANDed together.
        The response is either a EnterpriseVoiceVPNGetPolicyListResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="responseSizeLimit" type="ResponseSizeLimit" minOccurs="0"/>
          <xs:element name="searchCriteriaGroupLocationCode"    type="SearchCriteriaGroupLocationCode" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="searchCriteriaExactPolicySelection" type="SearchCriteriaExactPolicySelection" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNGetPolicyListResponse">
    <xs:annotation>
      <xs:documentation>
        Response to EnterpriseVoiceVPNGetListResponse.
        Returns a 4 column table with column headings:
          "Location Code", "Min Extension Length", "Max Extension Length", "Location Selection".
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIDataResponse">
        <xs:sequence>
          <xs:element name="locationList" type="core:OCITable"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNModifyPolicyRequest">
    <xs:annotation>
      <xs:documentation>
        Modify the enterprise level data associated with a Voice VPN location code.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="locationDialingCode" type="EnterpriseVoiceVPNLocationCode"/>
          <xs:element name="minExtensionLength" type="EnterpriseVoiceVPNExtensionLength" minOccurs="0"/>
          <xs:element name="maxExtensionLength" type="EnterpriseVoiceVPNExtensionLength" minOccurs="0"/>
          <xs:element name="description" type="EnterpriseVoiceVPNDescription" nillable="true" minOccurs="0"/>
          <xs:element name="routeGroupId" type="GroupId" minOccurs="0"/>
          <xs:element name="policySelection" type="EnterpriseVoiceVPNPolicySelection" minOccurs="0"/>
          <xs:choice>
            <xs:element name="digitManipulation" type="EnterpriseVoiceVPNDigitManipulation" minOccurs="0" maxOccurs="8"/>
            <xs:element name="treatmentId" type="EnterpriseVoiceVPNTreatmentId" minOccurs="0"/>
          </xs:choice>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNModifyRequest">
    <xs:annotation>
      <xs:documentation>
        Modify the enterprise voice VPN level data associated with voice VPN.
        The response is either a SuccessResponse or an ErrorResponse.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="core:OCIRequest">
        <xs:sequence>
          <xs:element name="serviceProviderId" type="ServiceProviderId"/>
          <xs:element name="isActive" type="xs:boolean" minOccurs="0"/>
          <xs:element name="defaultSelection" type="EnterpriseVoiceVPNDefaultSelection" minOccurs="0"/>
          <xs:element name="e164Selection" type="EnterpriseVoiceVPNNonMatchingE164NumberSelection" minOccurs="0"/>
          <xs:element name="usePhoneContext" type="xs:boolean" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <!-- ******************************************************************** -->
  <!-- M E S S A G E   P A R A M E T E R S                                  -->
  <!-- ******************************************************************** -->
  <!--
  The enterprise-specific non-primitive attributes are listed here in alphabetical order.
  -->

  <xs:simpleType name="EnterpriseVoiceVPNDefaultSelection">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Default Selector.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Public"/>
      <xs:enumeration value="Private"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNDescription">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="40"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EnterpriseVoiceVPNDigitManipulation" abstract="true">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Entry.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNDigitManipulationNoValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Entry that has no value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="EnterpriseVoiceVPNDigitManipulation">
        <xs:sequence>
          <xs:element name="operation" type="EnterpriseVoiceVPNDigitManipulationOperationNoValue"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="EnterpriseVoiceVPNDigitManipulationOperation">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation operations.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Prepend"/>
      <xs:enumeration value="End"/>
      <xs:enumeration value="Overwrite"/>
      <xs:enumeration value="Right Trim"/>
      <xs:enumeration value="Replace All"/>
      <xs:enumeration value="Left Trim"/>
      <xs:enumeration value="Append"/>
      <xs:enumeration value="Position"/>
      <xs:enumeration value="Insert"/>
      <xs:enumeration value="Trim"/>
      <xs:enumeration value="Delete"/>
      <xs:enumeration value="Move"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNDigitManipulationOperationNoValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Operations that have no value.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="EnterpriseVoiceVPNDigitManipulationOperation">
      <xs:enumeration value="End"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNDigitManipulationOperationOptionalValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Operations that may or may not have a value.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="EnterpriseVoiceVPNDigitManipulationOperation">
      <xs:enumeration value="Prepend"/>
      <xs:enumeration value="Overwrite"/>
      <xs:enumeration value="Right Trim"/>
      <xs:enumeration value="Replace All"/>
      <xs:enumeration value="Left Trim"/>
      <xs:enumeration value="Append"/>
      <xs:enumeration value="Insert"/>
      <xs:enumeration value="Trim"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNDigitManipulationOperationRequiredValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Operations that have a value.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="EnterpriseVoiceVPNDigitManipulationOperation">
      <xs:enumeration value="Position"/>
      <xs:enumeration value="Delete"/>
      <xs:enumeration value="Move"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EnterpriseVoiceVPNDigitManipulationOptionalValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Entry that optionally has a value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="EnterpriseVoiceVPNDigitManipulation">
        <xs:sequence>
          <xs:element name="operation" type="EnterpriseVoiceVPNDigitManipulationOperationOptionalValue"/>
          <xs:element name="value" type="EnterpriseVoiceVPNDigitManipulationValue" nillable="true" minOccurs="0"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="EnterpriseVoiceVPNDigitManipulationRequiredValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation Entry that has a value.
      </xs:documentation>
    </xs:annotation>
    <xs:complexContent>
      <xs:extension base="EnterpriseVoiceVPNDigitManipulation">
        <xs:sequence>
          <xs:element name="operation" type="EnterpriseVoiceVPNDigitManipulationOperationRequiredValue"/>
          <xs:element name="value" type="EnterpriseVoiceVPNDigitManipulationValue"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:simpleType name="EnterpriseVoiceVPNDigitManipulationValue">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Digit Manipulation value.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNExtensionLength">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Extension Length.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="100"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNNonMatchingE164NumberSelection">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Selector for Non Matching E164 Number.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:enumeration value="Public"/>
      <xs:enumeration value="Default"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="EnterpriseVoiceVPNTreatmentDescription">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Treatment Description.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1"/>
      <xs:maxLength value="30"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EnterpriseVoiceVPNTreatmentEntry">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Treatment entry
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="id" type="EnterpriseVoiceVPNTreatmentId"/>
      <xs:element name="description" type="EnterpriseVoiceVPNTreatmentDescription" nillable="true" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="EnterpriseVoiceVPNTreatmentId">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN Treatment 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="EnterpriseVoiceVPNLocationCode">
    <xs:annotation>
      <xs:documentation>
        Enterprise Voice VPN location code.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:token">
      <xs:minLength value="1" />
      <xs:maxLength value="22" />
    </xs:restriction>
  </xs:simpleType>

</xs:schema>
