[Telepathy] Jingle Empathy with Asterisk

Robert McQueen robert.mcqueen at collabora.co.uk
Sat May 24 04:43:18 PDT 2008


Philippe Sultan wrote:
> Hi Robert,

Hi Philippe,

> my name is Philippe Sultan, we met at the last XMPP devcon in Brussels
> in February. I'm working on the Gtalk/Jingle stacks in Asterisk, and I'm
> currently in the process of testing Asterisk with Empathy.

I do remember talking to you, yes, and it's great to hear you're working
on this. I've had your contact details saved for quite a while so I
could talk to you once we'd fixed up our Jingle implementation a bit.

> I am able to place/receive audio calls through the Asterisk's Gtalk
> channel, since Empathy 0.21.3 implements Gtalk too. That makes Asterisk
> accessible to Empathy as SIP/H323/PSTN/.. gateway, which is nice.

Or you could also install the tp-sofiasip backend, and just use SIP with
Empathy. But it's cool that GTalk works too. :)

> Now, I'd like to move on and make Asterisk's real Jingle stack work with
> Empathy. Could you point me to resources that describe the XML packets
> that Empathy expects from another Jingle entity?

Unfortunately, there are two limitations in our implementation of Jingle
in Gabble (the XMPP backend that Empathy uses) which means it's not very
interoperable with other Jingle implementations at the moment.

1) The namespaces/semantics we use are from Jingle at the start of 2007,
and we've not made any changes since then to update either to the new
namespaces in the XEPs, or some changes to the semantics which also took
place. This means an implementation of current Jingle won't even find us
to be callable.

2) The only transport we support signalling at the moment is the same as
Google uses for Google Talk calls, called "gtalk-p2p" in various places
inside libjingle. This means you need to do the same ICE-like in-line
STUN requests/responses that you do when establishing a GTalk call. Our
media stack can actually do raw UDP (which we use for SIP calls too),
and soon will add support for IETF-compliant ICE, but we've not done the
work in our XMPP Jingle implementation to signal these types of candidates.

Senko Rasic, CC'd, is working on improving both of these things in our
Gabble XMPP backend, so you should be able to find out from him how he's
getting on.

> I adapted the XML namespaces in Asterisk's code to match with Empathy's,
> but for the moment, here's what I get when I try to establish a Jingle
> call. It looks like I'm sending a wrong 'candidate' tag to it :
> 
> INCOMING: <iq from='philippe.sultan at inria.fr/Telepathy'
> to='phsultan at jabber.org/asterisk' id='aaaag' type='error'> <jingle
> xmlns='http://jabber.org/protocol/jingle'
> initiator='phsultan at jabber.org/asterisk' sid='4947f75c368032a4'
> action='transport-info'> <content name='asterisk-audio-content'
> creator='initiator'> <transport
> xmlns='http://www.google.com/transport/p2p'> <candidate
> ufrag='047ac23d4daf198' type='host' pwd='3b5ab3b41348ed6' protocol='udp'
> priority='1678246398' port='12308' network='0' ip='10.0.0.251'
> generation='0' foundation='4220018048' component='1'/>
> </transport>
> </content>
> </jingle>
>  <error code='400' type='modify'> <bad-request
> xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
>  <text>unable to parse candidate</text>
> </error>
> </iq>

I don't really recommend that you mangle your Jingle implementation so
that you can speak to Gabble's Jingle as it is at the moment. It's not
something that anyone else is ever likely to implement - we're the ones
who need to catch up here. However, in this specific circumstance, the
problem is that you're claiming to support the gtalk-p2p namespace for
your transport, but this is actually just a UDP candidate. gtalk-p2p
candidates in our kinda-Jingle calls look like this:

<iq type="set" to="yyy at gmail.com/LaptopF70FCFEE" id="300224825213"
from="xxx at gmail.com/LaptopF6802840"> <jingle
initiator="yyy at gmail.com/LaptopF70FCFEE" action="transport-info"
sid="953234159" xmlns="http://jabber.org/protocol/jingle"> <content
creator="initiator" name="audio1"> <transport
xmlns="http://www.google.com/transport/p2p"> <candidate generation="0"
network="0" type="stun" protocol="udp" preference="0.900000"
password="NEu0AxU2dwTIB8Gj" username="0hdP1BXRe4aU71ob" port="53002"
address="86.7.18.209" name="rtp"/>
</transport>
</content>
</jingle>
</iq>

> I'd be very grateful if you could help me on this. Having Empathy and
> Asterisk work over a real Jingle connection would be a really great thing!

I actually did take some time a few weeks ago to look over the code you
had in trunk, and decided it wouldn't work yet for the reasons I
observed above. One other thing I noticed though - I saw that you've
hardcoded the content names (eg "asterisk-audio-content") into your code
which sends candidates... that really won't work when we initiate a call
and name our streams differently, you won't be able to send any
candidates/etc to us...

> Thanks in advance,
> 
> Philippe

Regards,
Rob



More information about the Telepathy mailing list