Skip to content

XEP-0482: Add the XML Schema #1423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions xep-0482.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
<email>[email protected]</email>
<jid>[email protected]</jid>
</author>
<revision>
<version>0.1.1</version>
<date>2025-01-26</date>
<initials>egp</initials>
<remark>
<p>Add the XML Schema.</p>
</remark>
</revision>
<revision>
<version>0.1.0</version>
<date>2023-05-04</date>
Expand Down Expand Up @@ -204,4 +212,75 @@
<p>This document requires no interaction with &REGISTRAR;.</p>
</section1>

<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns='urn:xmpp:call-invites:0'
targetNamespace='urn:xmpp:call-invites:0'
elementFormDefault='qualified'>

<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-0482: https://xmpp.org/extensions/xep-0482.html
</xs:documentation>
</xs:annotation>

<xs:element name='invite'>
<xs:complexType>
<xs:sequence>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think <xs:sequence><xs:choice maxOccurs='unbounded'> might be more appropriate here.

While currently not specified, the idea was that the order of elements inside <invite/> indicates the sending clients priority for each of the ways to join the call, meaning a recipient client should pick the first option it deems appropriate, when of course the receiving user might be empowered to override this.

For regular calls this is likely always first <jingle/> and then <external/>, but for an multi-party audio call it might be as complex as <meeting type='jitsi' /><external uri='https://jitsi...' /><jingle jid='mixer@jitsi...' /><external uri='tel:...' /> ,where the first two receive individual audio streams from each participant whereas the third and fourth go through a mixer that mixes them in a single audio stream and thus are inferior.

<xs:element ref='jingle'/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<jingle/> element is meant to be optional. This would implicitly be solved by changing to <xs:sequence><xs:choice maxOccurs='unbounded'>.

<xs:element ref='external' minOccurs='0' maxOccurs='unbounded'/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add explicit <xs:any namespace='##other' /> here to indicate that this is explicitly intended as an extension point.

</xs:sequence>
<xs:attribute name='audio' type='xs:boolean' use='optional' default='true'/>
<xs:attribute name='video' type='xs:boolean' use='optional' default='false'/>
</xs:complexType>
</xs:element>

<xs:element name='jingle'>
<xs:complexType>
<xs:attribute name='sid' type='xs:string' use='required'/>
<xs:attribute name='jid' type='xs:string' use='optional'/>
</xs:complexType>
</xs:element>

<xs:element name='external'>
<xs:complexType>
<xs:attribute name='uri' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='retract'>
<xs:complexType>
<xs:attribute name='id' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='accept'>
<xs:complexType>
<xs:choice>
<xs:element ref='jingle'/>
<xs:element ref='external'/>
</xs:choice>
<xs:attribute name='id' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='reject'>
<xs:complexType>
<xs:attribute name='id' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

<xs:element name='left'>
<xs:complexType>
<xs:attribute name='id' type='xs:string' use='required'/>
</xs:complexType>
</xs:element>

</xs:schema>]]></code>
</section1>

</xep>
Loading