[Psi-devel] Implementing voice conversations in PSI

Cesar Martinez Izquierdo listas at ono.com
Tue May 10 10:54:08 PDT 2005


El Martes 10 Mayo 2005 19:40, Francisco Joaquín Rodríguez Prados escribió:
> > As I'm not familiar with PSI code, could you point me to the files where
> > I should start looking? Do you have any tip?
>
> It depends on what do you want to do, and in which part of Psi. Do you
> want to add a new dialog? Do you want to add a button in the chat
> window? Do you want to add an entry in the menu?

Because I have strong time constraints to finish my project, I don't care too 
much about the interface.
So I probably will only add an entry in the menu that appears when you 
right-click on a user. And then I have to think how I will show an ongoing 
conversation and how to finish it.

Of course, this is only a temporary solution. If the PSI developers want to 
integrate my code in the official version, we can discuss further about the 
interface after finishing my project and I will work on it.

The XMPP code to stablish the conversation would look like this:

** Offer from quixote at evtek.fi to dulcinea at upv.es:

<iq type='set' id='offer1' to='dulcinea at upv.es/resource'>
  <si xmlns='http://jabber.org/protocol/si'
      id='voip01'
      mime-type='text/plain'
      profile='http://jabber.org/protocol/si/profile/voip'>
    <voip xmlns='http://jabber.org/protocol/si/profile/voip' />
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='form'>
        <field var='stream-method' type='list-single'>
          <option>
            <value>http://jabber.org/protocol/sip</value>
          </option>
          <option>
            <value>http://jabber.org/protocol/h323</value>
          </option>
          <option>
            <value>http://jabber.org/protocol/iax</value>
          </option>
        </field>
      </x>
    </feature>
      <desc>Here there is some message from the originator of
      the conversation.</desc>
  </si>
</iq>

** Negotiation:

<iq type='result' to='quixote at evtek.fi/resource' id='offer1'>
  <si xmlns='http://jabber.org/protocol/si'>
    <feature xmlns='http://jabber.org/protocol/feature-neg'>
      <x xmlns='jabber:x:data' type='submit'>
        <field var='stream-method'>
          <value>http://jabber.org/protocol/sip</value>
        </field>
      </x>
    </feature>
  </si>
</iq>

<iq type='set' id='start1' to='dulcinea at upv.es'>
  <query xmlns='http://jabber.org/protocol/sip'
         sid='voip01'>
    <streamhost xmlns='http://jabber.org/protocol/sip'>
           address='sip:quixote at 192.168.1.1'
           port='23456'
           jid='quixote at evtek.fi/resource' />
  </query>
</iq>


<iq type='result' id='start1' to='quixote at evtek.fi />
<query xmlns="http://jabber.org/protocol/sip">
<streamhost-used jid="quixote at evtek.fi/resource" />
</query>
</iq>



OK, so I want to understand where is PSI parsing the stanzas and calling the 
proper class (file transfer, voice conversation, etc), and also where is 
generating the stanzas (e.g. when you want to initiate a conversation).


> > Thanks a lot,
> >
> >   Cesar
>
> You're from Spain, yeah? :D

You are right ;-)
(But I'm currently abroad!)

Best regards,

  Cesar


More information about the Psi-devel-affinix.com mailing list