Search code examples
javaandroid-studioxmppejabberd

What is payload-type tag means in jingle IQ?


When initializing jingle call we should send an IQ as shown below. I still don't understand the use of payload-type and which criteria to take into account in order to list them. I tried to read Supported media formats from android documentation but I did not see any relation with payload-type. After I read RTP payload formats, I some what understood what was a payload. I want to know if it is possible to list available payload types in my device or I should add other dependenies in my project in order to list them.

<iq from='romeo@montague.lit/orchard'
    id='ph37a419'
    to='juliet@capulet.lit/balcony'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:1'
          action='session-initiate'
          initiator='romeo@montague.lit/orchard'
          sid='a73sjjvkla37jfea'>
    <content creator='initiator' name='voice'>
      <description xmlns='urn:xmpp:jingle:apps:rtp:1' media='audio'>
        <payload-type id='96' name='speex' clockrate='16000'/>
        <payload-type id='97' name='speex' clockrate='8000'/>
        <payload-type id='18' name='G729'/>
        <payload-type id='0' name='PCMU' />
        <payload-type id='103' name='L16' clockrate='16000' channels='2'/>
        <payload-type id='98' name='x-ISAC' clockrate='8000'/>
      </description>
    </content>
  </jingle>
</iq>

Solution

  • XMPP XEP-0167: Jingle RTP Sessions: Application Format speciications would be better place to look I guess:

    The application format consists of one or more encodings contained within a wrapper <description/> element qualified by the 'urn:xmpp:jingle:apps:rtp:1' namespace (see Namespace Versioning regarding the possibility of incrementing the version number). In the language of RFC 4566 each encoding is a payload-type; therefore, each <payload-type/> element specifies an encoding that can be used for the RTP stream, as illustrated in the following example.