<?xml version="1.0" encoding="UTF-8"?>

<!--

XML data type definitions for the RESTful Network API for Audio Call
   Version: 1.0 (1.0)
   Date: 26 Feb 2020 

FILE INFORMATION

  OMA Permanent Document 
    File: OMA-SUP-XSD_rest_netapi_audiocall-V1_0-20200226-C
    Type: Text - Schema Description 

  Public Reachable Information 
    Path: http://www.openmobilealliance.org/tech/profiles 
    Name: rest_netapi_audiocall-v1_0.xsd 

NORMATIVE INFORMATION

  Information about this file can be found in the latest revision of the specification

    OMA-TS-REST_NetAPI_AudioCall-V1_0 

  This is available at http://www.openmobilealliance.org/

  Send comments to technical-comments@mail.openmobilealliance.org

CHANGE HISTORY 
03052011 File created based on OMA-SUP-XSD_rest_audiocall-V1_0-20110111-C, see contribution OMA-ARC-2011-0195-INP_XSD_NetAPI_AudioCall. 
27052011 Changed according to OMA-ARC-REST-NetAPI-2011-0022-INP_XSD_Template_application. 
24102011 CR OMA-ARC-REST-NetAPI-2011-0302 implemented. 
26012012 CR OMA-ARC-REST-NetAPI-2012-0025-CR_AUdioCall_XSD_companion_0024 implemented. 
27022012 CR OMA-ARC-REST-NetAPI-2012-0077R02-CR_Audiocall_XSD_CONR_A0029 implemented.
27032012 Status changed to Candidate by TP, TP Ref # OMA-TP-2012-0128-INP_REST_NetAPI_AudioCall_1_0_ERP_and_ETR_for_Candidate_Approval   
29072015 Incorporated CR OMA-ARC-REST-NetAPI-2015-0069-CR_AudioCall_XSD_multiple_playFileLocation
11112015 Incorporated CR OMA-ARC-REST-NetAPI-2015-0086-CR_AudioCall_XSD_Validation_Issues
08052019 Updated legal disclaimer
26022020 Status changed to Candidate by ARC WG, ARC WG Ref # OMA-ARC-2020-0001-INP_REST_NetAPI_AudioCall_V1_0_ERP_for_Candidate_Approval

LEGAL DISCLAIMER

  Copyright 2020 Open Mobile Alliance.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions
  are met:

  1. Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived
  from this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.

  The above license is used as a license under copyright only.  Please
  reference the OMA IPR Policy for patent licensing terms:
  https://www.omaspecworks.org/about/intellectual-property-rights/

-->

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   targetNamespace="urn:oma:xml:rest:netapi:audiocall:1" 
   xmlns:common="urn:oma:xml:rest:netapi:common:1"
   xmlns="urn:oma:xml:rest:netapi:audiocall:1" version="1.0">
   
   <xsd:annotation>
      <xsd:documentation>This schema defines the XML data types for the RESTful Network API for Audio Call.</xsd:documentation>
   </xsd:annotation>
   
   <xsd:import namespace="urn:oma:xml:rest:netapi:common:1"
      schemaLocation="http://www.openmobilealliance.org/tech/profiles/rest_netapi_common-v1_0.xsd"/> 
   
   
   <xsd:simpleType name="EndCharType">
      <xsd:restriction base="xsd:string">
         <xsd:pattern value="[0-9#*]"/>
      </xsd:restriction>
   </xsd:simpleType>


   <xsd:complexType name="DigitConfig">
      <xsd:sequence>
         <xsd:element name="minDigits" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="maxDigits" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="endChar" type="EndCharType" minOccurs="0" maxOccurs="1"/> 
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:complexType name="RecConfig">
      <xsd:sequence>
         <xsd:element name="recFileLocation" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="maxRecordingLength" type="xsd:int" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="endChar" type="EndCharType" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:complexType name="ASRConfig">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="scriptFileLocation" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="script">
               <xsd:complexType>
                  <xsd:sequence>
                     <xsd:any minOccurs="1" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
                  </xsd:sequence>
               </xsd:complexType>
               </xsd:element>
         </xsd:choice>
         <xsd:element name="scriptType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="scriptEncoding" type="ScriptEncodingType" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="endChar" type="xsd:string" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:complexType name="PlayConfig">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="playFileLocation" type="xsd:anyURI" minOccurs="1" maxOccurs="unbounded"/> 
            <xsd:element name="textString" type="xsd:string"/>
         </xsd:choice>
         <xsd:element name="messageFormat" type="AnnouncementFormat" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="mediaType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="interruptMedia" type="xsd:boolean" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="messageStatusList" type="MessageStatusList"/>
   
   <xsd:complexType name="MessageStatusList">
      <xsd:sequence>
         <xsd:element name="messageStatus" type="MediaMessageStatus" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:complexType name="MediaMessageStatus">
      <xsd:sequence>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="status" type="MessageStatus" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="messageList" type="MessageList"/>
   
   <xsd:complexType name="MessageList">
      <xsd:sequence>
         <xsd:element name="textMessage" type="TextMessage" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="audioMessage" type="AudioMessage" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="voiceXmlMessage" type="VoiceXMLMessage" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="videoMessage" type="VideoMessage" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="textMessage" type="TextMessage"/>
   
   <xsd:complexType name="TextMessage">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="callSessionIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="link" type="common:Link" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="text" type="common:LanguageString" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="messageStatusList" type="MessageStatusList" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="charging" type="common:ChargingInformation" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:complexType name="MediaMessage">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="callSessionIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="link" type="common:Link" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="mediaUrl" type="xsd:anyURI" minOccurs="1" maxOccurs="unbounded"/>
         <xsd:element name="mediaType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="messageStatusList" type="MessageStatusList" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="charging" type="common:ChargingInformation" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="audioMessage" type="AudioMessage"/>
   
   <xsd:complexType name="AudioMessage">
      <xsd:complexContent>
         <xsd:extension base="MediaMessage"/>
      </xsd:complexContent>
   </xsd:complexType>
   
   
   <xsd:element name="videoMessage" type="VideoMessage"/>
   
   <xsd:complexType name="VideoMessage">
      <xsd:complexContent>
         <xsd:extension base="MediaMessage"/>
      </xsd:complexContent>
   </xsd:complexType>
   
   
   <xsd:element name="voiceXMLMessage" type="VoiceXMLMessage"/>
   
   <xsd:complexType name="VoiceXMLMessage">
      <xsd:complexContent>
         <xsd:extension base="MediaMessage"/>
      </xsd:complexContent>
   </xsd:complexType>
   
   
   <xsd:element name="interactionList" type="InteractionList"/>
   
   <xsd:complexType name="InteractionList">
      <xsd:sequence>
         <xsd:element name="digitCapture" type="DigitCapture" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="recordingCapture" type="RecordingCapture" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="recognitionCapture" type="RecognitionCapture" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="digitCapture" type="DigitCapture"/>
   
   <xsd:complexType name="DigitCapture">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="callSessionIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="link" type="common:Link" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="playingConfiguration" type="PlayConfig" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="digitConfiguration" type="DigitConfig" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="recordingCapture" type="RecordingCapture"/>
   
   <xsd:complexType name="RecordingCapture">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="callSessionIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="link" type="common:Link" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="playingConfiguration" type="PlayConfig" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="recordingConfiguration" type="RecConfig" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:element name="recognitionCapture" type="RecognitionCapture"/>
   
   <xsd:complexType name="RecognitionCapture">
      <xsd:sequence>
         <xsd:choice>
            <xsd:element name="callSessionIdentifier" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            <xsd:element name="link" type="common:Link" minOccurs="1" maxOccurs="1"/>
         </xsd:choice>
         <xsd:element name="callParticipant" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
         <xsd:element name="asrConfiguration" type="ASRConfig" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="clientCorrelator" type="xsd:string" minOccurs="0" maxOccurs="1"/>
         <xsd:element name="resourceURL" type="xsd:anyURI" minOccurs="0" maxOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>
   
   
   <xsd:simpleType name="MessageStatus">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Played"/>
         <xsd:enumeration value="Playing"/>
         <xsd:enumeration value="Pending"/>
         <xsd:enumeration value="Error"/>
         <xsd:enumeration value="Terminated"/>
      </xsd:restriction>
   </xsd:simpleType>
   
   
   <xsd:simpleType name="AnnouncementFormat">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="Audio"/>
         <xsd:enumeration value="VoiceXML"/>
         <xsd:enumeration value="TextToSpeech"/>
         <xsd:enumeration value="Video"/>
         <xsd:enumeration value="ApplicationSpecificFormat"/>
      </xsd:restriction>
   </xsd:simpleType>
   
   <xsd:simpleType name="ScriptEncodingType">
      <xsd:restriction base="xsd:string">
         <xsd:enumeration value="base64"/>
      </xsd:restriction>
   </xsd:simpleType>
   
   
</xsd:schema>
